Commit 6f3b76b6c1f72aa8fad17680937b726844d7cd8c

Authored by Jay Berkenbilt
1 parent 7b6ab900

Fix image-streams.pdf in test suite

Some of the images were supposed to have no filter, but somewhere
along the line, they ended up with /FlateDecode, most likely because
qpdf rewrote the file without having --compress-streams=n specified.
If this error is repeated, it will cause a test failure.
qpdf/qtest/qpdf/image-streams-none.out
1 page 1 1 page 1
2 -filter: /FlateDecode, color space: /DeviceCMYK 2 +filter: null, color space: /DeviceCMYK
3 page 2 3 page 2
4 filter: /DCTDecode, color space: /DeviceCMYK 4 filter: /DCTDecode, color space: /DeviceCMYK
5 page 3 5 page 3
6 filter: /RunLengthDecode, color space: /DeviceCMYK 6 filter: /RunLengthDecode, color space: /DeviceCMYK
7 page 4 7 page 4
8 -filter: /FlateDecode, color space: /DeviceRGB 8 +filter: null, color space: /DeviceRGB
9 page 5 9 page 5
10 filter: /DCTDecode, color space: /DeviceRGB 10 filter: /DCTDecode, color space: /DeviceRGB
11 page 6 11 page 6
12 filter: /RunLengthDecode, color space: /DeviceRGB 12 filter: /RunLengthDecode, color space: /DeviceRGB
13 page 7 13 page 7
14 -filter: /FlateDecode, color space: /DeviceGray 14 +filter: null, color space: /DeviceGray
15 page 8 15 page 8
16 filter: /DCTDecode, color space: /DeviceGray 16 filter: /DCTDecode, color space: /DeviceGray
17 page 9 17 page 9
qpdf/qtest/qpdf/image-streams.pdf
No preview for this file type
qpdf/qtest/qpdf/json-image-streams-all.out
@@ -58,8 +58,7 @@ @@ -58,8 +58,7 @@
58 "/Type": "/Page" 58 "/Type": "/Page"
59 }, 59 },
60 "12 0 R": { 60 "12 0 R": {
61 - "/Filter": "/FlateDecode",  
62 - "/Length": 97 61 + "/Length": 95
63 }, 62 },
64 "13 0 R": { 63 "13 0 R": {
65 "/BaseFont": "/Helvetica", 64 "/BaseFont": "/Helvetica",
@@ -71,16 +70,14 @@ @@ -71,16 +70,14 @@
71 "14 0 R": { 70 "14 0 R": {
72 "/BitsPerComponent": 8, 71 "/BitsPerComponent": 8,
73 "/ColorSpace": "/DeviceCMYK", 72 "/ColorSpace": "/DeviceCMYK",
74 - "/Filter": "/FlateDecode",  
75 "/Height": 480, 73 "/Height": 480,
76 - "/Length": 847, 74 + "/Length": 768000,
77 "/Subtype": "/Image", 75 "/Subtype": "/Image",
78 "/Type": "/XObject", 76 "/Type": "/XObject",
79 "/Width": 400 77 "/Width": 400
80 }, 78 },
81 "15 0 R": { 79 "15 0 R": {
82 - "/Filter": "/FlateDecode",  
83 - "/Length": 102 80 + "/Length": 101
84 }, 81 },
85 "16 0 R": { 82 "16 0 R": {
86 "/BitsPerComponent": 8, 83 "/BitsPerComponent": 8,
@@ -93,8 +90,7 @@ @@ -93,8 +90,7 @@
93 "/Width": 400 90 "/Width": 400
94 }, 91 },
95 "17 0 R": { 92 "17 0 R": {
96 - "/Filter": "/FlateDecode",  
97 - "/Length": 108 93 + "/Length": 107
98 }, 94 },
99 "18 0 R": { 95 "18 0 R": {
100 "/BitsPerComponent": 8, 96 "/BitsPerComponent": 8,
@@ -107,8 +103,7 @@ @@ -107,8 +103,7 @@
107 "/Width": 400 103 "/Width": 400
108 }, 104 },
109 "19 0 R": { 105 "19 0 R": {
110 - "/Filter": "/FlateDecode",  
111 - "/Length": 96 106 + "/Length": 94
112 }, 107 },
113 "2 0 R": { 108 "2 0 R": {
114 "/Count": 9, 109 "/Count": 9,
@@ -128,16 +123,14 @@ @@ -128,16 +123,14 @@
128 "20 0 R": { 123 "20 0 R": {
129 "/BitsPerComponent": 8, 124 "/BitsPerComponent": 8,
130 "/ColorSpace": "/DeviceRGB", 125 "/ColorSpace": "/DeviceRGB",
131 - "/Filter": "/FlateDecode",  
132 "/Height": 480, 126 "/Height": 480,
133 - "/Length": 645, 127 + "/Length": 576000,
134 "/Subtype": "/Image", 128 "/Subtype": "/Image",
135 "/Type": "/XObject", 129 "/Type": "/XObject",
136 "/Width": 400 130 "/Width": 400
137 }, 131 },
138 "21 0 R": { 132 "21 0 R": {
139 - "/Filter": "/FlateDecode",  
140 - "/Length": 99 133 + "/Length": 100
141 }, 134 },
142 "22 0 R": { 135 "22 0 R": {
143 "/BitsPerComponent": 8, 136 "/BitsPerComponent": 8,
@@ -150,7 +143,6 @@ @@ -150,7 +143,6 @@
150 "/Width": 400 143 "/Width": 400
151 }, 144 },
152 "23 0 R": { 145 "23 0 R": {
153 - "/Filter": "/FlateDecode",  
154 "/Length": 106 146 "/Length": 106
155 }, 147 },
156 "24 0 R": { 148 "24 0 R": {
@@ -164,21 +156,18 @@ @@ -164,21 +156,18 @@
164 "/Width": 400 156 "/Width": 400
165 }, 157 },
166 "25 0 R": { 158 "25 0 R": {
167 - "/Filter": "/FlateDecode",  
168 - "/Length": 97 159 + "/Length": 95
169 }, 160 },
170 "26 0 R": { 161 "26 0 R": {
171 "/BitsPerComponent": 8, 162 "/BitsPerComponent": 8,
172 "/ColorSpace": "/DeviceGray", 163 "/ColorSpace": "/DeviceGray",
173 - "/Filter": "/FlateDecode",  
174 "/Height": 480, 164 "/Height": 480,
175 - "/Length": 221, 165 + "/Length": 192000,
176 "/Subtype": "/Image", 166 "/Subtype": "/Image",
177 "/Type": "/XObject", 167 "/Type": "/XObject",
178 "/Width": 400 168 "/Width": 400
179 }, 169 },
180 "27 0 R": { 170 "27 0 R": {
181 - "/Filter": "/FlateDecode",  
182 "/Length": 101 171 "/Length": 101
183 }, 172 },
184 "28 0 R": { 173 "28 0 R": {
@@ -192,8 +181,7 @@ @@ -192,8 +181,7 @@
192 "/Width": 400 181 "/Width": 400
193 }, 182 },
194 "29 0 R": { 183 "29 0 R": {
195 - "/Filter": "/FlateDecode",  
196 - "/Length": 108 184 + "/Length": 107
197 }, 185 },
198 "3 0 R": { 186 "3 0 R": {
199 "/Contents": "12 0 R", 187 "/Contents": "12 0 R",
@@ -376,7 +364,7 @@ @@ -376,7 +364,7 @@
376 "trailer": { 364 "trailer": {
377 "/ID": [ 365 "/ID": [
378 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶", 366 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",
379 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶" 367 + "'+“‰¤V2«PP ç`m\"\u001d"
380 ], 368 ],
381 "/Root": "1 0 R", 369 "/Root": "1 0 R",
382 "/Size": 31 370 "/Size": 31
@@ -397,7 +385,7 @@ @@ -397,7 +385,7 @@
397 null 385 null
398 ], 386 ],
399 "filter": [ 387 "filter": [
400 - "/FlateDecode" 388 + null
401 ], 389 ],
402 "filterable": true, 390 "filterable": true,
403 "height": 480, 391 "height": 480,
@@ -475,7 +463,7 @@ @@ -475,7 +463,7 @@
475 null 463 null
476 ], 464 ],
477 "filter": [ 465 "filter": [
478 - "/FlateDecode" 466 + null
479 ], 467 ],
480 "filterable": true, 468 "filterable": true,
481 "height": 480, 469 "height": 480,
@@ -553,7 +541,7 @@ @@ -553,7 +541,7 @@
553 null 541 null
554 ], 542 ],
555 "filter": [ 543 "filter": [
556 - "/FlateDecode" 544 + null
557 ], 545 ],
558 "filterable": true, 546 "filterable": true,
559 "height": 480, 547 "height": 480,
qpdf/qtest/qpdf/json-image-streams-specialized.out
@@ -58,8 +58,7 @@ @@ -58,8 +58,7 @@
58 "/Type": "/Page" 58 "/Type": "/Page"
59 }, 59 },
60 "12 0 R": { 60 "12 0 R": {
61 - "/Filter": "/FlateDecode",  
62 - "/Length": 97 61 + "/Length": 95
63 }, 62 },
64 "13 0 R": { 63 "13 0 R": {
65 "/BaseFont": "/Helvetica", 64 "/BaseFont": "/Helvetica",
@@ -71,16 +70,14 @@ @@ -71,16 +70,14 @@
71 "14 0 R": { 70 "14 0 R": {
72 "/BitsPerComponent": 8, 71 "/BitsPerComponent": 8,
73 "/ColorSpace": "/DeviceCMYK", 72 "/ColorSpace": "/DeviceCMYK",
74 - "/Filter": "/FlateDecode",  
75 "/Height": 480, 73 "/Height": 480,
76 - "/Length": 847, 74 + "/Length": 768000,
77 "/Subtype": "/Image", 75 "/Subtype": "/Image",
78 "/Type": "/XObject", 76 "/Type": "/XObject",
79 "/Width": 400 77 "/Width": 400
80 }, 78 },
81 "15 0 R": { 79 "15 0 R": {
82 - "/Filter": "/FlateDecode",  
83 - "/Length": 102 80 + "/Length": 101
84 }, 81 },
85 "16 0 R": { 82 "16 0 R": {
86 "/BitsPerComponent": 8, 83 "/BitsPerComponent": 8,
@@ -93,8 +90,7 @@ @@ -93,8 +90,7 @@
93 "/Width": 400 90 "/Width": 400
94 }, 91 },
95 "17 0 R": { 92 "17 0 R": {
96 - "/Filter": "/FlateDecode",  
97 - "/Length": 108 93 + "/Length": 107
98 }, 94 },
99 "18 0 R": { 95 "18 0 R": {
100 "/BitsPerComponent": 8, 96 "/BitsPerComponent": 8,
@@ -107,8 +103,7 @@ @@ -107,8 +103,7 @@
107 "/Width": 400 103 "/Width": 400
108 }, 104 },
109 "19 0 R": { 105 "19 0 R": {
110 - "/Filter": "/FlateDecode",  
111 - "/Length": 96 106 + "/Length": 94
112 }, 107 },
113 "2 0 R": { 108 "2 0 R": {
114 "/Count": 9, 109 "/Count": 9,
@@ -128,16 +123,14 @@ @@ -128,16 +123,14 @@
128 "20 0 R": { 123 "20 0 R": {
129 "/BitsPerComponent": 8, 124 "/BitsPerComponent": 8,
130 "/ColorSpace": "/DeviceRGB", 125 "/ColorSpace": "/DeviceRGB",
131 - "/Filter": "/FlateDecode",  
132 "/Height": 480, 126 "/Height": 480,
133 - "/Length": 645, 127 + "/Length": 576000,
134 "/Subtype": "/Image", 128 "/Subtype": "/Image",
135 "/Type": "/XObject", 129 "/Type": "/XObject",
136 "/Width": 400 130 "/Width": 400
137 }, 131 },
138 "21 0 R": { 132 "21 0 R": {
139 - "/Filter": "/FlateDecode",  
140 - "/Length": 99 133 + "/Length": 100
141 }, 134 },
142 "22 0 R": { 135 "22 0 R": {
143 "/BitsPerComponent": 8, 136 "/BitsPerComponent": 8,
@@ -150,7 +143,6 @@ @@ -150,7 +143,6 @@
150 "/Width": 400 143 "/Width": 400
151 }, 144 },
152 "23 0 R": { 145 "23 0 R": {
153 - "/Filter": "/FlateDecode",  
154 "/Length": 106 146 "/Length": 106
155 }, 147 },
156 "24 0 R": { 148 "24 0 R": {
@@ -164,21 +156,18 @@ @@ -164,21 +156,18 @@
164 "/Width": 400 156 "/Width": 400
165 }, 157 },
166 "25 0 R": { 158 "25 0 R": {
167 - "/Filter": "/FlateDecode",  
168 - "/Length": 97 159 + "/Length": 95
169 }, 160 },
170 "26 0 R": { 161 "26 0 R": {
171 "/BitsPerComponent": 8, 162 "/BitsPerComponent": 8,
172 "/ColorSpace": "/DeviceGray", 163 "/ColorSpace": "/DeviceGray",
173 - "/Filter": "/FlateDecode",  
174 "/Height": 480, 164 "/Height": 480,
175 - "/Length": 221, 165 + "/Length": 192000,
176 "/Subtype": "/Image", 166 "/Subtype": "/Image",
177 "/Type": "/XObject", 167 "/Type": "/XObject",
178 "/Width": 400 168 "/Width": 400
179 }, 169 },
180 "27 0 R": { 170 "27 0 R": {
181 - "/Filter": "/FlateDecode",  
182 "/Length": 101 171 "/Length": 101
183 }, 172 },
184 "28 0 R": { 173 "28 0 R": {
@@ -192,8 +181,7 @@ @@ -192,8 +181,7 @@
192 "/Width": 400 181 "/Width": 400
193 }, 182 },
194 "29 0 R": { 183 "29 0 R": {
195 - "/Filter": "/FlateDecode",  
196 - "/Length": 108 184 + "/Length": 107
197 }, 185 },
198 "3 0 R": { 186 "3 0 R": {
199 "/Contents": "12 0 R", 187 "/Contents": "12 0 R",
@@ -376,7 +364,7 @@ @@ -376,7 +364,7 @@
376 "trailer": { 364 "trailer": {
377 "/ID": [ 365 "/ID": [
378 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶", 366 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",
379 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶" 367 + "'+“‰¤V2«PP ç`m\"\u001d"
380 ], 368 ],
381 "/Root": "1 0 R", 369 "/Root": "1 0 R",
382 "/Size": 31 370 "/Size": 31
@@ -397,7 +385,7 @@ @@ -397,7 +385,7 @@
397 null 385 null
398 ], 386 ],
399 "filter": [ 387 "filter": [
400 - "/FlateDecode" 388 + null
401 ], 389 ],
402 "filterable": true, 390 "filterable": true,
403 "height": 480, 391 "height": 480,
@@ -475,7 +463,7 @@ @@ -475,7 +463,7 @@
475 null 463 null
476 ], 464 ],
477 "filter": [ 465 "filter": [
478 - "/FlateDecode" 466 + null
479 ], 467 ],
480 "filterable": true, 468 "filterable": true,
481 "height": 480, 469 "height": 480,
@@ -553,7 +541,7 @@ @@ -553,7 +541,7 @@
553 null 541 null
554 ], 542 ],
555 "filter": [ 543 "filter": [
556 - "/FlateDecode" 544 + null
557 ], 545 ],
558 "filterable": true, 546 "filterable": true,
559 "height": 480, 547 "height": 480,
qpdf/qtest/qpdf/json-image-streams.out
@@ -58,8 +58,7 @@ @@ -58,8 +58,7 @@
58 "/Type": "/Page" 58 "/Type": "/Page"
59 }, 59 },
60 "12 0 R": { 60 "12 0 R": {
61 - "/Filter": "/FlateDecode",  
62 - "/Length": 97 61 + "/Length": 95
63 }, 62 },
64 "13 0 R": { 63 "13 0 R": {
65 "/BaseFont": "/Helvetica", 64 "/BaseFont": "/Helvetica",
@@ -71,16 +70,14 @@ @@ -71,16 +70,14 @@
71 "14 0 R": { 70 "14 0 R": {
72 "/BitsPerComponent": 8, 71 "/BitsPerComponent": 8,
73 "/ColorSpace": "/DeviceCMYK", 72 "/ColorSpace": "/DeviceCMYK",
74 - "/Filter": "/FlateDecode",  
75 "/Height": 480, 73 "/Height": 480,
76 - "/Length": 847, 74 + "/Length": 768000,
77 "/Subtype": "/Image", 75 "/Subtype": "/Image",
78 "/Type": "/XObject", 76 "/Type": "/XObject",
79 "/Width": 400 77 "/Width": 400
80 }, 78 },
81 "15 0 R": { 79 "15 0 R": {
82 - "/Filter": "/FlateDecode",  
83 - "/Length": 102 80 + "/Length": 101
84 }, 81 },
85 "16 0 R": { 82 "16 0 R": {
86 "/BitsPerComponent": 8, 83 "/BitsPerComponent": 8,
@@ -93,8 +90,7 @@ @@ -93,8 +90,7 @@
93 "/Width": 400 90 "/Width": 400
94 }, 91 },
95 "17 0 R": { 92 "17 0 R": {
96 - "/Filter": "/FlateDecode",  
97 - "/Length": 108 93 + "/Length": 107
98 }, 94 },
99 "18 0 R": { 95 "18 0 R": {
100 "/BitsPerComponent": 8, 96 "/BitsPerComponent": 8,
@@ -107,8 +103,7 @@ @@ -107,8 +103,7 @@
107 "/Width": 400 103 "/Width": 400
108 }, 104 },
109 "19 0 R": { 105 "19 0 R": {
110 - "/Filter": "/FlateDecode",  
111 - "/Length": 96 106 + "/Length": 94
112 }, 107 },
113 "2 0 R": { 108 "2 0 R": {
114 "/Count": 9, 109 "/Count": 9,
@@ -128,16 +123,14 @@ @@ -128,16 +123,14 @@
128 "20 0 R": { 123 "20 0 R": {
129 "/BitsPerComponent": 8, 124 "/BitsPerComponent": 8,
130 "/ColorSpace": "/DeviceRGB", 125 "/ColorSpace": "/DeviceRGB",
131 - "/Filter": "/FlateDecode",  
132 "/Height": 480, 126 "/Height": 480,
133 - "/Length": 645, 127 + "/Length": 576000,
134 "/Subtype": "/Image", 128 "/Subtype": "/Image",
135 "/Type": "/XObject", 129 "/Type": "/XObject",
136 "/Width": 400 130 "/Width": 400
137 }, 131 },
138 "21 0 R": { 132 "21 0 R": {
139 - "/Filter": "/FlateDecode",  
140 - "/Length": 99 133 + "/Length": 100
141 }, 134 },
142 "22 0 R": { 135 "22 0 R": {
143 "/BitsPerComponent": 8, 136 "/BitsPerComponent": 8,
@@ -150,7 +143,6 @@ @@ -150,7 +143,6 @@
150 "/Width": 400 143 "/Width": 400
151 }, 144 },
152 "23 0 R": { 145 "23 0 R": {
153 - "/Filter": "/FlateDecode",  
154 "/Length": 106 146 "/Length": 106
155 }, 147 },
156 "24 0 R": { 148 "24 0 R": {
@@ -164,21 +156,18 @@ @@ -164,21 +156,18 @@
164 "/Width": 400 156 "/Width": 400
165 }, 157 },
166 "25 0 R": { 158 "25 0 R": {
167 - "/Filter": "/FlateDecode",  
168 - "/Length": 97 159 + "/Length": 95
169 }, 160 },
170 "26 0 R": { 161 "26 0 R": {
171 "/BitsPerComponent": 8, 162 "/BitsPerComponent": 8,
172 "/ColorSpace": "/DeviceGray", 163 "/ColorSpace": "/DeviceGray",
173 - "/Filter": "/FlateDecode",  
174 "/Height": 480, 164 "/Height": 480,
175 - "/Length": 221, 165 + "/Length": 192000,
176 "/Subtype": "/Image", 166 "/Subtype": "/Image",
177 "/Type": "/XObject", 167 "/Type": "/XObject",
178 "/Width": 400 168 "/Width": 400
179 }, 169 },
180 "27 0 R": { 170 "27 0 R": {
181 - "/Filter": "/FlateDecode",  
182 "/Length": 101 171 "/Length": 101
183 }, 172 },
184 "28 0 R": { 173 "28 0 R": {
@@ -192,8 +181,7 @@ @@ -192,8 +181,7 @@
192 "/Width": 400 181 "/Width": 400
193 }, 182 },
194 "29 0 R": { 183 "29 0 R": {
195 - "/Filter": "/FlateDecode",  
196 - "/Length": 108 184 + "/Length": 107
197 }, 185 },
198 "3 0 R": { 186 "3 0 R": {
199 "/Contents": "12 0 R", 187 "/Contents": "12 0 R",
@@ -376,7 +364,7 @@ @@ -376,7 +364,7 @@
376 "trailer": { 364 "trailer": {
377 "/ID": [ 365 "/ID": [
378 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶", 366 "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶",
379 - "S¶Ł”łîð\u000e¢¬\u0007}_)\u0012¶" 367 + "'+“‰¤V2«PP ç`m\"\u001d"
380 ], 368 ],
381 "/Root": "1 0 R", 369 "/Root": "1 0 R",
382 "/Size": 31 370 "/Size": 31
@@ -397,7 +385,7 @@ @@ -397,7 +385,7 @@
397 null 385 null
398 ], 386 ],
399 "filter": [ 387 "filter": [
400 - "/FlateDecode" 388 + null
401 ], 389 ],
402 "filterable": true, 390 "filterable": true,
403 "height": 480, 391 "height": 480,
@@ -475,7 +463,7 @@ @@ -475,7 +463,7 @@
475 null 463 null
476 ], 464 ],
477 "filter": [ 465 "filter": [
478 - "/FlateDecode" 466 + null
479 ], 467 ],
480 "filterable": true, 468 "filterable": true,
481 "height": 480, 469 "height": 480,
@@ -553,7 +541,7 @@ @@ -553,7 +541,7 @@
553 null 541 null
554 ], 542 ],
555 "filter": [ 543 "filter": [
556 - "/FlateDecode" 544 + null
557 ], 545 ],
558 "filterable": true, 546 "filterable": true,
559 "height": 480, 547 "height": 480,