LibGfx: Add support for animated images to ImageDecoder{Plugin}

Adds methods to determine whether an image is animated, how many times
the animation loops, the number of frames, and to get individual frames.

Implements stubs of these methods for PNGImageDecoderPlugin and
GIFImageDecoderPlugin.
This commit is contained in:
Peter Nelson 2020-05-03 17:12:54 +01:00 committed by Andreas Kling
commit d22bb92764
Notes: sideshowbarker 2024-07-19 06:49:23 +09:00
5 changed files with 71 additions and 2 deletions

View file

@ -46,6 +46,10 @@ public:
virtual void set_volatile() override;
[[nodiscard]] virtual bool set_nonvolatile() override;
virtual bool sniff() override;
virtual bool is_animated() override;
virtual size_t loop_count() override;
virtual size_t frame_count() override;
virtual ImageFrameDescriptor frame(size_t i) override;
private:
OwnPtr<PNGLoadingContext> m_context;