| commit | b8766a1555fe644fb7dabdfa943e84f6704c9cee | [log] |
|---|---|---|
| author | Noel Grandin <noelgrandin@gmail.com> | Sun Sep 13 13:56:49 2020 +0200 |
| committer | Noel Grandin <noel.grandin@collabora.co.uk> | Sun Sep 13 20:44:25 2020 +0200 |
| tree | eb3bd049736946ebd15f69870b248f50f6fbec12 | |
| parent | f35a95ff215203fc6bd0f943125283610c95ce3f [diff] |
tdf#132561 fix png export from Draw fixes a regression from commit 61e8387fa8ab55a04b95839c7c385c163d6de1cd tdf#128992 Compressing PNG files with alpha channel get a black background Change-Id: I8a225f76072c49f64393bb4b28c4d92c6e85587e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102548 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit b732e63a0a4b4dcf74995adf7b679d12ecc09db5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102567
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index bc41530..da077466 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -197,7 +197,14 @@ bool JPEGWriter::Write( const Graphic& rGraphic ) mxStatusIndicator->start( OUString(), 100 ); } Bitmap aGraphicBmp( rGraphic.GetBitmapEx().GetBitmap(COL_WHITE) ); // This slightly weird logic is here to match the behaviour in ImpGraphic::ImplGetBitmap // and is necessary to match pre-existing behaviour. We should probably pass down the expected // background color for alpha from the higher layers. Bitmap aGraphicBmp; if (rGraphic.GetType() == GraphicType::Bitmap) aGraphicBmp = rGraphic.GetBitmapEx().GetBitmap(COL_WHITE); else aGraphicBmp = rGraphic.GetBitmapEx().GetBitmap(); if ( mbGreys ) {