mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
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:
parent
21db070887
commit
5bce58cd3e
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,7 @@
|
||||||
#include <LibGfx/PNGLoader.h>
|
#include <LibGfx/PNGLoader.h>
|
||||||
#include <LibGfx/PPMLoader.h>
|
#include <LibGfx/PPMLoader.h>
|
||||||
#include <LibGfx/QOILoader.h>
|
#include <LibGfx/QOILoader.h>
|
||||||
|
#include <LibGfx/TGALoader.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
|
|
||||||
|
@ -66,6 +67,10 @@ RefPtr<ImageDecoder> ImageDecoder::try_create(ReadonlyBytes bytes)
|
||||||
if (plugin->sniff())
|
if (plugin->sniff())
|
||||||
return plugin;
|
return plugin;
|
||||||
|
|
||||||
|
plugin = make<TGAImageDecoderPlugin>(data, size);
|
||||||
|
if (plugin->sniff())
|
||||||
|
return plugin;
|
||||||
|
|
||||||
return {};
|
return {};
|
||||||
}(data, size);
|
}(data, size);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue