mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
LibGfx: Add first_animated_frame_index method to ImageDecoder
Some image formats such as APNG may not use the first frame for animations.
This commit is contained in:
parent
5a4c61838f
commit
e7921cfe14
20 changed files with 64 additions and 4 deletions
|
@ -71,6 +71,7 @@ public:
|
|||
virtual bool is_animated() override;
|
||||
virtual size_t loop_count() override;
|
||||
virtual size_t frame_count() override;
|
||||
virtual size_t first_animated_frame_index() override;
|
||||
virtual ErrorOr<ImageFrameDescriptor> frame(size_t index) override;
|
||||
virtual ErrorOr<Optional<ReadonlyBytes>> icc_data() override;
|
||||
|
||||
|
@ -160,6 +161,12 @@ size_t PortableImageDecoderPlugin<TContext>::frame_count()
|
|||
return 1;
|
||||
}
|
||||
|
||||
template<typename TContext>
|
||||
size_t PortableImageDecoderPlugin<TContext>::first_animated_frame_index()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
template<typename TContext>
|
||||
ErrorOr<ImageFrameDescriptor> PortableImageDecoderPlugin<TContext>::frame(size_t index)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue