2013.09.19 22:22 "[Tiff] Convert 32 bits tiff to ascii array using LibTiff", by Qingteng Zhang

2013.09.19 22:22 "[Tiff] Convert 32 bits tiff to ascii array using LibTiff", by Qingteng Zhang

Dear All:

I'm analyzing some synchrotron x-ray diffraction data which are in the form of either 16 or 32 bits .tiff images, signed or unsigned. Although the 16 bits images can be read using 'tiff2ps', for the 32 bits ones, I got the following error:

TIFFReadDirectory: Warning, Unknown field with tag 36864 (0x9000) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36865 (0x9001) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36866 (0x9002) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36867 (0x9003) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36868 (0x9004) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36870 (0x9006) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36876 (0x900c) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36877 (0x900d) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36878 (0x900e) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36879 (0x900f) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 36880 (0x9010) encountered.

TIFFReadDirectory: Warning, Unknown field with tag 37120 (0x9100) encountered.

TIFFFetchNormalTag: Warning, ASCII value for tag "ImageDescription" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.

TIFFFetchNormalTag: Warning, ASCII value for tag "Model" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.

TIFFFetchNormalTag: Warning, ASCII value for tag "DateTime" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.

TIFFFetchNormalTag: Warning, ASCII value for tag "Artist" contains null byte in value; value incorrectly truncated during reading due to implementation limitations.

BFO_11549.tif: Can not handle 32-bit/sample image.

LIBTIFF, Version 4.0.2
Copyright (c) 1988-1996 Sam Leffler

Copyright (c) 1991-1996 Silicon Graphics, Inc.

The error message seems to be indicating that Libtiff does not have support for 32 bits .tiff image, which I'm pretty sure is not the case, since Matlab uses the same Libtiff library ('imread' function) and everything seems to be working just fine.

The question is: How can I get the same output file (ascii matrix) from 32 bits tiff files? Also, since I'm using Linux OS (Ubuntu) and Fortran as coding language, I prefer something that is command-line based. Is that possible?

Thank you so much for helping.

Jake