LibGfx/JBIG2: Implement support for context templates 1, 2, and 3

Template 2 is needed by some symbols in 0000372.pdf page 11 and
0000857.pdf pages 1-4. Implement the others too while here.  (The
mentioned pages in those two PDFs also use the "end of stripe" segment,
so they still don't render yet.

We still don't support EXTTEMPLATE.
This commit is contained in:
Nico Weber
2024-03-21 08:41:37 -04:00
committed by Andreas Kling
parent e2f02f4df7
commit b45a4508c7
2 changed files with 100 additions and 14 deletions

View File

@@ -356,6 +356,12 @@ TEST_CASE(test_jbig2_decode)
Array test_inputs = {
TEST_INPUT("jbig2/bitmap.jbig2"sv),
TEST_INPUT("jbig2/bitmap-tpgdon.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template1.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template1-tpgdon.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template2.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template2-tpgdon.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template3.jbig2"sv),
TEST_INPUT("jbig2/bitmap-template3-tpgdon.jbig2"sv),
TEST_INPUT("jbig2/bitmap-symbol.jbig2"sv),
};