~ubuntu-branches/debian/squeeze/python-imaging/squeeze

« back to all changes in this revision

Viewing changes to PIL/ImageFileIO.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-11-20 19:22:59 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20091120192259-n3iy0f17n5akogom
Tags: 1.1.7-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# The Python Imaging Library.
3
 
# $Id: ImageFileIO.py 2134 2004-10-06 08:55:20Z fredrik $
 
3
# $Id$
4
4
#
5
5
# kludge to get basic ImageFileIO functionality
6
6
#
37
37
    def __init__(self, fp):
38
38
        data = fp.read()
39
39
        StringIO.__init__(self, data)
40
 
 
41
 
if __name__ == "__main__":
42
 
 
43
 
    import Image
44
 
    fp = open("/images/clenna.im", "rb")
45
 
    im = Image.open(ImageFileIO(fp))
46
 
    im.load() # make sure we can read the raster data
47
 
    print im.mode, im.size