2012.07.18 12:44 "Re: [Tiff] Problems reading TIFF with TIFFReadEncodedStrip", by Olivier Paquet
On Wed, Jul 18, 2012 at 7:01 AM, Jorge Martin <email@example.com> wrote:
As can be seen, the TIFF tags does not show any special issue,
only the 32bits per sample. The problem is when trying to read this image, I supposed that the function TIFFStripSize will return a size of 1500 (ImageWidth*RowsPerStrip*SamplesPerPixel) but it returns 6000, and I do not understand why it is obtaining this value.
Why did you expect that? Is there documentation which says that? As far as I can see, the code is meant to return the size in bytes. So it will only fit your assumption if the image has 8 bit samples.
If I read this image using TIFFReadEncodedStrip function and then
write it using TIFFWriteEncodedStrip there is no problem in the output image. But, If I try to plot the obtained buffer after read the whole image, the plot is very strange, it seems that the data in coded or something similar.
Can anybody help me in this issue?
How did you interpret the 32-bit samples? Does your image even have a sampleformat tag? It is most likely SAMPLEFORMAT_UINT but signed int or floating point are not entirely impossible either.