mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-11 16:26:20 +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) {
|
||||
return val::null();
|
||||
}
|
||||
return ImageData.new_(
|
||||
Uint8ClampedArray.new_(typed_memory_view(buffer.stride * buffer.height, buffer.GetRow8(0))),
|
||||
buffer.width, buffer.height);
|
||||
return ImageData.new_(Uint8ClampedArray.new_(typed_memory_view(buffer.stride() * buffer.height(),
|
||||
buffer.GetRow8(0))),
|
||||
buffer.width(), buffer.height());
|
||||
}
|
||||
|
||||
EMSCRIPTEN_BINDINGS(my_module) {
|
||||
|
||||
Reference in New Issue
Block a user