IMG_AddAnimationEncoderFrame - Man Page

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)

Referenced By

IMG_CreateAnimationEncoder(3), IMG_CreateAnimationEncoder_IO(3), IMG_CreateAnimationEncoderWithProperties(3).

SDL_image 3.4.0 SDL_image3 FUNCTIONS