2003.12.23 08:32 "Re: [Tiff] undefined reference to `TIFFDataWidth'", by Andrey Kiselev
On Mon, Dec 22, 2003 at 05:59:25PM -0600, Pushkar Pradhan wrote:
I've another question too, I'm calculating the bitspersample tag from sampleformat tag, will this always give the correct result: (dType is TIFFDataType) (wtags is just a struct containing all the tags I want).
wtags.sampleFormat = dType;
wtags.bitsPerSample = TIFFDataWidth(dType)*8;
Yes, this should work right, but it is better to check value returned by the TIFFDataWidth() against 0 before using. It is possible you can get broken or esoterical TIFF with unknown sample type, in this case 0 will be returned.
Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517