mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +00:00
Tests/JBIG2: Add tests for non-topleft text segment reference corners
This already worked fine. Now it's tested. I did have to teach `jbig2` to correctly generate test files for this. See the PR adding these tests for local changes. I used the script from #23659 to create these images, but I replaced these lines: ``` -txt -Param -numInst 4 -ID 2 108 50 -ID 3 265 60 -ID 1 100 135 -ID 0 70 232 -txt -Param -RefCorner 2 ``` For `bottomleft`, I replaced them with: ``` -txt -Param -numInst 4 -ID 2 137 50 -ID 3 294 60 -ID 1 199 135 -ID 0 319 232 -txt -Param -RefCorner 0 ``` For `bottomright`, I replaced them with: ``` -txt -Param -numInst 4 -ID 2 108 50 -ID 3 265 60 -ID 1 100 135 -ID 0 70 232 -txt -Param -RefCorner 2 ``` For `topright`, I replaced them with: ``` -txt -Param -numInst 4 -ID 2 108 79 -ID 3 265 89 -ID 1 100 234 -ID 0 70 351 -txt -Param -RefCorner 3 ``` All three new files display fine in Chrome. The bottomleft one displays fine in Firefox, while the other two look compressed in X. I think this is a bug in pdf.js that I'll report upstream. (Reportedly they look fine in Acrobat on Android.)
This commit is contained in:
parent
b31e3fe573
commit
67875ecb6f
|
@ -366,6 +366,9 @@ TEST_CASE(test_jbig2_decode)
|
|||
TEST_INPUT("jbig2/bitmap-symbol.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-textrefine.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-symbolrefine.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-textbottomleft.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-textbottomright.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-texttopright.jbig2"sv),
|
||||
TEST_INPUT("jbig2/bitmap-symbol-texttranspose.jbig2"sv),
|
||||
};
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttopright.jbig2
Normal file
BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttopright.jbig2
Normal file
Binary file not shown.
Loading…
Reference in a new issue