1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

LibGfx: Implement image decoder for TinyVG (.tvg)

This adds a decoder for the TinyVG vector format (https://tinyvg.tech/).
TinyVG is a very simple binary vector format, but it is good enough to
represent a lot of SVGs, without needing the full web engine.

The main use case for Serenity is for scalable icons (which .tvg easily
handles).
This commit is contained in:
MacDue 2023-07-02 22:24:01 +01:00 committed by Jelle Raaijmakers
parent e7cddda7e1
commit ae18186905
4 changed files with 640 additions and 0 deletions

View file

@ -17,6 +17,7 @@
#include <LibGfx/ImageFormats/PPMLoader.h>
#include <LibGfx/ImageFormats/QOILoader.h>
#include <LibGfx/ImageFormats/TGALoader.h>
#include <LibGfx/ImageFormats/TinyVGLoader.h>
#include <LibGfx/ImageFormats/WebPLoader.h>
namespace Gfx {
@ -39,6 +40,7 @@ static OwnPtr<ImageDecoderPlugin> probe_and_sniff_for_appropriate_plugin(Readonl
{ JPEGImageDecoderPlugin::sniff, JPEGImageDecoderPlugin::create },
{ DDSImageDecoderPlugin::sniff, DDSImageDecoderPlugin::create },
{ QOIImageDecoderPlugin::sniff, QOIImageDecoderPlugin::create },
{ TinyVGImageDecoderPlugin::sniff, TinyVGImageDecoderPlugin::create },
{ WebPImageDecoderPlugin::sniff, WebPImageDecoderPlugin::create },
};