On Wednesday 11 January 2006 23:47, Hal V. Engel wrote: > exactly what is going on. QImage can handle bit depths greater than 8 > bit/channel and defaults to a pixel bit depth of 32 (which is really 10 > bit/channel). This is also the max bit depth it supports. The > constructor for QImage is: > > QImage::QImage ( int w, int h, int depth, int numColors = 0, Endian > bitOrder = IgnoreEndian ) > > Where depth can be 1, 8, 16 or 32. > > When I print out image.depth() for the QImage being used by the picker it > is 32 bits. But in the loop that is picking the values if I filter out all > rgb values < 255 I don't get anything. So QImage is effectively remapping > the 16 bit/channel image as an 8 bit/channel image. >
Yes, and it's not better in Qt4 :-(. However, if you need 16 bit/channel images you might either try to reuse the Krita image/colorspace library or digikam's dimg. Krita's core code has been refactored to libraries that should be reusable outside KOffice, and digikam's dimg is pretty independent, too. -- Boudewijn Rempt http://www.valdyas.org/fading/index.cgi
pgpMzXtqBHULr.pgp
Description: PGP signature