2008.02.13 22:45 "[Tiff] 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