Skip to main content

IMG_CreateAnimationDecoder

Function IMG_CreateAnimationDecoder 

Source
pub unsafe extern "C" fn IMG_CreateAnimationDecoder(
    file: *const c_char,
) -> *mut IMG_AnimationDecoder
Expand description

Create a decoder to read a series of images from 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 decoded using WEBP.

Parameter: file the file containing a series of images.

Returns: a new IMG_AnimationDecoder, or NULL on failure; call SDL_GetError() for more information.

Available Since: This function is available since SDL_image 3.4.0.

See Also: IMG_CreateAnimationDecoder_IO

See Also: IMG_CreateAnimationDecoderWithProperties

See Also: IMG_GetAnimationDecoderFrame

See Also: IMG_ResetAnimationDecoder

See Also: IMG_CloseAnimationDecoder