simplify code

The BitmapEx constructor already does this check, no need to do it here

Change-Id: Iacd0e1b1d4aa3dfae120e0d4a60a6924ecd9f778
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151460
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2023-05-07 16:08:40 +02:00
parent 4f93995f22
commit 918012d94c

View File

@@ -1670,25 +1670,9 @@ bool ReadDIBBitmapEx(
bRetval = ImplReadDIB(aMask, nullptr, rIStm, true);
if(bRetval)
{
if(!aMask.IsEmpty())
{
// do we have an alpha mask?
if (aMask.getPixelFormat() == vcl::PixelFormat::N8_BPP && aMask.HasGreyPalette8Bit())
{
AlphaMask aAlpha;
if(bRetval && !aMask.IsEmpty())
rTarget = BitmapEx(aBmp, aMask);
// create alpha mask quickly (without greyscale conversion)
aAlpha.ImplSetBitmap(aMask);
rTarget = BitmapEx(aBmp, aAlpha);
}
else
{
rTarget = BitmapEx(aBmp, aMask);
}
}
}
break;
}
case 1: // backwards compat for old option TransparentType::Color