From 44d3fd054658734fa7588cd12c12fd3f0d342d8d Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 2 Apr 2024 14:35:23 -0700 Subject: [PATCH] Tests/JBIG2: Add tests for transposed non-topleft text reference corners This needed the same `jbig2` changes as for the non-transposed ones, and the changes to it mentioned on #23780. I used the same .ini files as for the non-transposed ones, except that I added `-txt -Param -Transposed 1` as last line to each of them. All three new files display fine in Chrome. They all look busted in Firefox. I think this is likey a bug in pdf.js that I'll report upstream. (Reportedly they look fine in Acrobat on Android.) --- Tests/LibGfx/TestImageDecoder.cpp | 3 +++ .../bitmap-symbol-textbottomlefttranspose.jbig2 | Bin 0 -> 410 bytes .../bitmap-symbol-textbottomrighttranspose.jbig2 | Bin 0 -> 411 bytes .../bitmap-symbol-texttoprighttranspose.jbig2 | Bin 0 -> 411 bytes 4 files changed, 3 insertions(+) create mode 100644 Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomlefttranspose.jbig2 create mode 100644 Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomrighttranspose.jbig2 create mode 100644 Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttoprighttranspose.jbig2 diff --git a/Tests/LibGfx/TestImageDecoder.cpp b/Tests/LibGfx/TestImageDecoder.cpp index fafb443a55d..b4968c5bdd7 100644 --- a/Tests/LibGfx/TestImageDecoder.cpp +++ b/Tests/LibGfx/TestImageDecoder.cpp @@ -367,8 +367,11 @@ TEST_CASE(test_jbig2_decode) 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-textbottomlefttranspose.jbig2"sv), TEST_INPUT("jbig2/bitmap-symbol-textbottomright.jbig2"sv), + TEST_INPUT("jbig2/bitmap-symbol-textbottomrighttranspose.jbig2"sv), TEST_INPUT("jbig2/bitmap-symbol-texttopright.jbig2"sv), + TEST_INPUT("jbig2/bitmap-symbol-texttoprighttranspose.jbig2"sv), TEST_INPUT("jbig2/bitmap-symbol-texttranspose.jbig2"sv), }; diff --git a/Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomlefttranspose.jbig2 b/Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomlefttranspose.jbig2 new file mode 100644 index 0000000000000000000000000000000000000000..152c8a9d904a8447f865f3e47154fc80b2802428 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?Ty(#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&iGe2r6db*GjON#=diXVSOkR6x=B520Jy(#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&iGimA6db*GjON#=diXVSOkR6x=B520J