PixelBuffer: versions to create independent copies into QImage

This commit is contained in:
Matthias Koefferlein
2022-05-04 21:16:10 +02:00
parent f51fac5f0f
commit 5fa984324e
3 changed files with 57 additions and 1 deletions
@@ -237,6 +237,15 @@ TEST(2)
tl::info << "PNG file read from " << au;
EXPECT_EQ (compare_images (qimg, au), true);
qimg = img.to_image_copy ();
img.fill (false);
tmp = tmp_file ("test2.png");
qimg.save (tl::to_qstring (tmp));
tl::info << "PNG file written to " << tmp;
EXPECT_EQ (compare_images (qimg, au), true);
}
#endif
@@ -428,6 +437,15 @@ TEST(12)
tl::info << "PNG file read from " << au;
EXPECT_EQ (compare_images_mono (qimg.convertToFormat (QImage::Format_Mono), au), true);
qimg = img.to_image_copy ();
img.fill (false);
tmp = tmp_file ("test2.png");
qimg.save (tl::to_qstring (tmp));
tl::info << "PNG file written to " << tmp;
EXPECT_EQ (compare_images_mono (qimg.convertToFormat (QImage::Format_Mono), au), true);
}
#endif