diff options
Diffstat (limited to 'Userland/Libraries/LibGfx/PBMLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/PBMLoader.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGfx/PBMLoader.cpp b/Userland/Libraries/LibGfx/PBMLoader.cpp index 573c174fc4..a90cd05c80 100644 --- a/Userland/Libraries/LibGfx/PBMLoader.cpp +++ b/Userland/Libraries/LibGfx/PBMLoader.cpp @@ -102,12 +102,9 @@ RefPtr<Gfx::Bitmap> load_pbm(const StringView& path) return load<PBMLoadingContext>(path); } -RefPtr<Gfx::Bitmap> load_pbm_from_memory(const u8* data, size_t length) +RefPtr<Gfx::Bitmap> load_pbm_from_memory(u8 const* data, size_t length, String const& mmap_name) { - auto bitmap = load_impl<PBMLoadingContext>(data, length); - if (bitmap) - bitmap->set_mmap_name(String::formatted("Gfx::Bitmap [{}] - Decoded PBM: <memory>", bitmap->size())); - return bitmap; + return load_from_memory<PBMLoadingContext>(data, length, mmap_name); } PBMImageDecoderPlugin::PBMImageDecoderPlugin(const u8* data, size_t size) |