diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-19 12:53:10 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-08-20 17:10:19 +0200 |
commit | 9e86fdb6e8004a0eba7d5f4b9a7b1f52275fd207 (patch) | |
tree | 65b1ee8e70e2ad1bdbc7d8c9361c8dded108af04 /tests/auto/gui/image/qimagereader/tst_qimagereader.cpp | |
parent | aa6e0e3e30ec7f330e2fbc02fc9fbe55ef0b6432 (diff) |
Support writing color space profile in JPEG
That way the image formats with color space supports all have both read
and write support.
Change-Id: Ib52ebd56192c4a8a0897a6afc7c4a26020319270
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/auto/gui/image/qimagereader/tst_qimagereader.cpp')
-rw-r--r-- | tests/auto/gui/image/qimagereader/tst_qimagereader.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp index 866a41c3d1..eeabfd0413 100644 --- a/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp +++ b/tests/auto/gui/image/qimagereader/tst_qimagereader.cpp @@ -1914,6 +1914,13 @@ void tst_QImageReader::saveColorSpace() QCOMPARE(stored, orig); QCOMPARE(stored.colorSpace(), orig.colorSpace()); + + buf.open(QIODevice::WriteOnly); + QVERIFY(orig.save(&buf, "jpeg")); + buf.close(); + stored = QImage::fromData(buf.buffer(), "jpeg"); + + QCOMPARE(stored.colorSpace(), orig.colorSpace()); } void tst_QImageReader::readText_data() |