[PyQt] Re: creating TIFF with CCITT FAX group 4 compression

Glenn Linderman v+pyqt at g.nevcal.com
Wed Jul 16 20:18:56 BST 2008

On approximately 7/16/2008 3:37 AM, came the following characters from 
the keyboard of Alberto Berti:
>>>>>> "Glenn" == Glenn Linderman <v+pyqt at g.nevcal.com> writes:
>     Glenn> Found PIL, but PIL writes only uncompressed TIFF files too,
>     Glenn> according to its documentation.
>     Glenn> I'm pretty far down the list of Google hits, so thought
>     Glenn> maybe it was time to ask if anyone has figured out how to
>     Glenn> write out a QImage into a TIFF file along with using CCITT
>     Glenn> FAX group 4 compression.
> maybe you should ask to packages.debian.org before than google :-)
> http://libtiff.maptools.org/man/tiffcp.1.html

Thanks for the response.

If I were a debian user, perhaps I would have... I actually did see a 
reference tiffcp in my Googlings, but it didn't seem to directly address 
the issue of writing a QImage (memory) to a G4-compressed TIFF file.

I'm hoping for a cross-platform solution, across Mac, Linux, and 
Windows.  I'd also rather compress the file before writing it out to 
disk, and then making a compressed copy after writing it... saves wear 
and tear on the disk.

The closest that I've found so far is 
http://artis.imag.fr/Software/TiffIO/#DWN but it looks rather 
frightening to attempt to build and install on three different 
platforms, for a novice Python, novice Qt user.  It is also a couple 
years old, mentioning Qt 4.0.1 rather than current releases.  Of course, 
a pure Python solution is likely to be slow in CPU performance... so 
maybe I should gain 6 months experience and then look at this again.

More information about the PyQt mailing list