ladybird/Tests/LibGfx/test-inputs
Nico Weber edec2b9baa Tests/LibGfx: Add a test jbig2 file using TPGDON
"TPGD" is short for "Typical Prediction for Generic Direct coding",
and the "ON" bit turns it on. In this mode, before decoding a line,
we decode a single bit first that controls if the current line is
just a copy of the previous line. If so, the line's pixels aren't
encoded, the decoder just copies the previous line.

I created this by running

    jbig2 -i Tests/LibGfx/test-inputs/bmp/bitmap -f bmp \
        -o bitmap -F jb2 -ini tpgdon.ini

where tpgdon.ini contained:

    -Gen -Seg 1
    -Gen -Param -TpGDon 1

See previous commits in this directory for details on the `jbig2` tool.

Sadly, the TPGDON writing path in `jbig2` wasn't implemented yet,
so I had to add this. See the PR that added this commit for my
local diff to `jbig2`.

I'm somewhat confident that my change to `jbig2` (and hence the
image added in this commit) is correct because:

1. `jbig2` succeeds in converting this file to a bmp file,
   while it failed without my patch (the decoding codepath in
   `jbig2` does have TPGDON support)

2. Other pdf viewers display the output of
   `Meta/jbig2_to_pdf.py -o foo.pdf path/to/bitmap-tpgdon.jbig2 399 400`
   the same way we do
2024-03-17 17:38:30 +01:00
..
bmp LibGfx/BMP: Clear alpha in palette entries 2024-03-05 21:27:41 +00:00
dds LibGfx/DDSLoader: Allow image dimensions that are not divisible by 4 2023-10-06 22:18:27 +02:00
icc LibGfx/TIFF: Add support for the ICCProfile tag 2023-12-02 10:36:02 +01:00
ico LibGfx/ICO: Do not try to decode a mask if we already reached EOF 2024-01-07 12:32:02 -05:00
ilbm LibGfx/ILBMLoader: Properly display images with a bitplane mask 2024-01-18 13:59:17 +01:00
jbig2 Tests/LibGfx: Add a test jbig2 file using TPGDON 2024-03-17 17:38:30 +01:00
jpg LibGfx+Tests: Improve calculation of restart interval 2024-01-30 14:50:43 +01:00
jxl LibGfx/JPEGXL: Fix property 8 2023-08-01 05:35:01 +02:00
png Tests: Add a png in Display P3 that shows up as solid color in sRGB 2024-01-12 16:20:46 -07:00
pnm Tests: Add a pam cmyk test file 2024-01-26 07:36:53 +01:00
tga Tests: Move tga test images into tga/ subfolder 2023-06-19 06:42:00 -04:00
tiff LibGfx/TIFF: Add support for Group4Fax encoded images 2024-02-21 13:49:43 +01:00
tvg LibGfx/TinyVG: Fix decoding green channel of graphics RGB565 colors 2024-03-12 21:53:23 +00:00
webp Tests: Add test for webp with color index transform and alpha_used=false 2023-06-20 11:35:03 +02:00
woff LibGfx/WOFF: Ensure header totalSfntSize matches expected value 2023-10-24 07:29:09 +02:00
woff2 LibGfx/WOFF2: Ensure numTables is within expected range 2023-10-26 08:39:26 +02:00
download-animation.gif LibGfx: Move TestImageDecoder over to input file approach in 8cfabbcd93 2023-02-01 08:56:56 -05:00
loop_forever.avif LibGfx: Add initial ISO BMFF parsing and a utility to print file info 2023-07-27 12:02:37 +01:00
TestFont.font LibGfx: Move TestFontHandling over to input file approach in 8cfabbcd93 2023-02-01 08:56:56 -05:00