diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-07 16:08:40 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-07 20:17:06 +0200 |
commit | 918012d94cf9419318e66aaa489a75e56f81074f (patch) | |
tree | 77e65f28f86c2a6de83bf60532159ad203d657d9 /vcl | |
parent | 4f93995f2262cde0b16bacc83f4ba3c6161ada7f (diff) |
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>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/bitmap/dibtools.cxx | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/vcl/source/bitmap/dibtools.cxx b/vcl/source/bitmap/dibtools.cxx index 78732a43f17a..c95c21704dd9 100644 --- a/vcl/source/bitmap/dibtools.cxx +++ b/vcl/source/bitmap/dibtools.cxx @@ -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; - - // create alpha mask quickly (without greyscale conversion) - aAlpha.ImplSetBitmap(aMask); - rTarget = BitmapEx(aBmp, aAlpha); - } - else - { - rTarget = BitmapEx(aBmp, aMask); - } - } - } + if(bRetval && !aMask.IsEmpty()) + rTarget = BitmapEx(aBmp, aMask); + break; } case 1: // backwards compat for old option TransparentType::Color |