mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-11 07:30:57 +00:00
Add test validating that images in nested XObjects are included in optimization
The sample file (nested-images.pdf) includes a pdf with an image that is nested within an XObject within an XObject in the Resources dict of the only page. These images were ignored in prior versions of qpdf.
This commit is contained in:
parent
8de2497a8f
commit
f6b13fcc05
@ -33,6 +33,8 @@ my @image_opt = (
|
||||
['large-inline-image', 'inline-images-keep-all', '--keep-inline-images'],
|
||||
['unsupported-optimization', 'unsupported',
|
||||
'--oi-min-width=0 --oi-min-height=0 --oi-min-area=0'],
|
||||
['nested-images', 'nested-images',
|
||||
'--oi-min-width=0 --oi-min-height=0 --oi-min-area=0']
|
||||
);
|
||||
|
||||
my $n_tests = 2 * scalar(@image_opt);
|
||||
|
BIN
qpdf/qtest/qpdf/nested-images.pdf
Normal file
BIN
qpdf/qtest/qpdf/nested-images.pdf
Normal file
Binary file not shown.
18
qpdf/qtest/qpdf/optimize-images-nested-images-json.out
Normal file
18
qpdf/qtest/qpdf/optimize-images-nested-images-json.out
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 2,
|
||||
"parameters": {
|
||||
"decodelevel": "generalized"
|
||||
},
|
||||
"pages": [
|
||||
{
|
||||
"contents": [
|
||||
"4 0 R"
|
||||
],
|
||||
"images": [],
|
||||
"label": null,
|
||||
"object": "3 0 R",
|
||||
"outlines": [],
|
||||
"pageposfrom1": 1
|
||||
}
|
||||
]
|
||||
}
|
2
qpdf/qtest/qpdf/optimize-images-nested-images.out
Normal file
2
qpdf/qtest/qpdf/optimize-images-nested-images.out
Normal file
@ -0,0 +1,2 @@
|
||||
qpdf: image /X1 on page 1: optimizing image reduces size from 2628 to ...
|
||||
qpdf: wrote file a.pdf
|
Loading…
Reference in New Issue
Block a user