From ce11a34fc6697c0141e6617b576a147d242df75e Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 31 Mar 2024 22:12:20 -0700 Subject: [PATCH] Tests/LibGfx: Add a jbig2 test for transposed text segments See the PR adding this test for local changes to `jbig2`. I used the shell script mentioned in #23659, except I added the line `-txt -Param -Transposed 1` at the very end of the .ini file. As with all the symbol test cases, after running Meta/jbig2_to_pdf.py -o foo.pdf foo.jb2 399 400 the file opens up ok in Chrome and Firefox (but not Safari), so maybe it's not completely broken. --- Tests/LibGfx/TestImageDecoder.cpp | 1 + .../jbig2/bitmap-symbol-texttranspose.jbig2 | Bin 0 -> 410 bytes 2 files changed, 1 insertion(+) create mode 100644 Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttranspose.jbig2 diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index 75592ee97d2..8a88381bfbc 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -366,6 +366,7 @@ 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-texttranspose.jbig2"sv), }; for (auto test_input : test_inputs) { diff --git a/Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttranspose.jbig2 b/Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttranspose.jbig2 new file mode 100644 index 0000000000000000000000000000000000000000..2f2a9ef1473df64a7f4ffc381f53fdd86a18b698 GIT binary patch literal 410 zcmbR4y(#y7P*qK^NmAg_;ioR>q5SBP2TO8!)||e%}nl_U(#9K zW6z}S=eB!LWoJ;hNM3&RG2SoF@91W2d+c!RNyq=XS5vJI*(mPn|1!u``-yeGTp-XUXh~@OCqBzF< zNr79u>(+iy)7-G~Ovbl+0<0mb_vE%(e?8Fkto)?mrU(3IFU?T