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
July 2004

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

2004.07.21 05:28 "JPEG Compression Support", by Jean Paul Mir V
2004.07.22 19:47 "Re: JPEG Compression Support", by Andrey Kiselev
2004.07.22 20:31 "Re: JPEG Compression Support", by Fernando Loygorri
2004.07.22 20:41 "Re: JPEG Compression Support", by Andrey Kiselev
2004.07.22 20:52 "Re: JPEG Compression Support", by Joris Van Damme
2004.07.22 21:19 "Re: JPEG Compression Support", by Jason Summers

2004.07.21 05:28 "JPEG Compression Support", by Jean Paul Mir V

Hi,

I'm working on a C++ ATL component for TIFF conversion to PCL, PS And PDF.
Actually I have completed TiffToPCL and TiffToPS translation based on
tiff2ps and tifftopcl tools of libtiff.

Everything works fine until I started using Grayscale and Color Images using
JPEG compression. After many errors I successfully created libtiff.lib, but
when I tried to convert the file using my ATL I got so many errors regarding
unrecognized tags and so on. One of those alerts saids "Old-Style JPEG
Support is not installed"... then I enabled OJPEG compression and recompile
it again.

At this time I got an error like "..._ jpeg_reset_huff_decode
unrecognized... " or something like that...

I searched on internet and found an article saying that I would need to
patch libtiff to add OJPEG support to the library.. I could not patch the
library but I found the missing function:

GLOBAL(void)
 jpeg_reset_huff_decode (register j_decompress_ptr cinfo)
 { register huff_entropy_ptr entropy = (huff_entropy_ptr)cinfo->entropy;
   register int ci = 0;
 
   /* Discard encoded input bits, up to the next Byte boundary */
   entropy->bitstate.bits_left &= ~7;
   /* Re-initialize DC predictions to 0 */
   do entropy->saved.last_dc_val[ci] = 0; while (++ci <
   cinfo->comps_in_scan);
 }

I just copy-paste it into jduff.c and then the compilation ends up
successfully.

Once I got the library and my DLL compiled(after Library compilation), I
tried to convert a JPEG Compressed tiff file to a PCL file and all I got is
a full of gray lines page.

Could someone tell me how could I build propertly the library with support
for JPEG and OJPEG compression ???

Thanks in advance!