问题描述
我认为标题已经解释了我想知道的内容。
有没有办法打开并保存带有Qt的16位图像?我并不是说3 * 8 = 24bit或4 * 8 = 32bit,与纯8位图像完全相同,我的意思是R,G和B的纯16位。
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.
推荐答案
与Patrice所说的相反, QImage
中每个组件格式没有16位。你能得到的最多是 QImage :: Format_ARGB32
,每个组件8位。即使您使用8位索引模式,颜色表也不支持每个组件超过8位。此外, QImageIOHandler
类的工作原理是 QImage
,因此您无法创建自定义图像格式插件来工作不幸的是,每个颜色分量有16位。
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.
这篇关于QImage能够打开并呈现纯16位图像吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!