summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-19 16:06:21 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-24 09:33:51 +0200
commit91b7d53154b84e41c8ec2aa04ce4777cdd138720 (patch)
tree91f979188d04463e5451e3455b174bf98623dfea /src/gui/image
parent44a381087eba209c318104f5b027728b9f8db86e (diff)
Fix QPixelFormat values
The two mono formats are actually indexed and may have both color and alpha values in the color-table, and Format_ARGB4444_Premultiplied and Format_ARGB6666_Premultiplied both have the alpha value in the end. Change-Id: I7f1efb2213710f5eb628d71356f9c8ed75b50f4d Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 32c81e39fa..d2c3c41812 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4662,7 +4662,7 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
//QImage::Format_Invalid:
QPixelFormat(),
//QImage::Format_Mono:
- QPixelFormat(QPixelFormat::Grayscale,
+ QPixelFormat(QPixelFormat::Indexed,
/*RED*/ 1,
/*GREEN*/ 0,
/*BLUE*/ 0,
@@ -4675,7 +4675,7 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
/*INTERPRETATION*/ QPixelFormat::UnsignedByte,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
//QImage::Format_MonoLSB:
- QPixelFormat(QPixelFormat::Grayscale,
+ QPixelFormat(QPixelFormat::Indexed,
/*RED*/ 1,
/*GREEN*/ 0,
/*BLUE*/ 0,
@@ -4787,7 +4787,7 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
/*FIFTH*/ 0,
/*ALPHA*/ 6,
/*ALPHA USAGE*/ QPixelFormat::UsesAlpha,
- /*ALPHA POSITION*/ QPixelFormat::AtBeginning,
+ /*ALPHA POSITION*/ QPixelFormat::AtEnd,
/*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
/*INTERPRETATION*/ QPixelFormat::UnsignedInteger,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),
@@ -4852,7 +4852,7 @@ static Q_CONSTEXPR QPixelFormat pixelformats[] = {
/*FIFTH*/ 0,
/*ALPHA*/ 4,
/*ALPHA USAGE*/ QPixelFormat::UsesAlpha,
- /*ALPHA POSITION*/ QPixelFormat::AtBeginning,
+ /*ALPHA POSITION*/ QPixelFormat::AtEnd,
/*PREMULTIPLIED*/ QPixelFormat::Premultiplied,
/*INTERPRETATION*/ QPixelFormat::UnsignedShort,
/*BYTE ORDER*/ QPixelFormat::CurrentSystemEndian),