Hi Izak On Tue, Apr 1, 2008 at 10:08 AM, izak marais <[EMAIL PROTECTED]> wrote: > Stéfan wrote: > "Unfortunately, RGBA images cannot be read this way. " > Apparently it does not work with 16bit greyscale tif images either. > For anyone else stumbling upon this thread, there is a work-about to get the > data into a numpy array. > > i = Image.open('16bitGreyscaleImage.tif') > a = numpy.array(i.getdata()) # a 1d numpy array > a = a.reshape(i.size) #2d numpy array > > Perhaps there is a better way of doing it (?), but this works for me.
Would you do me a favour and see whether the patch from the Image-SIG mailing list fixes your problem as well? If not, please mail me an example 16-bit greyscale tiff off-list, so that I can rework the patch. Thanks Stéfan _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion