HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] Receiving a color fax



Blas Rodriguez Somoza wrote:

Excuse me if the mail are too long, but I expend hours trying to analyze the problem I and wish to explain the process, perhaps others can get some valuable information. ;-)


I actually enjoy these kinds of discussions very much. I only wish that I knew more about JPEG.

After this result which don't answer the question I've found that the color space for a fax is not CIELab nor ICCLab but ITULab and so it is coded the tif.


Initially I assumed that color JPEG faxes were ITULab because of the "ITU" involvment there. However, I assumed incorrectly. ITU-T.30 Table 2 Note 35 (in the 2003 revision) clearly indicates that color JPEG faxes use CIELab color space. This was further reinforced by my discussions with those on the IJG mailing lists, in particular with the author of the CIELAB libjpeg patch, John Barber. His libjpeg patches are here:

http://homepage.ntlworld.com/john.andy.barber/JPEG/index.php

And we will need to use more of them in order to get color fax *sending* going (if we intend to get the tagline encoded in a lossless manner).

All this said, on a purely theoretical and technical level the sending fax machine could encode the image in whatever format it chooses. It could use CIELab or ITULab or whatever format it wanted. As we've seen many, many times before fax machines do not always adhere to the standard (which appears to be CIELAB). The purest, and most correct method to determine which type of colorspace is used by the fax image would be to look inside the JPEG image data itself, looking for the JPEG markers which will indicate which type of colorspace is used. And, as a fax receiver, we would need to be able to identify this and use the information to set the appropriate TIFF tag. However, as I became aware of how little-used color faxing really is (like, practically never), spending this much time with it was not so much a priority for me. Consequently, I just went with the standard CIELAB, for the TIFF tag.

The reason why Photoshop get a better image from the tif with photometric = 9 (ICCLab) than with photometric = 8 (CIELab) is that ICCLab/ITULab codings are similar and use unsigned values whether CIELab coding uses signed.


As CIELab and ITULab are so very uncommon in open JPEG usage, I would really hesitate to believe that any particular implementation has it correct. I would not be surprised to learn that each brand of color fax machine does its own thing in a unique way, and that most image viewers also would do unique things. That said, I have received color faxes from Brother, HP, and one other kind of fax machine (that I can't remember at the moment), and libtiff's tiff2ps (patched, of course) was able to decode them each with the colors looking correct.

So finally the problem seems to be that the tif photometric tag and the conding of color values don't match. The values are coded as ITULab and the photometric tag says ICELab


Again, I'm not so sure that I believe this. The ITU T.30 spec says CIELAB. If the JPEG values are in truth coded as ITULab, then there is an inconsistency between the specification and the implementation, and this would not surprise me, but it would complicate things greatly.

The question about the DataFormat remains unanswered.


The JPEG and JBIG DataFormat listing comes from the FaxDCS TIFF tag. Do a 'tiffinfo' on my file and compare it against the 'tiffinfo' output on your file. There was an enhancement to the faxinfo utility that parsed the FaxDCS tag to interpret the JPEG and JBIG formats from it.

I test with Hylafax 4.2.5 a Brother 1840C fax and a Class1Modem


I'm using 4.2.4.2 and 4.2.5.1, but they have no difference in this regards, I think.

The only difference that seems significative between your log and mine which I can see is that I don't get any CallID and a line in yours I don't get

RECV/CQ: Found Define Number of Lines (DNL) Marker, lines: 2112


This requires that you have Copy Quality checking and correction logging turned on in your SessionLogging.


If, after enabling the logging, you still do not see DNL markers logged it must mean that the fax machine does not use DNL markers ... which would mean that it does not transmit JPEG pages of variable length - that the page length is predetermined before the fax begins.

Lee.


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions