2002.09.05 09:56 "Decode group4", by Jan Edmundson

2002.09.05 18:02 "Re: Decode group4", by Lee Howard

Any pointers for a libtiff newbie on how to approach g4 -> g3 conversion from within a libtiff-dependent package (HylaFAX)?

Depends what you mean by within. It's easy if you have the g4 data in a file and a shell script is adequate for your application: just use tiffcp - a utility that comes with the libtiff package. If you need to write something in C you could look at the tiffcp source code to see how it calls the libtiff functions.

Unfortunately, because of bottlenecking concerns, the disk cannot be used although the file originates there. The g4 data is in memory in a $data variable. So the functions used in tiffcp need to be used in HylaFAX (written in C++).

I've looked at the tiffcp source, but I got lost. It looked to me like the conversion happened somewhat magically by TIFFWriteEncodedStrip(). (Magically, because TIFFWriteEncodedStrip() doesn't accept any "input format" or "output format" options.) Any pointer on which functions to look at first would be appreciated.

Lee.