image_ffmpeg_bindings_generated
library
Classes
-
image_ffmpeg_buffer
-
Owned encoded bytes returned by an encoder operation.
-
image_ffmpeg_encoded_image
-
-
image_ffmpeg_image
-
Owned output from image_ffmpeg_decode_image_rgba. Keep upstream AVFrame and
AVCodecContext details out of this ABI: this exact struct is shared by FFI
and Wasm, and remains stable when FFmpeg changes.
-
image_ffmpeg_image_info
-
Probe information without decoded pixels. has_alpha is -1 when the container
cannot answer without decoding, 0 for no, and 1 for yes. frame_count is zero
when the container does not advertise a count.
-
image_ffmpeg_transcode_options
-
Functions
-
image_ffmpeg_abi_version()
→ int
-
-
image_ffmpeg_buffer_release(Pointer<image_ffmpeg_buffer> buffer)
→ void
-
-
image_ffmpeg_build_info()
→ Pointer<Char>
-
-
image_ffmpeg_decode_image_rgba(Pointer<Uint8> input, int input_length, int max_width, int max_height, Pointer<image_ffmpeg_image> output)
→ int
-
Probes arbitrary encoded bytes as an image, decodes the first frame, and
returns tightly packed RGBA8888. A zero maximum preserves that axis. If both
maxima are non-zero, aspect ratio is preserved and the image fits within the
requested box without upscaling.
-
image_ffmpeg_decode_image_rgba_box_average(Pointer<Uint8> input, int input_length, int max_dimension, int alpha_mode, Pointer<image_ffmpeg_image> output)
→ int
-
Decodes the first frame at full resolution, then fits it within a square and
folds every source pixel into exactly one destination cell using integer-only
box averaging. Decode and fold remain inside native/Wasm memory, so only the
small deterministic RGBA result crosses the language boundary. The result is
never upscaled and max_dimension must be nonzero.
-
image_ffmpeg_encode_jpeg_rgba(Pointer<Uint8> rgba, int rgba_length, int width, int height, int stride, int quality, int chroma, int background_argb, Pointer<image_ffmpeg_buffer> output)
→ int
-
Encodes RGBA8888 as JPEG. Quality is 1..100. background_argb is 0xAARRGGBB
(the alpha byte is ignored); chroma is IMAGE_FFMPEG_JPEG_CHROMA_420 or _444.
-
image_ffmpeg_encode_png_rgba(Pointer<Uint8> rgba, int rgba_length, int width, int height, int stride, int compression_level, Pointer<image_ffmpeg_buffer> output)
→ int
-
Encodes RGBA8888 pixels as a complete PNG image, preserving alpha.
Compression level is 0 (fastest) to 9 (smallest).
-
image_ffmpeg_encoded_image_release(Pointer<image_ffmpeg_encoded_image> image)
→ void
-
-
image_ffmpeg_error_message(int status)
→ Pointer<Char>
-
-
image_ffmpeg_has_ffmpeg()
→ int
-
-
image_ffmpeg_image_release(Pointer<image_ffmpeg_image> image)
→ void
-
Releases output->data and zeroes the struct. Safe on a zeroed image.
-
image_ffmpeg_probe_image(Pointer<Uint8> input, int input_length, Pointer<image_ffmpeg_image_info> output)
→ int
-
Reads image format, geometry, EXIF orientation, frame count, and alpha hints
without decoding a pixel buffer.
-
image_ffmpeg_transcode_image(Pointer<Uint8> input, int input_length, Pointer<image_ffmpeg_transcode_options> options, Pointer<image_ffmpeg_encoded_image> output)
→ int
-
Fused first-frame decode, optional EXIF orientation, solid fill, crop,
fit-within resize, and JPEG/PNG encode. Fill and crop coordinates are in
oriented coordinates when apply_orientation is nonzero. Zero fill or crop
width and height disable that operation.