aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-06-21 23:36:22 +0200
committerJay Berkenbilt <ejb@ql.org>2019-06-21 23:39:53 +0200
commited7f2a6c76cf41956861c7a43f5cd22876230e86 (patch)
tree84ad05188e8ac7437e718743d5ea6783cb8ddcb6
parent2c81eec45e8b8b3e1a20c5954289ee33e421b16a (diff)
downloadqpdf-ed7f2a6c76cf41956861c7a43f5cd22876230e86.tar.zst
Add smaller image streams file for testing
-rw-r--r--qpdf/qtest/qpdf.test5
-rw-r--r--qpdf/qtest/qpdf/image-streams-small.pdfbin0 -> 21748 bytes
-rw-r--r--qpdf/qtest/qpdf/json-image-streams-small.out627
3 files changed, 632 insertions, 0 deletions
diff --git a/qpdf/qtest/qpdf.test b/qpdf/qtest/qpdf.test
index 76f9d8aa..7e7b733d 100644
--- a/qpdf/qtest/qpdf.test
+++ b/qpdf/qtest/qpdf.test
@@ -542,6 +542,7 @@ my @json_files = (
['page-labels-and-outlines', []],
['page-labels-num-tree', []],
['image-streams', []],
+ ['image-streams-small', []],
['field-types', []],
['image-streams', ['--decode-level=all']],
['image-streams', ['--decode-level=specialized']],
@@ -2105,6 +2106,10 @@ $n_tests += 14;
# image-streams.pdf is the output of examples/pdf-create.
# examples/pdf-create validates the actual image data.
+# image-streams-small.pdf was manually created by editing
+# pdf-create.cc to reduce width and height to 40x8 and ignoring
+# errors. Its purpose was to get a small file with images with
+# different filters for fuzz testing.
foreach my $l (qw(none generalized specialized all))
{
$td->runtest("image-streams: $l",
diff --git a/qpdf/qtest/qpdf/image-streams-small.pdf b/qpdf/qtest/qpdf/image-streams-small.pdf
new file mode 100644
index 00000000..713ed1d6
--- /dev/null
+++ b/qpdf/qtest/qpdf/image-streams-small.pdf
Binary files differ
diff --git a/qpdf/qtest/qpdf/json-image-streams-small.out b/qpdf/qtest/qpdf/json-image-streams-small.out
new file mode 100644
index 00000000..02ee4ad1
--- /dev/null
+++ b/qpdf/qtest/qpdf/json-image-streams-small.out
@@ -0,0 +1,627 @@
+{
+ "acroform": {
+ "fields": [],
+ "hasacroform": false,
+ "needappearances": false
+ },
+ "objects": {
+ "1 0 R": {
+ "/Pages": "2 0 R",
+ "/Type": "/Catalog"
+ },
+ "10 0 R": {
+ "/Contents": "27 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "28 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "11 0 R": {
+ "/Contents": "29 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "30 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "12 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 97
+ },
+ "13 0 R": {
+ "/BaseFont": "/Helvetica",
+ "/Encoding": "/WinAnsiEncoding",
+ "/Name": "/F1",
+ "/Subtype": "/Type1",
+ "/Type": "/Font"
+ },
+ "14 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceCMYK",
+ "/Filter": "/FlateDecode",
+ "/Height": 48,
+ "/Length": 51,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "15 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 102
+ },
+ "16 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceCMYK",
+ "/Filter": "/DCTDecode",
+ "/Height": 48,
+ "/Length": 454,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "17 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 108
+ },
+ "18 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceCMYK",
+ "/Filter": "/RunLengthDecode",
+ "/Height": 48,
+ "/Length": 7688,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "19 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 96
+ },
+ "2 0 R": {
+ "/Count": 9,
+ "/Kids": [
+ "3 0 R",
+ "4 0 R",
+ "5 0 R",
+ "6 0 R",
+ "7 0 R",
+ "8 0 R",
+ "9 0 R",
+ "10 0 R",
+ "11 0 R"
+ ],
+ "/Type": "/Pages"
+ },
+ "20 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceRGB",
+ "/Filter": "/FlateDecode",
+ "/Height": 48,
+ "/Length": 46,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "21 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 99
+ },
+ "22 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceRGB",
+ "/Filter": "/DCTDecode",
+ "/Height": 48,
+ "/Length": 849,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "23 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 106
+ },
+ "24 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceRGB",
+ "/Filter": "/RunLengthDecode",
+ "/Height": 48,
+ "/Length": 6411,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "25 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 97
+ },
+ "26 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceGray",
+ "/Filter": "/FlateDecode",
+ "/Height": 48,
+ "/Length": 36,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "27 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 101
+ },
+ "28 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceGray",
+ "/Filter": "/DCTDecode",
+ "/Height": 48,
+ "/Length": 359,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "29 0 R": {
+ "/Filter": "/FlateDecode",
+ "/Length": 108
+ },
+ "3 0 R": {
+ "/Contents": "12 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "14 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "30 0 R": {
+ "/BitsPerComponent": 8,
+ "/ColorSpace": "/DeviceGray",
+ "/Filter": "/RunLengthDecode",
+ "/Height": 48,
+ "/Length": 37,
+ "/Subtype": "/Image",
+ "/Type": "/XObject",
+ "/Width": 40
+ },
+ "4 0 R": {
+ "/Contents": "15 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "16 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "5 0 R": {
+ "/Contents": "17 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "18 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "6 0 R": {
+ "/Contents": "19 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "20 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "7 0 R": {
+ "/Contents": "21 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "22 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "8 0 R": {
+ "/Contents": "23 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "24 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "9 0 R": {
+ "/Contents": "25 0 R",
+ "/MediaBox": [
+ 0,
+ 0,
+ 612,
+ 392
+ ],
+ "/Parent": "2 0 R",
+ "/Resources": {
+ "/Font": {
+ "/F1": "13 0 R"
+ },
+ "/ProcSet": [
+ "/PDF",
+ "/Text",
+ "/ImageC"
+ ],
+ "/XObject": {
+ "/Im1": "26 0 R"
+ }
+ },
+ "/Type": "/Page"
+ },
+ "trailer": {
+ "/ID": [
+ "Z§¯•Py»’~’46\u001dı\u0011¢",
+ "Z§¯•Py»’~’46\u001dı\u0011¢"
+ ],
+ "/Root": "1 0 R",
+ "/Size": 31
+ }
+ },
+ "outlines": [],
+ "pagelabels": [],
+ "pages": [
+ {
+ "contents": [
+ "12 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceCMYK",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/FlateDecode"
+ ],
+ "filterable": true,
+ "height": 48,
+ "name": "/Im1",
+ "object": "14 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "3 0 R",
+ "outlines": [],
+ "pageposfrom1": 1
+ },
+ {
+ "contents": [
+ "15 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceCMYK",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/DCTDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "16 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "4 0 R",
+ "outlines": [],
+ "pageposfrom1": 2
+ },
+ {
+ "contents": [
+ "17 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceCMYK",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/RunLengthDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "18 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "5 0 R",
+ "outlines": [],
+ "pageposfrom1": 3
+ },
+ {
+ "contents": [
+ "19 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceRGB",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/FlateDecode"
+ ],
+ "filterable": true,
+ "height": 48,
+ "name": "/Im1",
+ "object": "20 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "6 0 R",
+ "outlines": [],
+ "pageposfrom1": 4
+ },
+ {
+ "contents": [
+ "21 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceRGB",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/DCTDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "22 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "7 0 R",
+ "outlines": [],
+ "pageposfrom1": 5
+ },
+ {
+ "contents": [
+ "23 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceRGB",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/RunLengthDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "24 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "8 0 R",
+ "outlines": [],
+ "pageposfrom1": 6
+ },
+ {
+ "contents": [
+ "25 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceGray",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/FlateDecode"
+ ],
+ "filterable": true,
+ "height": 48,
+ "name": "/Im1",
+ "object": "26 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "9 0 R",
+ "outlines": [],
+ "pageposfrom1": 7
+ },
+ {
+ "contents": [
+ "27 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceGray",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/DCTDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "28 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "10 0 R",
+ "outlines": [],
+ "pageposfrom1": 8
+ },
+ {
+ "contents": [
+ "29 0 R"
+ ],
+ "images": [
+ {
+ "bitspercomponent": 8,
+ "colorspace": "/DeviceGray",
+ "decodeparms": [
+ null
+ ],
+ "filter": [
+ "/RunLengthDecode"
+ ],
+ "filterable": false,
+ "height": 48,
+ "name": "/Im1",
+ "object": "30 0 R",
+ "width": 40
+ }
+ ],
+ "label": null,
+ "object": "11 0 R",
+ "outlines": [],
+ "pageposfrom1": 9
+ }
+ ],
+ "parameters": {
+ "decodelevel": "generalized"
+ },
+ "version": 1
+}