Extracted and built from Google's Squoosh app, packaged for NPM.
See dec/example.html
and enc/example.html
Returns the version of libwebp as a number. va.b.c is encoded as 0x0a0b0c
Decodes the given webp buffer into raw RGBA. RawImage
is a class with 3 fields: buffer
, width
, and height
.
Frees the result created by decode()
.
Returns the version of libwebp as a number. va.b.c is encoded as 0x0a0b0c
Encodes the given image with given dimension to WebP.
Frees the last result created by encode()
.