Przeglądaj źródła

LibGfx: Plumb the TGALoader into ImageDecoder :^)

This patch plumbs the TGALoader into ImageDecoder
so TGA images can be decoded by the system
Tom Needham 3 lat temu
rodzic
commit
5bce58cd3e
1 zmienionych plików z 5 dodań i 0 usunięć
  1. 5 0
      Userland/Libraries/LibGfx/ImageDecoder.cpp

+ 5 - 0
Userland/Libraries/LibGfx/ImageDecoder.cpp

@@ -15,6 +15,7 @@
 #include <LibGfx/PNGLoader.h>
 #include <LibGfx/PPMLoader.h>
 #include <LibGfx/QOILoader.h>
+#include <LibGfx/TGALoader.h>
 
 namespace Gfx {
 
@@ -66,6 +67,10 @@ RefPtr<ImageDecoder> ImageDecoder::try_create(ReadonlyBytes bytes)
         if (plugin->sniff())
             return plugin;
 
+        plugin = make<TGAImageDecoderPlugin>(data, size);
+        if (plugin->sniff())
+            return plugin;
+
         return {};
     }(data, size);