alicevision / QtOIIO

Qt Image IO plugin based on OpenImageIO.
http://www.openimageio.org
Other
41 stars 15 forks source link

Use the new 16 bits Qt images #12

Closed fabiencastan closed 4 years ago

fabiencastan commented 4 years ago

Description

Use the newly available 16 bits Qt Image formats: QImage::Format_RGBA64, QImage::Format_RGBX64, QImage::Format_Grayscale16. See https://doc.qt.io/qt-5/qimage.html#Format-enum

Implementation remarks

The documentation is a bit ambiguous about the layout: The image is stored using a 64-bit halfword-ordered RGBA format (16-16-16-16). (added in Qt 5.12) so we use QRgba64::fromRgba64 to hide the internal layout (instead of copying the full oiio buffer into the internal QImage buffer as we do for 8bits images).