Question: I'm writing an addon and I want to save two sizes of every rendered image. One is the original size which blender saves anyway. The other one is a scaled down version of that image.

How do I scale an image with the Python API (possibly with a specific interpolation filter like linear, cubic, ...)?

Answer: 
You can use the Python Image Library (PIL) for instance, there's a Python 3k port:  

<https://github.com/gpolo/pil-py3k> and <https://github.com/sloonz/pil-py3k>

or Pillow, which is also a PIL fork:  

<https://pypi.python.org/pypi/Pillow/2.2.1>

Example code (for original PIL though):  

<http://www.daniweb.com/software-development/python/code/216637/resize-an-image-python>

As PIL supported differnt interpolation techniques, all of the above should offer the same (or more).

You could also try without any extra modules, by saving the image in blender to another file using [Image.save\_render()](http://www.blender.org/documentation/blender_python_api_2_69_0/bpy.types.Image.html?highlight=save_render#bpy.types.Image.save_render). Note that this method can be used on any image, it doesn't save the rendered image only (*render* stands for *render settings*, the render settings of the given scene will be used to save the file. It ignores the resolution settings however. To change scale, you needed to import the saved image again (so that `.pixels` isn't empty, which is the case for render results), then call [Image.scale()](http://www.blender.org/documentation/blender_python_api_2_69_0/bpy.types.Image.html?highlight=save_render#bpy.types.Image.scale) and save again. But you can't specify an interpolation mode.
One could also create a "File Output" node preceeded by a "Scale" node using scripting. This doesn't provide filter options either, though.

Of course this only works with nodes postprocessing turned on.

[Blender Wiki Cookbook example](http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets/Nodes)