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:
Lucas CHOLLET 2023-07-05 11:19:43 -04:00 committed by Sam Atkins
parent 01910bca39
commit aff38ae80f
Notes: sideshowbarker 2024-07-16 23:05:02 +09:00
2 changed files with 10 additions and 0 deletions

View file

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B