diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2012-07-24 15:23:49 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-29 16:53:00 +0200 |
commit | c1e5f600abaee393e66fb04e2038bc97d82851ef (patch) | |
tree | 402474ef017437e1dfe0b2e89da0c85627a17c6e /src/gui/painting/qdrawhelper_p.h | |
parent | f3b45ffa6159bc8b7ecfb0578bbb5cb826de1338 (diff) |
Made QImage::fill(uint pixel) for RGB888 accept QRgb values.
Previously QImage::fill() for Format_RGB888 expected a BGR value
instead of the RGB order defined by QRgb, making it counter intuitive to
use related to the 32-bit formats.
Fixed the QPixelLayout data for RGB888 and changed the byte order of
quint24 based on what the optimized image conversion routines expect.
Change-Id: I72926debbc6f5b5cb10b8aa0b2a2a916a04db946
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
Diffstat (limited to 'src/gui/painting/qdrawhelper_p.h')
-rw-r--r-- | src/gui/painting/qdrawhelper_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h index ec9efcd49a..5df2b1f6fa 100644 --- a/src/gui/painting/qdrawhelper_p.h +++ b/src/gui/painting/qdrawhelper_p.h @@ -677,14 +677,14 @@ struct quint24 { inline quint24::quint24(uint value) { - data[0] = uchar(value); + data[0] = uchar(value >> 16); data[1] = uchar(value >> 8); - data[2] = uchar(value >> 16); + data[2] = uchar(value); } inline quint24::operator uint() const { - return data[0] | (data[1] << 8) | (data[2] << 16); + return data[2] | (data[1] << 8) | (data[0] << 16); } template <class T> |