Opened 22 years ago

Last modified 21 years ago

#198 closed defect (fixed)

gdaladdo tiff and packbits

Reported by: dfinnegan@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: major Keywords:
Cc: keon@…

Description

I am working with one of you GDAL routines gdaladdo and trying to create 
overview layers from an 8bit tiff file that has packbit compression and a .tfw 
file, which are being used in a Mapserver application. It seems the routine 
does not like the packbits and gives me an error when trying to build the 
overviews. Is there a workaround for this? Or possibly in the near future will 
the routine support compressed tiff images?

Change History (3)

comment:1 by warmerdam, 22 years ago

Problem confirmed.  GDAL (or libtiff?) won't let compressed files be opened for
update, and without update access we can't add overviews. 


comment:2 by keon@…, 21 years ago

*** Bug 271 has been marked as a duplicate of this bug. ***

comment:3 by warmerdam, 21 years ago

OK, I have made the following changes:

 o libtiff/tif_open.c no longer produces an error if you try to open a 
   compressed TIFF file in update mode.  
 o libtiff/tif_write.c does produce an error if you try to write blocks to
   a pre-existing compressed TIFF image. 

With this change gdaladdo works fine on compressed TIFF files, but attempts to
update the image in place will fail reasonably gracefully with an error message.

The change is available in the libtiff CVS and will go into libtiff 3.6.0 final
(not in Beta).  I have also migrated the fix into the internal libtiff in
GDAL, so a GDAL build with --with-libtiff=internal should include the fix
immediately.


Note: See TracTickets for help on using tickets.