Tiff Image Reader/writer
mrmaple at gmail.com
Thu Jun 16 18:41:37 CEST 2005
I did a test with wxPython 2.6.1 on Windows. I created a G4 TIFF
image that was 4400 x 3599 big, and the following code took under a
img = wx.Image(filename)
w = img.GetWidth()
h = img.GetHeight()
value = img.GetGreen(w - 10, h - 10)
image = "D:\\horizLines1g4.tif"
t0 = time.clock()
value = readImage(image)
print time.clock() - t0, "seconds process time"
print "The value in the lower right hand corner is %i" % value
0.488175452467 seconds process time
The value in the lower right hand corner is 255
so it is treating it as RGB, but I bet that's not a problem.
On 14 Jun 2005 05:25:46 -0700, PyPK <superprad at gmail.com> wrote:
> I get a decoder error when i do a get pixel on the Image
> >>> im.getpixel((12,34))
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File "Image.py", line 858, in getpixel
> File "/usr/local/lib/python2.4/site-packages/PIL/ImageFile.py", line
> 180, in load
> d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
> File "Image.py", line 328, in _getdecoder
> raise IOError("decoder %s not available" % decoder_name)
> IOError: decoder group4 not available
More information about the Python-list