Files
squoosh/codecs/webp/dec
Ingvar Stepanyan de543b3206 Further speed improvements
- Store Emscripten cache inside node_modules/.em_cache. Docker image ships without LTO libs, so Emscripten has to rebuild stdlibs on every build otherwise.
 - Merge webp_enc + webp_dec build scripts. Core libwebp library is same in both cases, so there's no point in storing and building two copies of it.
2020-05-13 19:39:27 +01:00
..
2020-05-13 19:39:27 +01:00
2020-05-13 19:39:27 +01:00
2020-05-13 19:39:27 +01:00
2020-05-13 19:39:27 +01:00
2020-05-13 19:39:27 +01:00
2020-05-13 19:39:27 +01:00

WebP decoder

Example

See example.html

API

int version()

Returns the version of libwebp as a number. va.b.c is encoded as 0x0a0b0c

RawImage decode(std::string buffer)

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

void free_result()

Frees the result created by decode().