[Image-SIG] Image.getdata()? [PIL]

Fredrik Lundh fredrik@pythonware.com
Tue, 20 Feb 2001 16:14:13 +0100


William Ryu wrote:
> But when I tested this this does not seem to be the case.
>
>        im = Image.open('test.tif')
>        size = im.size
>        data = im.getdata()
>        flatarray = array(flatdata)
>        return reshape(flatarray, size)

does this help:

    return reshape(flatarray, (size[1], size[0]))

Cheers /F