tags:

views:

54

answers:

2

Hi, everyone Was just curious if there is a python lib that could make a 2-dimensional list of (R,G,B) data out of an image file. Thanks in advance

+9  A: 

You might want to take a look at the Python Imaging Library. It has the ability to be directly converted to a 2 by 2 by 3 numpy array:

from PIL import Image
import numpy
im = Image.open( filename )
data = numpy.as_array( im )
Seth Johnson
+3  A: 

Or ImageMagick at http://wiki.python.org/moin/ImageMagick

Vojtech R.