[gdal-dev] JPEG compression in TIF doesn't work

Smith, Michael Michael.Smith at maine.gov
Fri Dec 19 13:56:33 EST 2008


I have an 8-bit tif aerial photo, when I try to compress it with JPEG
compression in any of the following examples:

gdal_translate -ot Byte -of GTiff -co "COMPRESS=JPEG" -co
"JPEG_QUALITY=100" allagash-lake.tif test_jpeg100_tif.tif
gdal_translate -ot Byte -of GTiff -co "COMPRESS=JPEG" -co
"JPEG_QUALITY=20" allagash-lake.tif test_jpeg20_tif.tif
gdal_translate -ot Byte -of GTiff -co "COMPRESS=JPEG" allagash-lake.tif
test_jpeg_tif.tif

I get the error message:

Warning 1: JPEGLib:Application transferred too many scanlines

And there is a small part at the bottom where the rows are all value 0
(and they shouldn't be).  Looks like it skips the last 11 rows and sets
them all to 0 (in an image that is 9728c x 13963r)

**********
Michael Smith
State GIS Manager
Maine Office of GIS 


More information about the gdal-dev mailing list