Files
squoosh/codecs/avif_dec
Ingvar Stepanyan 2edb8cbd7e Upgrade AVIF decoding code
- Update to newer APIs.
 - Avoid manual pixel-by-pixel copy in favour of decoding directly to desired format & bit depth.
 - Avoid use-after-free by cloning the Uint8Array Wasm memory view into a JS-owned Uint8Array right away.
2020-08-05 14:38:56 +01:00
..
2020-08-05 14:38:56 +01:00
2020-08-05 14:38:56 +01:00
2020-08-05 14:38:56 +01:00
2020-08-05 14:38:56 +01:00
2020-08-05 14:38:51 +01:00
2020-08-05 14:36:21 +01:00
2020-08-05 14:36:21 +01:00
2020-08-05 14:36:21 +01:00
2020-08-05 14:38:51 +01:00

AVIF decoder

Example

See example.html

API

RawImage decode(std::string buffer)

Decodes the given avif buffer into raw RGBA. RawImage is a class with 3 fields: buffer, width, and height.

void free_result()

Frees the result created by decode().