2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-23 03:18:59 +00:00

Add smaller image streams file for testing

This commit is contained in:
Jay Berkenbilt 2019-06-21 17:36:22 -04:00
parent 2c81eec45e
commit ed7f2a6c76
3 changed files with 632 additions and 0 deletions

View File

@ -542,6 +542,7 @@ my @json_files = (
['page-labels-and-outlines', []], ['page-labels-and-outlines', []],
['page-labels-num-tree', []], ['page-labels-num-tree', []],
['image-streams', []], ['image-streams', []],
['image-streams-small', []],
['field-types', []], ['field-types', []],
['image-streams', ['--decode-level=all']], ['image-streams', ['--decode-level=all']],
['image-streams', ['--decode-level=specialized']], ['image-streams', ['--decode-level=specialized']],
@ -2105,6 +2106,10 @@ $n_tests += 14;
# image-streams.pdf is the output of examples/pdf-create. # image-streams.pdf is the output of examples/pdf-create.
# examples/pdf-create validates the actual image data. # 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)) foreach my $l (qw(none generalized specialized all))
{ {
$td->runtest("image-streams: $l", $td->runtest("image-streams: $l",

Binary file not shown.

View File

@ -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
}