openjpeg_ffi_bindings_generated library

Classes

Jp2kDecodeResult
Result of decoding one JPEG2000 codestream. pixels is interleaved, tightly packed, width * height * num_components bytes — NULL on failure, in which case error is set instead (else NULL).
Jp2kEncodeResult
Result of encoding one raster to a raw J2K codestream. data is the encoded codestream, length bytes long — NULL on failure, in which case error is set instead (else NULL).

Functions

jp2k_decode(Pointer<Uint8> data, int length, int reduced_resolution_factor) Pointer<Jp2kDecodeResult>
Decodes a raw J2K codestream (starts FF4F = SOC marker — not the box-structured .jp2 file format) from data/length.
jp2k_encode(Pointer<Uint8> pixels, int width, int height, int num_components, double compression_ratio) Pointer<Jp2kEncodeResult>
Encodes an interleaved, tightly packed, 8-bit-per-sample raster (width * height * num_components bytes, row-major, no padding) to a raw J2K codestream (SOC marker FF4F — not the box-structured .jp2 file format).
jp2k_free_encode_result(Pointer<Jp2kEncodeResult> result) → void
jp2k_free_result(Pointer<Jp2kDecodeResult> result) → void