vcl/source/gdi/pdfextoutdevdata.cxx |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 0c937f5d692477371bf2fe367a710f0899e36c33
Author: Marco Cecchetti
Date: Fri Nov 25 10:23:31 2016 +0100
tdf#101458 - check PNG for adequate compression
Change-Id: I7131d3b721ebb4d47b0bb43f09fcb9767f8ac6d8
Reviewed-on: https://gerrit.libreoffice.org/31190
Reviewed-by: Marco Cecchetti
Tested-by: Marco Cecchetti
(cherry picked from commit d96781383747299443f61e027285d54ffd5bc5c8)
Reviewed-on: https://gerrit.libreoffice.org/31412
(cherry picked from commit 1fd5c8080c47e75fff4aa377540ced29142da146)
Reviewed-on: https://gerrit.libreoffice.org/31605
Reviewed-by: Michael Meeks
Reviewed-by: Eike Rathke
Tested-by: jan iversen
Reviewed-by: jan iversen
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx
b/vcl/source/gdi/pdfextoutdevdata.cxx
index 1a58c90..811d618 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -420,9 +420,10 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter,
sal_uInt32& rCurGDIMtfAc
if ( !mbGroupIgnoreGDIMtfActions )
mCurrentGraphic = rGraphic;
}
-else if ( eType == GFX_LINK_TYPE_NATIVE_PNG )
+else if ( eType == GFX_LINK_TYPE_NATIVE_PNG &&
mParaRects.size() >= 2 )
{
-mCurrentGraphic = rGraphic;
+if (
rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
+mCurrentGraphic = rGraphic;
}
}
break;
@@ -805,7 +806,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const
Graphic &rGraphic,
{
bool bReduceResolution = false;
-assert( rGraphic.IsLink() && rGraphic.GetLink().GetType() ==
GFX_LINK_TYPE_NATIVE_JPG );
+assert( rGraphic.IsLink() && (rGraphic.GetLink().GetType() ==
GFX_LINK_TYPE_NATIVE_JPG || rGraphic.GetLink().GetType() ==
GFX_LINK_TYPE_NATIVE_PNG));
// small items better off as PNG anyway
if ( rGraphic.GetSizePixel().Width() < 32 &&
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits