diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-11 08:54:37 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-12 17:38:53 +0100 |
commit | d765ec2295d12ccde1fb25aa92c5d821de748add (patch) | |
tree | c2f806389478df23b78319c6043971f92995851c /vcl/source/bitmap/BitmapTools.cxx | |
parent | a1d6701105456248f6ff39766a6699f26a8f3d60 (diff) |
transparency->alpha in tools::Color
this just changes the Get/Set methods, the constructor and internal
representation of Color is not changed.
Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/bitmap/BitmapTools.cxx')
-rw-r--r-- | vcl/source/bitmap/BitmapTools.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/bitmap/BitmapTools.cxx b/vcl/source/bitmap/BitmapTools.cxx index 3c654aaf6980..e4b03cb9de76 100644 --- a/vcl/source/bitmap/BitmapTools.cxx +++ b/vcl/source/bitmap/BitmapTools.cxx @@ -1101,7 +1101,7 @@ bool convertBitmap32To24Plus8(BitmapEx const & rInput, BitmapEx & rResult) { const BitmapColor aColor = pReadAccess->GetPixelFromData(aReadScan, nX); BitmapColor aResultColor(aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue()); - BitmapColor aResultColorAlpha(aColor.GetTransparency(), aColor.GetTransparency(), aColor.GetTransparency()); + BitmapColor aResultColorAlpha(255 - aColor.GetAlpha(), 255 - aColor.GetAlpha(), 255 - aColor.GetAlpha()); pResultBitmapAccess->SetPixelOnData(aResultScan, nX, aResultColor); pResultAlphaAccess->SetPixelOnData(aResultScanAlpha, nX, aResultColorAlpha); |