Tiff Image Reader/writer

Robert Kern rkern at ucsd.edu
Wed Jun 15 22:36:55 CEST 2005

Marc 'BlackJack' Rintsch wrote:
> In <mailman.396.1118698763.10512.python-list at python.org>, Robert Kern
> wrote:
>>PyPK wrote:
>>>One reason why I don't want to use PIL is it seems very slow for tiff
>>>images of very large sizes(2400x4800). So I am looking for a better
>>>tool than does the right job faster.
>>This isn't fast enough?
>>In [8]: %time img2 = Image.open('foo.tiff')
>>CPU times: user 0.00 s, sys: 0.01 s, total: 0.01 s
>>Wall time: 0.03
>>In [9]: img2.size
>>Out[9]: (2400, 4800)
> It's fast enough to open the file and read the meta-data.  The OP wants to
> decode the actual pixels.


In [12]: %time d = img.getdata()
CPU times: user 0.31 s, sys: 1.43 s, total: 1.73 s
Wall time: 6.19

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Python-list mailing list