aboutsummaryrefslogtreecommitdiffstats
path: root/examples/pdf-invert-images.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2017-08-19 15:18:14 +0200
committerJay Berkenbilt <ejb@ql.org>2017-08-21 23:44:22 +0200
commit9744414c66e3f85700ebc8b32d90f45ff97221bd (patch)
tree47abed5c4105fe3f0089ab9afdf1d053d806b39d /examples/pdf-invert-images.cc
parentae90d2c485318beb8b4b938d09ffaf5c6f0a5e21 (diff)
downloadqpdf-9744414c66e3f85700ebc8b32d90f45ff97221bd.tar.zst
Enable finer grained control of stream decoding
This commit adds several API methods that enable control over which types of filters QPDF will attempt to decode. It also adds support for /RunLengthDecode and /DCTDecode filters for both encoding and decoding.
Diffstat (limited to 'examples/pdf-invert-images.cc')
-rw-r--r--examples/pdf-invert-images.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/pdf-invert-images.cc b/examples/pdf-invert-images.cc
index 00362091..537fd35e 100644
--- a/examples/pdf-invert-images.cc
+++ b/examples/pdf-invert-images.cc
@@ -121,7 +121,8 @@ int main(int argc, char* argv[])
// pipeStreamData with a null pipeline to determine
// whether the image is filterable. Directly inspect
// keys to determine the image type.
- if (image.pipeStreamData(0, true, false, false) &&
+ if (image.pipeStreamData(0, qpdf_ef_compress,
+ qpdf_dl_generalized) &&
color_space.isName() &&
bits_per_component.isInteger() &&
(color_space.getName() == "/DeviceGray") &&