Albert
Albert

Reputation: 68160

Python: default/common way to read png images

I haven't found a standard way in Python to read images. Is there really none (because there are so many functions for so many custom stuff that I really wonder that there are no functions to read images)? Or what is it? (It should be available in the MacOSX standard installation and in most recent versions on Linux distributions.)

If there is none, what is the most common lib?

Many search results hint me to Python Imaging Library. If this is some well known Python-lib for reading images, why isn't it included in Python?

Upvotes: 18

Views: 15353

Answers (3)

Tom Swirly
Tom Swirly

Reputation: 2780

Coming late to the party, I would strongly suggest one of the Python interfaces to the ImageMagick library (Wand worked well in my testing, I'll know more soon...)

ImageMagick is a more powerful library and also pretty well a de-facto standard across many languages. Appealing to a wider base, they also have a wider developer base as a result.

Upvotes: 2

user266458
user266458

Reputation: 17

THe suggested PIL does not support interlaced PNGs. It can be quite anoying when dealing with lots of PNGs from different origins. It is possible to open them, but can only read headerinformation from them, all other operations fail.

Upvotes: 0

AndiDog
AndiDog

Reputation: 70148

No, there are no modules in the standard library for reading/writing/processing images directly. But the most common library might be PIL (Python Imaging Library). Many projects are not included in the standard library because they are 1) totally optional and 2) cannot be maintained by the few Python core developers.

Upvotes: 24

Related Questions