mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-27 21:21:50 +03:00
Tests: Add a test for grayscale JPEGs with an App14 segment
See af14ed6b2e
for more details.
This test has been created by artificially adding an App14 segment to an
existing grayscale image.
This commit is contained in:
parent
01910bca39
commit
aff38ae80f
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/LucasChollet Commit: https://github.com/SerenityOS/serenity/commit/aff38ae80f Pull-request: https://github.com/SerenityOS/serenity/pull/19818 Reviewed-by: https://github.com/nico
@ -187,6 +187,16 @@ TEST_CASE(test_jpeg_empty_icc)
|
||||
expect_single_frame_of_size(*plugin_decoder, { 80, 80 });
|
||||
}
|
||||
|
||||
TEST_CASE(test_jpeg_grayscale_with_app14)
|
||||
{
|
||||
auto file = MUST(Core::MappedFile::map(TEST_INPUT("jpg/grayscale_app14.jpg"sv)));
|
||||
EXPECT(Gfx::JPEGImageDecoderPlugin::sniff(file->bytes()));
|
||||
auto plugin_decoder = MUST(Gfx::JPEGImageDecoderPlugin::create(file->bytes()));
|
||||
MUST(plugin_decoder->initialize());
|
||||
|
||||
expect_single_frame_of_size(*plugin_decoder, { 80, 80 });
|
||||
}
|
||||
|
||||
TEST_CASE(test_pbm)
|
||||
{
|
||||
auto file = MUST(Core::MappedFile::map(TEST_INPUT("pnm/buggie-raw.pbm"sv)));
|
||||
|
BIN
Tests/LibGfx/test-inputs/jpg/grayscale_app14.jpg
Normal file
BIN
Tests/LibGfx/test-inputs/jpg/grayscale_app14.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 686 B |
Loading…
Reference in New Issue
Block a user