[Tutor] im.getdata()

elis aeris hunter92383 at gmail.com
Sun Jul 1 17:02:49 CEST 2007


Googling "PIL Handbook" yields this page
http://www.pythonware.com/library/pil/handbook/image.htm
and, as I said,
"""


     getdata

*im.getdata()* => sequence

Returns the contents of an image as a sequence object containing pixel
values. The sequence object is flattened, so that values for line one
follow directly after the values of line zero, and so on.

Note that the sequence object returned by this method is an internal PIL
data type, which only supports certain sequence operations, including
iteration and basic sequence access. To convert it to an ordinary
sequence (e.g. for printing), use *list(im.getdata())*.





How do I find out how the list look like?

Is it list[x][y]  ?      or rather, how did you find out how this internal
data type look like?

how do I access it ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070701/ff43495a/attachment.htm 


More information about the Tutor mailing list