Writing 10,12 bit TIFF files with LibTIFF C++
问题 I'm trying to write 10,12 bit RGB TIFF files with LibTIFF. The pixel data is saved locally in an unsigned short buffer (16bits) 1) If I set TIFFTAG_BITSPERSAMPLE to 10 or 12, not enough bits are being read from the buffer, and the output is incorrect. (I understand that it is just reading 10 or 12 bits per component, instead of 16 and this is the problem) 2) I tried packing the bits in the buffer, so that it is really 12-R, 12-G, 12-B. In this case, I think the file is being written correctly