PIL: Group4 Tiff Images

D

Doug Tolton

Does PIL still not have a Group4 Tiff decoder available? I can load a
group4 Tiff just fine, but when I attempt to show it I get:
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\PYTHON23\Lib\site-packages\PIL\Image.py", line 1192, in
show
_showxv(self, title, command)
File "C:\PYTHON23\Lib\site-packages\PIL\Image.py", line 1739, in
_showxv
file = self._dump(format=format)
File "C:\PYTHON23\Lib\site-packages\PIL\Image.py", line 410, in
_dump
self.load()
File "C:\PYTHON23\Lib\site-packages\PIL\ImageFile.py", line 165, in
load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "C:\PYTHON23\Lib\site-packages\PIL\Image.py", line 309, in
_getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder group4 not available

I have been able to load a group4 tif into the wxImage class, but I
get tag errors when attempting to do so.

Is there a better way of working with Group4 Tiffs? I have a huge
volume of Tiffs and decompressing them isn't a good option for me.

Any ideas on the best way to tackle this problem?


Doug Tolton
(format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")
 
M

max

Doug said:
I have been able to load a group4 tif into the wxImage class, but I
get tag errors when attempting to do so.

Is there a better way of working with Group4 Tiffs? I have a huge
volume of Tiffs and decompressing them isn't a good option for me.

Any ideas on the best way to tackle this problem?

many :)
I don't know where PIL stands on TIFF, but almost all C-based libraries
rely on libtiff package in the end. Depending on how it is compiled you
will get different results for TIFFs with nonstandard tags (which is
probably your case). If you are willing to tinker you can recompile wx's
version of libtiff. Also, how about reporting to the PIL people? G4 is
the most popular tiff codec, they would want to know if it's broken.
What are you doing with all those tiffs anyway?
BTW, you did a nice job obfuscating your email, but it is plaintext in
the header - you have to reconfigure you mailer to hide it...
 
D

Doug Tolton

many :)
I don't know where PIL stands on TIFF, but almost all C-based libraries
rely on libtiff package in the end. Depending on how it is compiled you
will get different results for TIFFs with nonstandard tags (which is
probably your case). If you are willing to tinker you can recompile wx's
version of libtiff. Also, how about reporting to the PIL people? G4 is
the most popular tiff codec, they would want to know if it's broken.
What are you doing with all those tiffs anyway?
BTW, you did a nice job obfuscating your email, but it is plaintext in
the header - you have to reconfigure you mailer to hide it...

I will send an e-mail to the PIL folks. I've been quite suprised
because in looking through the code it looks like they have Group4
tiff support.

I did find that using wxImage there is a scale function, so I'll play
around with that and see if it meets my needs.

How do the headers come through now? I think I set them the same as
my sig e-mail.


Doug Tolton
(format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")
 
M

max

How do the headers come through now? I think I set them the same as
my sig e-mail.


Doug Tolton
(format t "~a@~a~a.~a" "dtolton" "ya" "hoo" "com")
Now you got it :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top