diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-19 11:30:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-07-23 23:37:37 +0200 |
commit | 733ca2230c283cdfaae424eac481ddc33593f44f (patch) | |
tree | 235d10076fd80c4d1659f2b951e5b203bfe4e2b4 /src/gui/image/qimage.cpp | |
parent | b6f7efba4831c411456400e2df87df99877f67ae (diff) |
Fix comparisons of image with different color spaces
Take color space into account when comparing images, and fix gamma
comparison that was trying to be too accurate.
Change-Id: I3674653abb21b66aaacb557addc4afb4ee75cfdd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index cd2fe5bc10..7ac4b3546e 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -3834,7 +3834,9 @@ bool QImage::operator==(const QImage & i) const return false; // obviously different stuff? - if (i.d->height != d->height || i.d->width != d->width || i.d->format != d->format) + if (i.d->height != d->height || i.d->width != d->width) + return false; + if (i.d->format != d->format || i.d->colorSpace != d->colorSpace) return false; if (d->format != Format_RGB32) { |