Thursday 1 June 2017

python - How can I retrieve private tag GDAL_NODATA from a TIFF using libtiff?



In an earlier post I reported about my attempts to read TIFF with data stored in tiles using python and libtiff. First I tried to use libtiff's function TIFFReadEncodedTile but finally I tried function TIFFReadTile. I have been able to make progress now. The question I have today: how can I retrieve the value of private / custom tag GDAL_NODATA. Both GDAL and ArcGIS make use of this tag. I've seen examples of how to do this in C++ and C#. I still wonder how to do this in Python though. I guess it would be possible by means of the class TIFFExtender and the function add_tags - both defined in module libtiff_ctypes. Could anybody provide an example?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...