Skip to main content

IMG_CreateAnimationEncoder_IO

Function IMG_CreateAnimationEncoder_IO 

Source
pub unsafe extern "C" fn IMG_CreateAnimationEncoder_IO(
    dst: *mut SDL_IOStream,
    closeio: bool,
    type_: *const c_char,
) -> *mut IMG_AnimationEncoder
Expand description

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

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.

Parameter: dst an SDL_IOStream that will be used to save the stream.

Parameter: closeio true to close the SDL_IOStream when done, false to leave it open.

Parameter: type a filename extension that represent this data (“WEBP”, etc).

Returns: a new IMG_AnimationEncoder, 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_CreateAnimationEncoder

See Also: IMG_CreateAnimationEncoderWithProperties

See Also: IMG_AddAnimationEncoderFrame

See Also: IMG_CloseAnimationEncoder