[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jul 22 15:46:38 UTC 2016


 vcl/source/gdi/pdfextoutdevdata.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit c72db36c7c791b1f92d3dd29fbc40c8ef168c609
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 22 16:30:14 2016 +0100

    Resolves: tdf#100838 no transparency support on using original jpg data path
    
    This became a problem since...
    
    commit 76ec54e8c9f3580450bca85236a4f5af0c328588
    Author: Michael Meeks <michael.meeks at 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

diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index abd08d8..beb198f 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();


More information about the Libreoffice-commits mailing list