From 3acd4b546ded7523f65d60cee6f3809113a91a16 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 26 May 2014 12:07:18 +0200 Subject: QImage support for RGB30 formats Adds basic support for 10-bit per color channel formats to QImage and the XCB plugin. This will make it possible to paint to and from these formats, but only at 8-bit per color channel accuracy. This also fixes Qt5 applications on X11 with native 30bit depth. [ChangeLog][QtGui][QImage] Added support for 10-bit per color channel image formats. Task-number: QTBUG-25998 Change-Id: I93ccd3c74bfbb0bd94b352476e5fe58a94119e1f Reviewed-by: Gunnar Sletta --- src/gui/image/qppmhandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/image/qppmhandler.cpp') diff --git a/src/gui/image/qppmhandler.cpp b/src/gui/image/qppmhandler.cpp index 39f63a620c..64eaf7f19e 100644 --- a/src/gui/image/qppmhandler.cpp +++ b/src/gui/image/qppmhandler.cpp @@ -275,6 +275,8 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy case QImage::Format_RGB888: case QImage::Format_RGB444: case QImage::Format_RGBX8888: + case QImage::Format_BGR30: + case QImage::Format_RGB30: image = image.convertToFormat(QImage::Format_RGB32); break; case QImage::Format_ARGB8565_Premultiplied: @@ -283,6 +285,8 @@ static bool write_pbm_image(QIODevice *out, const QImage &sourceImage, const QBy case QImage::Format_ARGB4444_Premultiplied: case QImage::Format_RGBA8888: case QImage::Format_RGBA8888_Premultiplied: + case QImage::Format_A2BGR30_Premultiplied: + case QImage::Format_A2RGB30_Premultiplied: image = image.convertToFormat(QImage::Format_ARGB32); break; default: -- cgit v1.2.3