mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00: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
2 changed files with 10 additions and 0 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue