LibGfx: Plumb the TGALoader into ImageDecoder :^)

This patch plumbs the TGALoader into ImageDecoder
so TGA images can be decoded by the system
This commit is contained in:
Tom Needham 2022-08-17 20:02:44 +01:00 committed by Jelle Raaijmakers
parent 21db070887
commit 5bce58cd3e
Notes: sideshowbarker 2024-07-17 07:48:42 +09:00

View File

@ -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);