lc_image_encode_png function

  1. @Native<Int32 Function(Pointer<LcImage>, Pointer<Pointer<Uint8>>, Pointer<Size>)>(ffi.Pointer<LcImage>, ffi.Pointer<ffi.Pointer<ffi.Uint8>>, ffi.Pointer<ffi.Size>)>()
int lc_image_encode_png(
  1. Pointer<LcImage> image,
  2. Pointer<Pointer<Uint8>> out_data,
  3. Pointer<Size> out_len
)

Encodes the canvas as PNG into a newly allocated buffer, written to *out_data/*out_len. Returns 0 on success, non-zero on failure. On success, the caller must release the buffer with lc_buffer_free.

Implementation

@ffi.Native<
  ffi.Int32 Function(
    ffi.Pointer<LcImage>,
    ffi.Pointer<ffi.Pointer<ffi.Uint8>>,
    ffi.Pointer<ffi.Size>,
  )
>()
external int lc_image_encode_png(
  ffi.Pointer<LcImage> image,
  ffi.Pointer<ffi.Pointer<ffi.Uint8>> out_data,
  ffi.Pointer<ffi.Size> out_len,
);