summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorTom Needham <06needhamt@gmail.com>2022-08-17 20:02:44 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-01-15 12:43:03 +0100
commit5bce58cd3e008ff47e137904a13cda0a9335e1c3 (patch)
treed584a0c4ac43b2d34b40c3aa44896403def2fdb5 /Userland/Libraries
parent21db070887a01a891754ba6e837e35cd9090de5b (diff)
downloadserenity-5bce58cd3e008ff47e137904a13cda0a9335e1c3.zip
LibGfx: Plumb the TGALoader into ImageDecoder :^)
This patch plumbs the TGALoader into ImageDecoder so TGA images can be decoded by the system
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibGfx/ImageDecoder.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGfx/ImageDecoder.cpp b/Userland/Libraries/LibGfx/ImageDecoder.cpp
index 8d9720767c..76093068a3 100644
--- a/Userland/Libraries/LibGfx/ImageDecoder.cpp
+++ b/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);