- Topics - 0
- Replies - 8
- Total Posts - 8
TWAIN spec in fact is ambiguous when it comes to bitdepth. In TW_IMAGEINFO structure, the fields, BitsPerSample and BitsPerPixel, are clearly separated — Thus for 24-bit RGB, the first will be populated with 8 for each channel, and the second will be 24. An the BitsPerPixel field is decribed as “The number of bits in each image pixel (or bit depth)”. Thus one is tempted to conclude that ICAP_BITDEPTH values should be the same as BitsPerPixel — 24 for our RGB case.
If we go though to the ICAP_BITDEPTH description in the Capabilities listing, we see that “This depth applies to all data channels (for instance, the R, G, and B channels will all have this same bit depth for RGB data).” Clearly, 24 cannot be the same 24 for all three channels. So the correct answer here is 8. And ICAP_BITDEPTH therefore represents BitsPerSample rather than BitsPerPixel.
There is no consensus between the scanner Source writers as to which interpretation is correct. So expect to see both depending upon the scanner manufacturer.