AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.07.25 00:32 "How to detect a tiff file is a fax that has horizontal ratio of 2:1?", by Hiu Sing Ngai
2002.07.25 07:51 "Re: How to detect a tiff file is a fax that has horizontal ratio of 2:1?", by Frank D. Cringle

2002.07.25 07:51 "Re: How to detect a tiff file is a fax that has horizontal ratio of 2:1?", by Frank D. Cringle

The problem is that the tiff2png program has to input a -faxpact in order to decode the tiff file in the right ratio. In what way I know if a 1 bit tiff has a horizontal ratio of 2:1? Also, how to I handle the decompression? For example, if I detected the image width is 1000 and height 1000. Should I set the width to 500 or increase the height to 2000?

Use the XResolution and YResolution tags, assuming the writer set them correctly. A robuster but less efficient solution is for the application that receives the fax to store fine-mode faxes as-is and to duplicate each scanline of normal-mode faxes. That stretches the normal-mode faxes into approximately the correct aspect ratio.

Frank Cringle,      fdc@cliwe.ping.de
voice: (+49 7745) 928759; fax: 928761