diff options
Diffstat (limited to 'Userland/Libraries/LibGfx/PGMLoader.cpp')
-rw-r--r-- | Userland/Libraries/LibGfx/PGMLoader.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Userland/Libraries/LibGfx/PGMLoader.cpp b/Userland/Libraries/LibGfx/PGMLoader.cpp index 79323d0981..be2aad4821 100644 --- a/Userland/Libraries/LibGfx/PGMLoader.cpp +++ b/Userland/Libraries/LibGfx/PGMLoader.cpp @@ -104,12 +104,9 @@ RefPtr<Gfx::Bitmap> load_pgm(const StringView& path) return load<PGMLoadingContext>(path); } -RefPtr<Gfx::Bitmap> load_pgm_from_memory(const u8* data, size_t length) +RefPtr<Gfx::Bitmap> load_pgm_from_memory(u8 const* data, size_t length, String const& mmap_name) { - auto bitmap = load_impl<PGMLoadingContext>(data, length); - if (bitmap) - bitmap->set_mmap_name(String::formatted("Gfx::Bitmap [{}] - Decoded PGM: <memory>", bitmap->size())); - return bitmap; + return load_from_memory<PGMLoadingContext>(data, length, mmap_name); } PGMImageDecoderPlugin::PGMImageDecoderPlugin(const u8* data, size_t size) |