Преглед изворни кода

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.
Andreas Kling пре 3 година
родитељ
комит
62ce7653cb
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Userland/Libraries/LibGUI/FileIconProvider.cpp

+ 1 - 1
Userland/Libraries/LibGUI/FileIconProvider.cpp

@@ -188,7 +188,7 @@ Icon FileIconProvider::icon_for_executable(const String& path)
         if (!section.has_value()) {
         if (!section.has_value()) {
             bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size);
             bitmap = s_executable_icon.bitmap_for_size(icon_section.image_size);
         } else {
         } else {
-            bitmap = Gfx::load_png_from_memory(reinterpret_cast<u8 const*>(section->raw_data()), section->size());
+            bitmap = Gfx::PNGImageDecoderPlugin(reinterpret_cast<u8 const*>(section->raw_data()), section->size()).bitmap();
         }
         }
 
 
         if (!bitmap) {
         if (!bitmap) {