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

encoder
    the receiving images.

surface
    the surface to add as the next frame in the animation.

duration
    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)