[gdal-dev] TIFFMergeFieldInfo error when adding overviews to large tiff

Even Rouault even.rouault at mines-paris.org
Tue Apr 16 14:11:22 PDT 2013


Le mardi 16 avril 2013 22:07:52, Eli Adam a écrit :
> Even,
> 
> Thanks for checking into this and the ideas.

I've investigated a bit and I've discovered that while computing overviews, 
libtiff constantly switches from TIFF "directories" (main image, first 
overview,second overview, etc...). While doing this, it calls each time client 
code to install its own TIFF tags (libgeotiff for the geotiff tags, GDAL for the 
GDAL specific TIFF tags), but doesn't reset its array of existing tags. So each 
time the tags are added again and again, hence the huge memory allocation.

Could you test the attached patch (assuming you build GDAL with internal 
libtiff) ?

It would be good if you could also open a ticket in Trac about that issue.

Even

> 
> Eli
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libtiff_fix_growing_customfields.patch
Type: text/x-patch
Size: 1004 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130416/a38789d3/attachment.bin>


More information about the gdal-dev mailing list