Is QImage able to open and render pure 16-bit images?

前端 未结 5 882
伪装坚强ぢ
伪装坚强ぢ 2021-01-27 03:43

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,

5条回答
  •  被撕碎了的回忆
    2021-01-27 04:35

    Qt5.13 is supported

    here is the example

    QImage raw((uchar*)byte.data(), 480, 640, QImage::Format_Grayscale16);
    raw.save(QString("%1/depth.raw").arg(fileName));
    

    use the flag QImage::Format_Grayscale16

提交回复
热议问题