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



Hello Lee

  Thank you very much for the examples and the srpms.

  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. ;-)

Lee Howard wrote:
Blas Rodriguez Somoza wrote:

I get libtiff-3.7.1 and libjpeg-6b-34 SRPMS (the ones included in FC4) and patch the two.
After that I can open the tiff attachment.
I found two programs which open the resulting tif, Photo-Lux and ViewOne. With the two the result is exactly equal, the image content is OK but the color balance are wrong, white appears as light blue.
The color balance is wrong because the TIFF viewer doesn't know how to represent the CIELAB color pallate.  This is not surprising.  The CIELAB color pallate is, as far as I'm aware, only commonly used in faxes (as uncommon as a color fax is).

I make a try with Photoshop (which add support for tiff with jpeg and cielab) Adobe deliver a technical note about that

http://partners.adobe.com/public/developer/en/tiff/TIFFphotoshop.pdf

Photoshop open the tiff file and recognize it as a TIFF jpeg with CIELab photometric.

I try a test between the viewers, comparing the view of the sample tif with Photocromatic = 8 (CIELab) and Photocromatic = 9 (ICCLab). I Use tiffedit.exe to change the value.
Photo-Lux -> Equal.
ViewOne -> Equal.
AbleFax Tif viewer -> Equal.
IrfanView -> Different
Photoshop -> Different

It seems only Photoshop and  IrfanView are aware of the photocromatic tag. But irfanView seems to make some mistakes.

The tif view in Photoshop as CIELab is wrong but as ICCLab and correcting the b channel level, it appears OK.
I test with several images and this work for all, the colors are not perfect but near. The values os a,b channels for white should be 0,0 but in all the images was 32 before the correction.

Whichery?

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.
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.

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

I've found a very interesting page which allows to convert values from one color space to another
http://davengrace.com/cgi-bin/cspace.pl

I've only found one converter and no viewers which can handle ITULab TIFF.

The solution could be in littlecms (OS with MIT License). They announce an utility called jpegicc.exe which "Convert CIEL*a*b ITU/Fax JPEG to sRGB" using a patched libjpeg.



I just tested here myself sending a color fax from a Brother MFC-3100C to Hylafax 4.2.4.2 using a Class 1 IAXmodem.  Here is the session log, if you're interested:

 http://hylafax.sourceforge.net/examples/c000000608

Here is the 'faxinfo' output on the received TIFF file:

fax000000295.tif:
   Sender: 3604278160
    Pages: 1
  Quality: Fine
     Page: North American Letter
 Received: 2006:01:24 21:12:53
TimeToRecv: 2:27
SignalRate: 9600 bit/s
DataFormat: JPEG Full-Color
ErrCorrect: Yes
  CallID1: fax
  CallID2: Fax
  CallID3: 0124
  CallID4: 2112
  CallID5: 400
  CallID6: <NONE>

The question about the DataFormat remains unanswered.

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

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

If you would like to use the libtiff and libjpeg SRPMs that I have been using they are here:

 http://sourceforge.net/project/showfiles.php?group_id=148904

Thanks. I apply it but I get the same result.
If you would like to spearhead some development work to get libtiff's tiffcp to properly handle CIELAB, then that would be wonderful.
You can be sure I wish, but unfortunately I've no time now.

I hope this helps.

Thanks,

Lee.


Best Regards
Blas





Project hosted by iFAX Solutions