Hylafax Mailing List Archives

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

Re: [hylafax-users] Receiving a color fax



Hello Lee

Another looong mail, although I hope it helps and don't tire too much.

Lee Howard wrote:

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.


Fine

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:

The question is that the CIELab color space is not the same that CIELAB encoding. CIEL*a*b have at least three encodings CIELab, ICC(Lab) and ITU(Lab).

The CIELAB encoding, which is the first to be used, was defined to be able to encode with 8/16 bits the l*a*b values which are unbounded. (uses L unsigned, a*b signed)
ICCLab modify CIELAB encoding to match the encoding used by the ICC profile specification. (uses L*a*b unsigned)
ITULab modify CIELAB encoding and adds a gamut range which allows to better represent the colors for different image sources.
-- The ITULAB gamut range can be in tiff with the optional tiff tag "Decode" (http://www.awaresystems.be/imaging/tiff/tifftags/decode.html)


I can give you two pages about that refers to the color space and it three encodings: CIELab, ICC(Lab) and ITU(Lab)

http://davengrace.com/cgi-bin/cspace.pl
http://www.inventoland.net/imaging/cii/ei02.pdf (page 34)

** About the ITU standards

The T.30 Annex E Standard (version 04_99, page 147) mention CIELAB color space but refers to T.4 Annex about encoding.

In T.4 Annex (version 07_03, page 41) ITU defines a encoding for L*a*b values which the one called usually ITULab encoding. You can verify that with the formulas in the previous link.

The full definition of the color space/encoding are in T.42.

** About CIE L*a*b codings in tiff

- The TIFF 6.0 Specification only mentions one encoding (CIELAB encoding)
- The TIFF 6.0 Specification suplement 1 add ICCLab.
- The TIFF 6.0 Specification suplement 2 is dedicated only to make details about CIELab and ICCLab.
- And finally ITULab appears only in TIFF-FX (RFC 2301 File Format for Internet Fax)


In the RFC2301 (chapter 6.2.1) there is very clear reference to the encoding used in faxes :

PhotometricInterpretation(262) = 10. SHORT Base color fax mode requires pixel values to be stored using the CIE L*a*b* encoding defined in ITU-T Rec. T.42. This encoding is indicated by the PhotometricInterpretation value 10, referred to as ITULAB

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.

Yes, it can be in 1-bit RGB, 1-bit CMY, 1-bit CMYK, indexed (palette) and CIELAB/ITULab


I'll give a try to get the correct value from the jpeg and put it in the tiff.

About standards, at least for tiff-fx it seems some fax manufacturers make efforts to assure compliance and interoperability,

http://www.ietf.org/IESG/Implementations/rfc2301-implementation-report.txt


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.


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.

Thanks, I'll try to find the issue.

Lee.


Blas

____________________ 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*



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services