Images 💾

Last commit ⭐

commit 0d0842dc8bffa171b0d401db9b1754d524b23c01
Author:     Nico Weber <thakis@chromium.org>
AuthorDate: Sun Feb 9 19:05:31 2025 -0500
Commit:     Nico Weber <thakis@chromium.org>
CommitDate: Sun Feb 9 21:32:42 2025 -0500

    Tests/LibGfx: Add test coverage for early return in bitplane decoding
    
    The `if (number_of_coding_passes == 0)` in decode_code_block() is needed
    to not crash on the image in example.pdf (see link in #25701), but it
    was not covered by tests. Now it is.
    
    The test is an image with a fully-solid alpha channel using the
    `termall` code block style.
    
    I created the input file by:
    
    1. Opening ref.png in Photoshop and putting a completely white
       layer in the background
    
    2. Saving that as ref-white.jpf, with transparency included
       (the alpha channel is solid 0xff everywhere)
    
    3. Running:
    
           ~/Downloads/jasper-build/src/app/jasper --input \
               Tests/LibGfx/*-inputs/*2000/ref-white.jpf \
               --output cb-termall-white.jp2 -O termall