From 62ce7653cbbda84f4be72d530b7f39eef5c6e2c7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 12 Nov 2021 13:21:20 +0100 Subject: [PATCH] LibGUI: Use PNGImageDecoderPlugin for ELF icon extraction Getting rid of all the remaining calls to load_png_from_memory() and the related wrappers for each decoder. --- Userland/Libraries/LibGUI/FileIconProvider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGUI/FileIconProvider.cpp b/Userland/Libraries/LibGUI/FileIconProvider.cpp index 82180adee0..066ba4463f 100644 --- a/Userland/Libraries/LibGUI/FileIconProvider.cpp +++ b/Userland/Libraries/LibGUI/FileIconProvider.cpp @@ -188,7 +188,7 @@ Icon FileIconProvider::icon_for_executable(const String& path) if (!section.has_value()) { bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size); } else { - bitmap = Gfx::load_png_from_memory(reinterpret_cast(section->raw_data()), section->size()); + bitmap = Gfx::PNGImageDecoderPlugin(reinterpret_cast(section->raw_data()), section->size()).bitmap(); } if (!bitmap) {