Hello All,

Interesting, with a freshly opened tiff, I can't call split until I do
something else.  I found that I can call .getdata and then split works.
What is the correct pattern?


In [28]: green.split()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)

.../lib/python2.6/site-packages/PIL/Image.pyc in split(self)
   1495         "Split image into bands"
   1496
-> 1497         if self.im.bands == 1:
   1498             ims = [self.copy()]
   1499         else:

AttributeError: 'NoneType' object has no attribute 'bands'

In [29]: green.getdata()
Out[29]: <ImagingCore object at 0x100429950>

In [30]: green.split()
Out[30]:
(<PIL.Image.Image image mode=L size=512x512 at 0x102D54560>,
 <PIL.Image.Image image mode=L size=512x512 at 0x102D56638>,
 <PIL.Image.Image image mode=L size=512x512 at 0x102D56758>)


Skylar
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig

Reply via email to