ladybird/Libraries/LibDraw/GIFLoader.h
Andreas Kling 00ab9488ad LibDraw: Start work on a GIF decoder (not yet functional!)
Here comes the first part of a GIF decoder. It decodes up to the point
of gathering all the LZW-compressed data. The next step is to implement
decompression, and then turn the decompressed data into a bitmap using
the color maps, etc.
2019-11-23 16:50:21 +01:00

22 lines
542 B
C++

#pragma once
#include <LibDraw/GraphicsBitmap.h>
#include <LibDraw/ImageDecoder.h>
RefPtr<GraphicsBitmap> load_gif(const StringView& path);
RefPtr<GraphicsBitmap> load_gif_from_memory(const u8*, size_t);
struct GIFLoadingContext;
class GIFImageDecoderPlugin final : public ImageDecoderPlugin {
public:
virtual ~GIFImageDecoderPlugin() override;
GIFImageDecoderPlugin(const u8*, size_t);
virtual Size size() override;
virtual RefPtr<GraphicsBitmap> bitmap() override;
private:
OwnPtr<GIFLoadingContext> m_context;
};