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
February 2008

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

2008.02.13 22:45 "12 bit jpeg", by Joel Wilson
2008.02.13 23:50 "Re: 12 bit jpeg", by Frank Warmerdam

2008.02.13 22:45 "12 bit jpeg", by Joel Wilson

I am trying to implement 12 bit jpeg and have run into some issues.  I
am using the mk1-branch version of libjpeg.  I made some minor changes
to tif_jpeg.c and jcofig.h to get it to build with visual studio 9.
When I try to compress a 12 bit image I receive this error.

            JPEGLib: Missing Huffman code table entry

I found a post that suggested to change line 1345 of tif_jpeg.c from 

if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF ) 

to

            if( (sp->jpegtablesmode & JPEGTABLESMODE_HUFF  &&
sp->tif->tif_dir.td_bitspersample == 8 ))

This did allow the compression to run, but the resulting image shows up
as all green with some detail in the background.  I am trying to match
Intergraph's 12 bit jpeg compressed imagery.  It appears that the
problem is that my jpeg table is a third the size of when I run it with
the Intergraph software.  Does anyone have any suggestions?

Joel