home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2148 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  752 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.