home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / dist-packages / PIL / ImageFileIO.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  809 b   |  20 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from StringIO import StringIO
  5.  
  6. class ImageFileIO(StringIO):
  7.     
  8.     def __init__(self, fp):
  9.         data = fp.read()
  10.         StringIO.__init__(self, data)
  11.  
  12.  
  13. if __name__ == '__main__':
  14.     import Image
  15.     fp = open('/images/clenna.im', 'rb')
  16.     im = Image.open(ImageFileIO(fp))
  17.     im.load()
  18.     print im.mode, im.size
  19.  
  20.