Question: What are some of the better libraries for image generation in Python? If I were to implement a GOTCHA (for example's sake), thereby having to manipulate an image on the pixel level, what would my options be? Ideally I would like to save resulting image as a low-resolution jpeg, but this is mere wishing, I'll settle for any common image format.

Thank you for your attention.

Answer: 
The Python Imaging Library (PIL) is the *de facto* image manipulation library on Python. You can find it [here](http://www.pythonware.com/products/pil/), or through **easy\_install** or **pip** if you have them.

Edit: PIL has not been updated in a while, but it has been forked and maintained under the name **[pillow](http://pillow.readthedocs.io/)**. Just install it this way in a shell:

```
pip install Pillow

```

The `import` statements are still the same as PIL (e.g., `from PIL import image`) and is backward compatible.
If you should generate text or other vector based images (and then save to .png or .jpg), you could also consider Cairo (PyCairo, in this case). I use it a lot.
Otherwise, for pixel-level manipulation, PIL is the obvious choice.