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:
@@ -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
|
||||
|
Reference in New Issue
Block a user