Scroll to navigation

IMG_CreateAnimationEncoder_IO(3) SDL_image3 FUNCTIONS IMG_CreateAnimationEncoder_IO(3)

NAME

IMG_CreateAnimationEncoder_IO - Create an encoder to save a series of images to an IOStream.

SYNOPSIS

#include <SDL3_image/SDL_image.h>
IMG_AnimationEncoder * IMG_CreateAnimationEncoder_IO(SDL_IOStream *dst, bool closeio, const char *type);

DESCRIPTION

These animation types are currently supported:

• ANI

• APNG

• AVIFS

• GIF

• WEBP

If closeio is true, dst will be closed before returning if this function fails, or when the animation encoder is closed if this function succeeds.

FUNCTION PARAMETERS

an SDL_IOStream that will be used to save the stream.
true to close the SDL_IOStream when done, false to leave it open.
a filename extension that represent this data ("WEBP", etc).

RETURN VALUE

Returns a new IMG_AnimationEncoder, or NULL 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_CreateAnimationEncoderWithProperties(3), IMG_AddAnimationEncoderFrame(3), IMG_CloseAnimationEncoder(3)

SDL_image 3.3.4 SDL_image