summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-22 16:30:14 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-25 07:36:57 +0000
commit8c04534c4a9272d3b35c619d18edb34ef16e63f2 (patch)
tree6d01de01b8b5c0b674aa873e0f4c88381c768630 /vcl
parentd3f3183feeef23c8a65c2fc78a65fd5bff5df41e (diff)
Resolves: tdf#100838 no transparency support on using original jpg data path
This became a problem since... commit 76ec54e8c9f3580450bca85236a4f5af0c328588 Author: Michael Meeks <michael.meeks@collabora.com> Date: Mon Feb 8 14:24:15 2016 +0000 tdf#97662 - Try to preserve original compressed JPEGs harder. Avoiding de-compressing and re-compressing them saves lots of time too. for the default JPEG Compress + Reduce Image resolution case but appears to always be a problem with the Lossless - Reduce Image resolution case. Change-Id: I24c69a59a16d69817e402cd87f84e744ee146a66 (cherry picked from commit c72db36c7c791b1f92d3dd29fbc40c8ef168c609) Reviewed-on: https://gerrit.libreoffice.org/27446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 03ed698222b0..34d0c1b7a9b1 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -442,7 +442,8 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
Graphic aGraphic( mGraphics.front() );
mGraphics.pop_front();
- mParaInts.pop_front(); //Transparency
+ sal_Int32 nTransparency = mParaInts.front();
+ mParaInts.pop_front();
aOutputRect = mParaRects.front();
mParaRects.pop_front();
aVisibleOutputRect = mParaRects.front();
@@ -463,7 +464,15 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
aVisibleOutputRect.Right(), aVisibleOutputRect.Bottom() ) ) );
rWriter.SetClipRegion( aRect);
}
+
Bitmap aMask;
+ if (nTransparency)
+ {
+ AlphaMask aAlphaMask(aGraphic.GetSizePixel());
+ aAlphaMask.Erase(nTransparency);
+ aMask = aAlphaMask.GetBitmap();
+ }
+
SvMemoryStream aTmp;
const sal_uInt8* pData = aGfxLink.GetData();
sal_uInt32 nBytes = aGfxLink.GetDataSize();