diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 16:30:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-07-22 16:46:10 +0100 |
commit | c72db36c7c791b1f92d3dd29fbc40c8ef168c609 (patch) | |
tree | 4f42245f76894deee0ef9f61bedf34e824299830 /vcl | |
parent | d7da58ae362b661c03fc754e4e8f4a89798b0127 (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
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfextoutdevdata.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index abd08d88f472..beb198f52f27 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(); |