mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibGfx/TIFF: Add support for Group4Fax encoded images
Note that we don't parse the T6 option group yet. The test case was generated with GIMP.
This commit is contained in:
parent
d57d676425
commit
9ec3480207
Notes:
sideshowbarker
2024-07-17 00:23:42 +09:00
Author: https://github.com/LucasChollet
Commit: 9ec3480207
Pull-request: https://github.com/SerenityOS/serenity/pull/23281
Reviewed-by: https://github.com/nico ✅
3 changed files with 26 additions and 0 deletions
|
@ -654,6 +654,18 @@ TEST_CASE(test_tiff_ccitt3_2d_fill)
|
|||
EXPECT_EQ(frame.image->get_pixel(60, 75), Gfx::Color::NamedColor::Black);
|
||||
}
|
||||
|
||||
TEST_CASE(test_tiff_ccitt4)
|
||||
{
|
||||
auto file = TRY_OR_FAIL(Core::MappedFile::map(TEST_INPUT("tiff/ccitt4.tiff"sv)));
|
||||
EXPECT(Gfx::TIFFImageDecoderPlugin::sniff(file->bytes()));
|
||||
auto plugin_decoder = TRY_OR_FAIL(Gfx::TIFFImageDecoderPlugin::create(file->bytes()));
|
||||
|
||||
auto frame = TRY_OR_FAIL(expect_single_frame_of_size(*plugin_decoder, { 400, 300 }));
|
||||
|
||||
EXPECT_EQ(frame.image->get_pixel(0, 0), Gfx::Color::NamedColor::White);
|
||||
EXPECT_EQ(frame.image->get_pixel(60, 75), Gfx::Color::NamedColor::Black);
|
||||
}
|
||||
|
||||
TEST_CASE(test_tiff_lzw)
|
||||
{
|
||||
auto file = TRY_OR_FAIL(Core::MappedFile::map(TEST_INPUT("tiff/lzw.tiff"sv)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue