image_ffmpeg_encode_png_rgba function

  1. @Native<Int32 Function(Pointer<Uint8>, Uint32, Uint32, Uint32, Uint32, Uint32, Pointer<image_ffmpeg_buffer>)>(ffi.Pointer<ffi.Uint8>, ffi.Uint32, ffi.Uint32, ffi.Uint32, ffi.Uint32, ffi.Uint32, ffi.Pointer<image_ffmpeg_buffer>)>()
int image_ffmpeg_encode_png_rgba(
  1. Pointer<Uint8> rgba,
  2. int rgba_length,
  3. int width,
  4. int height,
  5. int stride,
  6. int compression_level,
  7. Pointer<image_ffmpeg_buffer> output,
)

Encodes RGBA8888 pixels as a complete PNG image, preserving alpha. Compression level is 0 (fastest) to 9 (smallest).

Implementation

@ffi.Native<
  ffi.Int32 Function(
    ffi.Pointer<ffi.Uint8>,
    ffi.Uint32,
    ffi.Uint32,
    ffi.Uint32,
    ffi.Uint32,
    ffi.Uint32,
    ffi.Pointer<image_ffmpeg_buffer>,
  )
>()
external int image_ffmpeg_encode_png_rgba(
  ffi.Pointer<ffi.Uint8> rgba,
  int rgba_length,
  int width,
  int height,
  int stride,
  int compression_level,
  ffi.Pointer<image_ffmpeg_buffer> output,
);