diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-04 15:17:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-23 11:54:09 +0200 |
commit | 5d94aac2bae8bdbf8de7cebeb6a1a17a81685f0a (patch) | |
tree | 6395aa6671479a7e4f0637cbb214fd52666e2db3 /src/gui/image/qpnghandler.cpp | |
parent | a4a11987089b1558b5b50a0d38c3263bb25818d7 (diff) |
Introduce QImage::Format_BGR888
Is pretty common on some architectures so we can avoid swizzling by
supporting it.
Fixes: QTBUG-45671
Change-Id: Ic7a21b5bfb374bf7496fd2b2b1252c2f1ed47705
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image/qpnghandler.cpp')
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 16d6c25b8b..4ab45337b0 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -1079,6 +1079,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i if (color_type == PNG_COLOR_TYPE_RGB) { switch (image.format()) { case QImage::Format_RGB888: + case QImage::Format_BGR888: break; case QImage::Format_RGBX8888: case QImage::Format_RGBX64: @@ -1131,6 +1132,7 @@ bool QPNGImageWriter::writeImage(const QImage& image, volatile int compression_i case QImage::Format_RGB32: case QImage::Format_ARGB32: case QImage::Format_RGB888: + case QImage::Format_BGR888: case QImage::Format_RGBX8888: case QImage::Format_RGBA8888: case QImage::Format_RGBX64: |