I have a series of tiff images to load in Python.
First I use:
im=Image.open(*)
It loads and displays properly.
>>> im
PIL.TiffImagePlugin.TiffImageFile image mode=I;16 size=1408x1044 at 0x116154050
>>> type(im)
instance
>>> im.size
(1408, 1044)
Then I use:
imarray=numpy.array(im)
where
>>> imarray.shape
()
>>> imarray.size
1
>>> type(imarray)
numpy.ndarray
>>> imarray
array(PIL.TiffImagePlugin.TiffImageFile image mode=I;16 size=1408x1044 at 0x116154050, dtype=object)
I have read this previous post and followed the instructions there, but I can't get imarray.shape
and im.size
to match.