Commit 9146f1f0fddccdcc874df3019ddd54c83b61faee
1 parent
81823f40
Change default for SF_FlateLzwDecode::columns to 1
Showing
5 changed files
with
15 additions
and
3 deletions
libqpdf/SF_FlateLzwDecode.cc
qpdf/qtest/qpdf/png-filters-1-column.pdf
0 โ 100644
No preview for this file type
qpdf/qtest/qpdf/png-filters-no-columns-decoded.pdf
0 โ 100644
No preview for this file type
qpdf/qtest/qpdf/png-filters-no-columns.pdf
0 โ 100644
No preview for this file type
qpdf/qtest/specialized-filter.test
| ... | ... | @@ -16,7 +16,7 @@ cleanup(); |
| 16 | 16 | |
| 17 | 17 | my $td = new TestDriver('specialized-filter'); |
| 18 | 18 | |
| 19 | -my $n_tests = 3; | |
| 19 | +my $n_tests = 5; | |
| 20 | 20 | my $n_compare_pdfs = 1; |
| 21 | 21 | |
| 22 | 22 | # The PDF file was submitted on bug #83 on github. All the PNG filters |
| ... | ... | @@ -39,6 +39,18 @@ $td->runtest("stream with tiff predictor", |
| 39 | 39 | {$td->FILE => "tiff-predictor.out", |
| 40 | 40 | $td->EXIT_STATUS => 0}, |
| 41 | 41 | $td->NORMALIZE_NEWLINES); |
| 42 | - | |
| 42 | +# TC:SF_FlateLzwDecode PNG filter | |
| 43 | +# PDF:Table 8:Columns | |
| 44 | +# The test file is invalid as it does not actually use one column (as is implied by the missing | |
| 45 | +# key). However png-filters-1-column.pdf is the same file with /Columns explicitely set to 1, | |
| 46 | +# and displays the same as png-filters-no-columns.pdf and png-filters-no-columns-decoded.pdf. | |
| 47 | +$td->runtest("decode flate no /Columns", | |
| 48 | + {$td->COMMAND => "qpdf --static-id --compress-streams=n --decode-level=all" . | |
| 49 | + " png-filters-no-columns.pdf a.pdf"}, | |
| 50 | + {$td->STRING => "", $td->EXIT_STATUS => 0}, | |
| 51 | + $td->NORMALIZE_NEWLINES); | |
| 52 | +$td->runtest("check output", | |
| 53 | + {$td->FILE => "a.pdf"}, | |
| 54 | + {$td->FILE => "png-filters-no-columns-decoded.pdf"}); | |
| 43 | 55 | cleanup(); |
| 44 | 56 | $td->report(calc_ntests($n_tests, $n_compare_pdfs)); | ... | ... |