mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:17:34 +00:00
LibGfx/DDSLoader: Allow image dimensions that are not divisible by 4
This commit is contained in:
parent
bf75ecdcf7
commit
b25efa219b
4 changed files with 22 additions and 6 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <AK/DeprecatedString.h>
|
||||
#include <LibCore/MappedFile.h>
|
||||
#include <LibGfx/ImageFormats/BMPLoader.h>
|
||||
#include <LibGfx/ImageFormats/DDSLoader.h>
|
||||
#include <LibGfx/ImageFormats/GIFLoader.h>
|
||||
#include <LibGfx/ImageFormats/ICOLoader.h>
|
||||
#include <LibGfx/ImageFormats/ILBMLoader.h>
|
||||
|
@ -617,3 +618,18 @@ TEST_CASE(test_jxl_modular_property_8)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE(test_dds)
|
||||
{
|
||||
Array file_names = {
|
||||
TEST_INPUT("dds/catdog-alert-29x29.dds"sv),
|
||||
TEST_INPUT("dds/catdog-alert-32x32.dds"sv)
|
||||
};
|
||||
|
||||
for (auto file_name : file_names) {
|
||||
auto file = MUST(Core::MappedFile::map(file_name));
|
||||
EXPECT(Gfx::DDSImageDecoderPlugin::sniff(file->bytes()));
|
||||
auto plugin_decoder = MUST(Gfx::DDSImageDecoderPlugin::create(file->bytes()));
|
||||
expect_single_frame(*plugin_decoder);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue