summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpdf_p.h
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2018-09-07 19:16:23 +0200
committerAndre de la Rocha <andre.rocha@qt.io>2018-10-25 22:03:23 +0000
commit9cd527bc1f384926985d63c741641316a66f17a4 (patch)
treebead94ef8e91053650bdb93e87940bd16b8a0022 /src/gui/painting/qpdf_p.h
parent5ea233ca6782eb27adf596515cb66ef3dadc1d5e (diff)
Add support for generating PDFs with losslessly encoded images
This patch adds the QPainter::LosslessImageRendering flag to QPainter::RenderHints and allows QPdfEngine to recognize it and encode images using a lossless data compression algorithm provided by zlib instead of using lossy JPEG compression, which can produce artifacts with some images. Task-number: QTBUG-54809 Change-Id: If9e2bc64da3bf3afcd5d6c74f0ee82336ef05a19 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/painting/qpdf_p.h')
-rw-r--r--src/gui/painting/qpdf_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h
index 5a909f2ede..4868f064c7 100644
--- a/src/gui/painting/qpdf_p.h
+++ b/src/gui/painting/qpdf_p.h
@@ -241,7 +241,7 @@ public:
void writeHeader();
void writeTail();
- int addImage(const QImage &image, bool *bitmap, qint64 serial_no);
+ int addImage(const QImage &image, bool *bitmap, bool lossless, qint64 serial_no);
int addConstantAlphaObject(int brushAlpha, int penAlpha = 255);
int addBrushPattern(const QTransform &matrix, bool *specifyColor, int *gStateObject);