Scroll to navigation

IMG_AddAnimationEncoderFrame(3) SDL_image3 FUNCTIONS IMG_AddAnimationEncoderFrame(3)

NAME

IMG_AddAnimationEncoderFrame - Add a frame to an animation encoder.

SYNOPSIS

#include <SDL3_image/SDL_image.h>
bool IMG_AddAnimationEncoderFrame(IMG_AnimationEncoder *encoder, SDL_Surface *surface, Uint64 duration);

FUNCTION PARAMETERS

the receiving images.
the surface to add as the next frame in the animation.
the duration of the frame, usually in milliseconds but can be other units if the IMG_PROP_ANIMATION_ENCODER_CREATE_TIMEBASE_DENOMINATOR_NUMBER property is set when creating the encoder.

RETURN VALUE

Returns true on success or false on failure; call SDL_GetError() for more information.

AVAILABILITY

This function is available since SDL_image 3.4.0.

SEE ALSO

IMG_CreateAnimationEncoder(3), IMG_CreateAnimationEncoder_IO(3), IMG_CreateAnimationEncoderWithProperties(3), IMG_CloseAnimationEncoder(3)

SDL_image 3.4.0 SDL_image