summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-05-12 14:04:30 -0400
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-15 19:54:38 +0200
commit73b552139906e10f004bd56e53684cceed071bd6 (patch)
tree14b89c29093deabf944d64a48d7457d3a4b44dd4 /sd
parentabd90828cf101581a07b9d1c371a8c3156521e9f (diff)
tdf#160690 set an opaque alpha mask for non-transparent frames
Due to the switch from transparency to alpha in commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, an empty alpha mask is treated as a completely transparent bitmap. So revert all of the previous commits for tdf#157576, tdf#157635, and tdf#157793 and create a completely opaque bitmap instead. Note: this fix also fixes tdf#157576, tdf#157635, and tdf#157793. Change-Id: Ic2ccad6ab94e4d43b1b66013f85955d474dc0151 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167563 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Tested-by: Jenkins (cherry picked from commit 2a9eb581f0edfae8123018006df5cc9de1e1fd45) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167674 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/PNGExportTests.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/qa/unit/PNGExportTests.cxx b/sd/qa/unit/PNGExportTests.cxx
index 855c3becfd47..69343b8b208d 100644
--- a/sd/qa/unit/PNGExportTests.cxx
+++ b/sd/qa/unit/PNGExportTests.cxx
@@ -483,21 +483,21 @@ CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157793)
CPPUNIT_ASSERT_EQUAL(Size(100, 100), aSize);
Bitmap aBMP = aBMPEx.GetBitmap();
BitmapScopedReadAccess pReadAccess(aBMP);
- int nLightGrayCount = 0;
+ int nWhiteCount = 0;
for (tools::Long nX = 1; nX < aSize.Width() - 1; ++nX)
{
for (tools::Long nY = 1; nY < aSize.Height() - 1; ++nY)
{
const Color aColor = pReadAccess->GetColor(nY, nX);
- if (aColor == 0xfefefe)
- ++nLightGrayCount;
+ if (aColor == 0xffffff)
+ ++nWhiteCount;
}
}
// Without the fix in place, this test would have failed with
// - Expected greater than: 7800
// - Actual : 0
- CPPUNIT_ASSERT_GREATER(7800, nLightGrayCount);
+ CPPUNIT_ASSERT_GREATER(7800, nWhiteCount);
}
CPPUNIT_TEST_FIXTURE(SdPNGExportTest, testTdf157635)