Perfect, your workaround works for me.
As I'm mostly dealing with small fairly small images, the performance decrease may not be a concern for me. I'll stick with this solution until I can definitely say that the target system has libtiff 4.0.

Thanks Even!


On 12/01/2012 11:37 AM, Even Rouault wrote:
I can also reproduce with libtiff 3.9.2. libtiff 3.X suffers sometimes from
some problems when generating overviews in a interleaved way, as it is
done by BuildOverviews("NEAREST", [2,4,8,16]). Those problems have been
corrected in libtiff 4.0

A way to workaround this is to generate each overview level one after
another one, like this :

out_ds.BuildOverviews("NEAREST", [ 2 ])
out_ds.BuildOverviews("NEAREST", [ 4 ])
out_ds.BuildOverviews("NEAREST", [ 8 ])
out_ds.BuildOverviews("NEAREST", [ 16 ])

This will work on both libtiff 3.X and libtiff 4.0. Note that it might
perform a little less than generating all the levels in a single
instruction, since the source data must be read several times.
In the libtiff 3.X case, I've just implemented in GDAL trunk the workaround in
the GTiff driver
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to