Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests/LibGfx: Add a test jbig2 file using TPGDON
"TPGD" is short for "Typical Prediction for Generic Direct coding", and the "ON" bit turns it on. In this mode, before decoding a line, we decode a single bit first that controls if the current line is just a copy of the previous line. If so, the line's pixels aren't encoded, the decoder just copies the previous line. I created this by running jbig2 -i Tests/LibGfx/test-inputs/bmp/bitmap -f bmp \ -o bitmap -F jb2 -ini tpgdon.ini where tpgdon.ini contained: -Gen -Seg 1 -Gen -Param -TpGDon 1 See previous commits in this directory for details on the `jbig2` tool. Sadly, the TPGDON writing path in `jbig2` wasn't implemented yet, so I had to add this. See the PR that added this commit for my local diff to `jbig2`. I'm somewhat confident that my change to `jbig2` (and hence the image added in this commit) is correct because: 1. `jbig2` succeeds in converting this file to a bmp file, while it failed without my patch (the decoding codepath in `jbig2` does have TPGDON support) 2. Other pdf viewers display the output of `Meta/jbig2_to_pdf.py -o foo.pdf path/to/bitmap-tpgdon.jbig2 399 400` the same way we do
- Loading branch information