Get pixel colors from images in Python 3

Discussion in 'Python' started by Cro, Mar 13, 2009.

  1. Cro

    Cro Guest

    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...
    Cro, Mar 13, 2009
    #1
    1. Advertising

  2. Cro

    Cro Guest

    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.
    Cro, Mar 13, 2009
    #2
    1. Advertising

  3. > 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

    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
    Daniel Fetchinson, Mar 13, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samy
    Replies:
    0
    Views:
    605
  2. André Wagner

    Fastest pixel by pixel operation

    André Wagner, Mar 17, 2008, in forum: Java
    Replies:
    12
    Views:
    1,018
    Larry A Barowski
    Mar 19, 2008
  3. AAaron123

    TreeNode colors come from anchor colors

    AAaron123, Aug 7, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    523
    darrel
    Aug 7, 2008
  4. ZelluX
    Replies:
    3
    Views:
    1,840
    Peter Otten
    Dec 1, 2008
  5. Neraph

    getting pixel colors from an image?

    Neraph, Feb 14, 2006, in forum: Javascript
    Replies:
    3
    Views:
    159
    Thomas 'PointedEars' Lahn
    Feb 14, 2006
Loading...

Share This Page