AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2002.07.23 22:50 "CCITT Group 4 assistence needed for HylaFAX", by Lee Howard
2002.07.24 07:46 "Re: CCITT Group 4 assistence needed for HylaFAX", by Frank D. Cringle
2002.07.24 11:44 "Re: CCITT Group 4 assistence needed for HylaFAX", by Lee Howard
2002.07.24 12:51 "Re: CCITT Group 4 assistence needed for HylaFAX", by Frank D. Cringle
2002.07.25 09:16 "Re: CCITT Group 4 assistence needed for HylaFAX", by Lee Howard
2002.07.24 16:20 "Re: CCITT Group 4 assistence needed for HylaFAX", by Sam Leffler
2002.07.24 15:35 "Re: CCITT Group 4 assistence needed for HylaFAX", by Joel Schumacher
2002.07.24 16:09 "Re: CCITT Group 4 assistence needed for HylaFAX", by Frank D. Cringle

2002.07.24 11:44 "Re: CCITT Group 4 assistence needed for HylaFAX", by Lee Howard

However, even if you don't have this kind of time, I wouldn't mind some general outlines on how these two procedures should be altered for Group 4 faxes (i.e., how to count lines and how to image a tagline on top of an existing image).

Disclaimer: I am not familiar with HylaFAX, so I may be making some wrong assumptions in that area. As I understand it, when HylaFAX receives a G3 fax, the modem reports the number of lines in the fax in a status report. In practice, G3 faxes are often damaged in transmission so HylaFAX counts the number of lines actually received and records that value in the tiff header instead of (or as well as?) the expected value.

A damaged G4 fax is useless, or at least it can only be interpreted up to the first error. So we must assume an error free (or error correcting) channel for transmission of G4 faxes. In that case the sender should be able to tell the receiver how many lines are in the fax. That would make counting after reception redundant.

"Now why didn't I think of that?!" ;-)

Yes, the modem reports the number of lines in the image - both with G3 and G4 faxes. And, having just tested it now, this works beautifully for our purpose. I completely forgot the value of ECM in this regard. Thank you.

If you really need to count the lines in a G4 image, you need to know the precise width and then run through all the data, interpreting each code bitstring as you go.

The image width is known because it is part of the negotiated session parameters, but I don't particularly feel like writing a G4 decoder (but - see below - that may be unavoidable) :-)

As to adding or replacing initial lines, the easiest way would be to expand the image into a bitmap, replace the lines and then re-encode the image.

By expanding the image into a bitmap I presume you mean via an external tool. For portability purposes and sanity, I'm not sure this is an ideal option - but, following this approach, we could convert it to G3, use the existing mechanism to image the tagline, and then convert it back to G4. But... as I said, this isn't ideal.

Doing it more efficiently by just replacing the relevant part of the raw data should be possible but rather fiddly.

Any more fiddly than with G3? We're already editing raw data with G3.

Thanks again

Lee.