create static method

Create an encoder to save a series of images to a file.

These animation types are currently supported:

  • ANI
  • APNG
  • AVIFS
  • GIF
  • WEBP

The file type is determined from the file extension, e.g. "file.webp" will be encoded using WEBP.

\param file the file where the animation will be saved. \returns a new IMG_AnimationEncoder, or NULL on failure; call SDL_GetError() for more information.

\since This function is available since SDL_image 3.4.0.

\sa IMG_CreateAnimationEncoder_IO \sa IMG_CreateAnimationEncoderWithProperties \sa IMG_AddAnimationEncoderFrame \sa IMG_CloseAnimationEncoder

extern SDL_DECLSPEC IMG_AnimationEncoder * SDLCALL IMG_CreateAnimationEncoder(const char *file)

Implementation

static Pointer<ImgAnimationEncoder> create(String file) =>
    imgCreateAnimationEncoder(file);