From ed7f2a6c76cf41956861c7a43f5cd22876230e86 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Fri, 21 Jun 2019 17:36:22 -0400 Subject: [PATCH] Add smaller image streams file for testing --- qpdf/qtest/qpdf.test | 5 + qpdf/qtest/qpdf/image-streams-small.pdf | Bin 0 -> 21748 bytes qpdf/qtest/qpdf/json-image-streams-small.out | 627 +++++++++++++++++++ 3 files changed, 632 insertions(+) create mode 100644 qpdf/qtest/qpdf/image-streams-small.pdf create mode 100644 qpdf/qtest/qpdf/json-image-streams-small.out 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 0000000000000000000000000000000000000000..713ed1d6d4c759dd7ceb4af1a8ffc86ca3b01bc0 GIT binary patch literal 21748 zcmeHP3tSY{8b1pQECWOmP`*N?Q{`wf z(C~1C$V(#&lBX>fC^U2Obf_HVk5i`=pi@yHb*YFtim9W7I!dXdj5^AxBPKAvk6Yfq8gw;AR@l{8o{q@V6`)v$h7*W1wJK6G4>nBJCV_IH949M_S7~8MOHY(Ufo6_2 z6?Tp6WQ+!$p*~z>n9A2W;q$UzNSQj4}2+3pQnH9t^ObSA z@KSRx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qdAxYLFIU(tJ5ZG{ znmfkZfycTIKg{xkAHeh3n?mVbd1!ux9wa?+dw_iK-apUePxzR3#UZVD^_nF?t7~sh zU#!|%gnV0fM~vsUBwg_jka{$gmRGi1z47ip+!I>|Ris7+L|h-4wX|xdGN)+Uj)A4O z1|?@Nb=f%8N40?;ni=dhfv)W1Csr`qy?6NsLh=8He{cY}P}Bhy>o1*gghNsVo&(Jd zFfYh=nJ{_C3YZgQ8xB*9>^T8N*Wv!K%pg=ICkqp(b5*)WnL!?0mCjD~V0+h1A1&dh z2l}~waE*j+g&f(K|BKhn^9$x)@%Q!iXnLdk(_8IFr7$zd>&cU=Za+Iy_u`GgnbSsI z_MbFSx$i_dxh@?B*QF<}y?cY>@=b%g($&|Q24E`jlSSvAtxG=$;ND!A7D}y_rS*;a zMnj{%N?&ED(wFJW3}yOseYzoCFVqVSLeg;?9^$a)X^C`1fC@20(7B-!u~;ZZ)6q^D z2HiTjp?O_030$GKkzrEEGq8~fC6IAsBNM}%Otvy9Oxa{BlamN}@LCMRpbN2)2?fvx z+Q>wZ`erMW$mlYelqSOkB3j>YOib$sE|k)A#>Mn&g&5sdLLsdjhT#HRJ7btoYTGV` ziDkC>VVD%=QhKnz7!EVX&}4E*hO;Rr7t`#F$t5ss+m@3<1Ux9i1p?YVhrN*7wu=j- zQY)EGt5WB{Bxq#HO{GSoLpw4VCaUKX5Q{L!W)wPglvt&bs?ucwu|O(MNs$Yrgj^sL k2_;yXT!mpOJiPl7)6D}!rPWbD#|3hk1PKg`o)m-p3KZpCkN^Mx literal 0 HcmV?d00001 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 +}