mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
Demux: Add option to get frame count using GetI()
Also tweak the code for single image and fragmented image cases, so that dmux->num_frames_ is always correct. Change-Id: I31e6904222e4d96a54a0d8c8aa73d43b7a9094e7
This commit is contained in:
@ -107,7 +107,11 @@ enum WebPFormatFeature {
|
||||
WEBP_FF_CANVAS_WIDTH,
|
||||
WEBP_FF_CANVAS_HEIGHT,
|
||||
WEBP_FF_LOOP_COUNT,
|
||||
WEBP_FF_BACKGROUND_COLOR
|
||||
WEBP_FF_BACKGROUND_COLOR,
|
||||
WEBP_FF_FRAME_COUNT // Number of frames present in the demux object.
|
||||
// In case of a partial demux, this is the number of
|
||||
// frames seen so far, with the last frame possibly
|
||||
// being partial.
|
||||
};
|
||||
|
||||
// Get the 'feature' value from the 'dmux'.
|
||||
@ -121,7 +125,7 @@ WEBP_EXTERN(uint32_t) WebPDemuxGetI(
|
||||
|
||||
struct WebPIterator {
|
||||
int frame_num;
|
||||
int num_frames;
|
||||
int num_frames; // equivalent to WEBP_FF_FRAME_COUNT.
|
||||
int fragment_num;
|
||||
int num_fragments;
|
||||
int x_offset, y_offset; // offset relative to the canvas.
|
||||
|
Reference in New Issue
Block a user