This commit is contained in:
sagudev 2021-03-30 11:38:33 +02:00
parent 61d7775673
commit 5f91ab07da
2 changed files with 2 additions and 6 deletions

BIN
canvas.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

View file

@ -114,12 +114,8 @@ impl ImageData {
let len = width * height * 4;
let cx = global.get_cx();
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
Uint8ClampedArray::create(
*cx,
CreateWith::Length(len as usize),
array.handle_mut(),
)
.unwrap();
Uint8ClampedArray::create(*cx, CreateWith::Length(len as usize), array.handle_mut())
.unwrap();
(*imagedata).data.set(array.get());
Ok(reflect_dom_object(imagedata, global))