[gdal-dev] TIFF overviews issue

Fabian Schindler fabian.schindler at eox.at
Fri Nov 30 07:21:59 PST 2012


Dear devs,

I'm experiencing an strange issue concerning overviews when I try to add 
overviews via Python. Essentially I want to create overviews for 
Greyscale images encoded in RGB, but on one overview level I always get 
colored pixels in a specific rectangle area of the image.

I created the boiled down test script to demonstrate what I am doing 
(create RGB grey image of certain size, save it to disk and apply 
overviews) which is available in the attachment. The script is called 
like that: `python test_overviews.py out.tif`

In my case I could see the colorfull overviews in QGIS (or MapServer 
WMS) if I zoomed out a little. A screenshot of QGIS with the image can 
be found in the attachment.

Strangely, I only have this issue on CentOS 6.3 (gdal 1.9.1, libgeotiff 
1.4.0, libtiff 3.9.4) but not on my host Ubuntu 12.10 system (gdal 
1.9.2, libgeotiff2 1.3.0, libtiff 4.0.2).

I tried different interpolation methods for the `BuildOverviews` 
function, with no effect. If I remove the level `2` or `4` from my level 
list, the effect does *not* show. A different image size results in a 
different colour and position of the rectangle and sometimes the 
rectangle is not visible at all.

The issue is the same when I use `gdaladdo out_no_ovr.tif 2 4 8 16`.

Any idea on this?

Regards,
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.png
Type: image/png
Size: 445 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121130/9580c40c/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_build_overviews.py
Type: text/x-python
Size: 498 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20121130/9580c40c/attachment.py>


More information about the gdal-dev mailing list