Get pixel colors from images in Python 3

C

Cro

Good day.

As the title sais, i am trying to extract pixel colors from images, in
Python 3.

I know that for python 2.x, PIL (Python image library) can do that,
via Image > getpixel((x,y)). It returns the colors as a list with 3
parameters, Red, Green and Blue. This is exactly what i want.
Now, the problem is that PIL doesn't work in Python 3.

Can anyone suggest how to do that ?
The bigger problem is that i need to extract pixel colors for many
types of images : JPEG, PNG, BMP, GIF. For this, i might need
different codecs... I am not good at image formats and codecs.

I just want to know if i can do this in the simple way, or i have to
beg PIL to implement support for Python 3...
 
C

Cro

I've noticed that Pygame has some similar implementation.
It's a little harder to use, but efficient.

And i think it depends on PIL too.
And Pygame is Python 2.x too...

So, not good.
 
D

Daniel Fetchinson

I've noticed that Pygame has some similar implementation.
It's a little harder to use, but efficient.

And i think it depends on PIL too.
And Pygame is Python 2.x too...

So, not good.

I'd also like to use PIL with python 3 and was told that PIL's author
mostly frequents the image-sig mailing list. Image-sig is an imaging
related python special interest group:

http://www.python.org/community/sigs/current/image-sig/

You can subscribe to their mailing list at

http://mail.python.org/mailman/listinfo/image-sig

When I asked about it there I was told that some work already has
started on porting PIL to python 3. I'm guessing if you ask again at
least it will be viewed as a +1 vote on the project and that will
probably not hurt :)

Cheers,
Daniel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top