Search code examples
pythongraphicspython-imaging-library

Best way to programmatically create image


I'm looking for a way to create a graphics file (I don't really mind the file type, as they are easily converted).

The input would be the desired resolution, and a list of pixels and colors (x, y, RGB color).

Is there a convenient python library for that? What are the pros\cons\pitfalls?


Solution

  • PIL is the canonical Python Imaging Library.

    Pros: Everybody wanting to do what you're doing uses PIL. 8-)

    Cons: None springs to mind.

    EDIT: in the future, we use Pillow -- the fork of PIL.