mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
Update WebP2 binding code
This commit is contained in:
committed by
Ingvar Stepanyan
parent
7266c94f52
commit
618a4d777b
@@ -14,9 +14,9 @@ val decode(std::string image_in) {
|
|||||||
if (status != WP2_STATUS_OK) {
|
if (status != WP2_STATUS_OK) {
|
||||||
return val::null();
|
return val::null();
|
||||||
}
|
}
|
||||||
return ImageData.new_(
|
return ImageData.new_(Uint8ClampedArray.new_(typed_memory_view(buffer.stride() * buffer.height(),
|
||||||
Uint8ClampedArray.new_(typed_memory_view(buffer.stride * buffer.height, buffer.GetRow8(0))),
|
buffer.GetRow8(0))),
|
||||||
buffer.width, buffer.height);
|
buffer.width(), buffer.height());
|
||||||
}
|
}
|
||||||
|
|
||||||
EMSCRIPTEN_BINDINGS(my_module) {
|
EMSCRIPTEN_BINDINGS(my_module) {
|
||||||
|
|||||||
Reference in New Issue
Block a user