Ticket #1948 (closed defect: fixed)
Update of LZW w/predictor compressed TIFF files leads to corrupted file
| Reported by: | rouault | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.4 |
| Component: | GDAL_Raster | Version: | svn-trunk |
| Severity: | normal | Keywords: | lzw libtiff gtiff predictor |
| Cc: |
Description
GDAL utilities that tries to update some LZW compressed TIFF gives wrong results. For example, nearblack on http://veimages.gsfc.nasa.gov//2433/land_shallow_topo_2048.tif will give an image looking like a 'TV without signal' (quoting Mateusz) (This bug report primarly comes from #1936)
However, this is not reproductible on all LZW compressed TIFF. If you do :
gdal_translate -co "COMPRESS=LZW" land_shallow_topo_2048.tif tmp.tif apps/nearblack tmp.tif
tmp.tif looks good.
But if you do :
gdal_translate -co "COMPRESS=LZW" -co "PREDICTOR=2" land_shallow_topo_2048.tif tmp.tif apps/nearblack tmp.tif
the result is bad. (In that case, the translated tmp.tif has roughly the same size as land_shallow_topo_2048.tif since land_shallow_topo_2048.tif has PREDICTOR=2 tag)
But tmp.tif after translating is sigificantly larger than land_shallow_topo_2048.tif
(This is maybe related to #1758 as well.)
