Pārlūkot izejas kodu

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.)
Nico Weber 1 gadu atpakaļ
vecāks
revīzija
67875ecb6f

+ 3 - 0
Tests/LibGfx/TestImageDecoder.cpp

@@ -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),
     };
 

BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomleft.jbig2


BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-textbottomright.jbig2


BIN
Tests/LibGfx/test-inputs/jbig2/bitmap-symbol-texttopright.jbig2