Before anything else make a working copy of the file. This is what I would do
Find a hexeditor and try to verify if the missing data is indeed in the file. (Can it be overwritten by other tags etc? ) If the file contains the data you might be able to patch the length in the appropriate tag with the hexeditor. Or you might need to adjust the size 8 16 32 bit, if the error is not in the length. If patching does not work you might need to extract the data e.g. with a python script. Find begin end of the array and write it as binary or convert to CSV whatever suits. On Tue, 5 Apr 2022, 15:34 , <[email protected]> wrote: > > > Hi libtiff gurus, I have stuck on a nasty problem. We need to add support > for reading some proprietary TIFF files containing some binary integer > arrays in custom extension tags. The problem is they have not followed the > TIFF standard for encoding the array length and thus the arrays are > actually twice longer in the file than is known to libtiff, so when I read > them in I only get first half of the array. > > > > No problem, I thought: I get the value count and pointer to raw data out > of the TIFFGetField(), and then just multiply this value count by 2 before > reading in the raw data array. Alas, this does not work, it appears libtiff > has copied the array away somewhere else, so I get just garbage if I > attempt to read more than the official length. Hence my question: is it > possible to somehow read in twice the data from the original array location > inside the file, or to otherwise convince libtiff somehow that the array is > twice larger than encoded in the IFD entry? > > > > TIA > > Paavo > _______________________________________________ > Tiff mailing list > [email protected] > https://lists.osgeo.org/mailman/listinfo/tiff >
_______________________________________________ Tiff mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/tiff
