I think the headline already explains what I want to know.
Is there a possible way to open and save images with 16-bit with Qt? And I don't mean the 3*8=24bit or 4*8=32bit, what is quite the same as a pure 8-bit image, I mean pure 16-bit for R, G and B.
views:
154answers:
2
+2
A:
There are enums in the Format enum that allow QImage
to load and save 16-bit per component images: http://qt.nokia.com/doc/4.5/qimage.html#Format-enum. So yes you can.
Patrice Bernassola
2009-12-04 10:36:52
This information is outdated, please refer to the latest Qt documentation.
Intransigent Parsnip
2009-12-04 11:02:10
You are right, I did not see it was version 4.0. I update.
Patrice Bernassola
2009-12-04 12:12:46
Try one more time, http://qt.nokia.com/doc/4.6/qimage.html#Format-enum 4.6 is current.
Adam W
2009-12-06 15:16:06
+1
A:
Contrary to what Patrice says, there is no 16 bits per component format in QImage
. The most you can get is QImage::Format_ARGB32
at 8 bits per component. Even if you used 8 bits indexed mode, the color tables do not support more than 8 bits per component. Moreover, the QImageIOHandler
class works in terms of QImage
, so you cannot create a custom image format plug-in to work with 16 bits per color component, unfortunately.
andref
2009-12-06 15:06:04
QImage::Format_RGB16 The image is stored using a 16-bit RGB format (5-6-5).
Adam W
2009-12-06 15:17:14
If I understood it correctly, Berschi wants 16 bits for each of R, G, and B, 48 bits in total, 64 if alpha is also needed. The format you mention allocates 5 bits for R, 6 for G (which is smart, since our eyes are more sensitive to green) and 5 for B, 16 bits in total.
andref
2009-12-06 16:32:24
so thanks for the answer, 16 bit for each, that's what I want, and unfortunately this is not supported :(
Berschi
2009-12-07 10:31:09