[Gdal-dev] Writing 8-bit TIFFs using JPEG compression

Frank Warmerdam warmerdam at pobox.com
Fri May 18 12:35:44 EDT 2007


Ray Gardener wrote:
> Has anyone been able to write 8-bit grayscale TIFFs using JPEG 
> compression? I'm running into an issue where libtiff aborts because the 
> photometric interpretation is invalid, even if min_is_black is used. 
> Seems the JCS_GRAYSCALE flag never gets set by the driver. Using the 
> JPEG driver itself is okay.

Ray,

I just tried it and it seemed to work, though I see the following
debug message, which I find suspicious:

GTiff: Setting JPEGCOLORMODE_RGB

Some of the jpeg stuff is very sensitive to the version of libtiff.  Are you
using the builtin libtiff?  The last public release?  libtiff-3.9 from CVS?

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list