Created
July 6, 2022 08:45
-
-
Save esimov/e412a659cd9e12db2e483899137751e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uint8Arr := js.Global().Get("Uint8Array").New(width * height * 4) | |
js.CopyBytesToJS(uint8Arr2, pixels.ImgToPix(blurred)) | |
uint8Clamped := js.Global().Get("Uint8ClampedArray").New(uint8Arr2) | |
rawData := js.Global().Get("ImageData").New(uint8Clamped, width, height) | |
c.ctx.Call("putImageData", rawData, 0, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment