mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Lagom: Make BMP fuzzer look like the other image loader fuzzers
This commit is contained in:
parent
4f12efe191
commit
ec4c2f971b
Notes:
sideshowbarker
2024-07-19 01:15:44 +09:00
Author: https://github.com/nico
Commit: ec4c2f971b
Pull-request: https://github.com/SerenityOS/serenity/pull/4162
Reviewed-by: https://github.com/linusg
3 changed files with 10 additions and 9 deletions
|
@ -186,6 +186,14 @@ RefPtr<Gfx::Bitmap> load_bmp(const StringView& path)
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> load_bmp_from_memory(const u8* data, size_t length)
|
||||
{
|
||||
auto bitmap = load_bmp_impl(data, length);
|
||||
if (bitmap)
|
||||
bitmap->set_mmap_name(String::format("Gfx::Bitmap [%dx%d] - Decoded BMP: <memory>", bitmap->width(), bitmap->height()));
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
static const LogStream& operator<<(const LogStream& out, Endpoint<i32> ep)
|
||||
{
|
||||
return out << "(" << ep.x << ", " << ep.y << ", " << ep.z << ")";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue