AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2005.01.07 20:18 "JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.08 02:36 "Re: JPEG (T.30-E, fax) in TIFF", by Joris Van Damme
2005.01.08 16:36 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.08 23:03 "Re: JPEG (T.30-E, fax) in TIFF", by Joris Van Damme
2005.01.09 05:46 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.13 13:41 "Re: JPEG (T.30-E, fax) in TIFF", by Joris Van Damme
2005.01.13 15:21 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.21 20:44 "Re: JPEG (T.30-E, fax) in TIFF", by Andrey Kiselev
2005.01.21 22:19 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.14 02:22 "Re: JPEG (T.30-E, fax) in TIFF", by Joris Van Damme
2005.01.14 04:52 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.20 23:41 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.02.08 17:02 "Re: JPEG (T.30-E, fax) in TIFF", by Joris Van Damme
2005.02.08 18:38 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard
2005.01.21 20:30 "Re: JPEG (T.30-E, fax) in TIFF", by Lee Howard

2005.01.07 20:18 "JPEG (T.30-E, fax) in TIFF", by Lee Howard

Hello all.

I'm trying to get HylaFAX capable of receiving JPEG-compressed fax 
images per ITU T.30 Annex E.  So far so good, except that I cannot 
properly wrap the JPEG data into TIFF.  HylaFAX uses libtiff anyway, 
and as faxes are often multipage, storing each page in a TIFF file is a 
good way to support multipage faxes.  Thus, I need to get these JPEG 
images into a TIFF wrapper.

I've sent a color fax from a Brother MFC-3100C (to HylaFAX) and had the 
image data dumped to a file (rather than to TIFFWriteRawData as it 
would usually do).  Here is the raw, unchanged result:

   http://gateway.howardsilvan.com/fax.jpg

As I suspect is common with JPEG faxes, the SOF marker at byte 570 
doesn't indicate the image length (it's set at zero).  However, the DNL 
marker at the end of the file indicates an image length of 2128 lines.  
Most image viewers, including libjpeg do not support this ("DNL not 
supported").  So, if you fix the SOF marker to include image length, 
then most image viewers should be able to handle the image.  I've done 
this.  With a hex editor I changed the image length portion of the SOF 
marker to 2128 (changing two bytes from 0x00, 0x00 to 0x08, 0x50) to 
produce this version that should show up in most image viewers...

   http://gateway.howardsilvan.com/fax-edited.jpg

Okay, so far so good.  Now we have JPEG image data that can be viewed.  
Now I need to properly wrap it into the TIFF file.  This is where I 
have problems, and I'm hoping that some kind soul here could help out.

I don't immediately know how to analyze the JPEG image to determine the 
parameters, but following T.30-E it looks like the image should be:

   8 bits/pel/component
   4:1:1 Chrominance subsampling
   CIE Standard Illuminant D50
   Default gamut range
   200 x 200 dpi

However, the full range of possible JPEG types are discussed in T.4 
Annex E, and it may not be as I expect.  What I'm having trouble 
determining, though, is what information from the JPEG markers is 
actually needed by libtiff in the TIFF tags, and which TIFF tags need 
to be used to express that information.

Would someone kindly take a look at the URL'ed JPEG file(s) and explain 
to me which TIFF tags I need to use?  I've tried what I've thought to 
be correct, but inevitably I end up getting errors with "StripOffsets" 
and other JPEG warnings when I pass the data through tiffcp.

Thanks.

Lee.