You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do multiple tests, without changing the cropper, and use getImageData on the canvas, I get different ImageData the second time. After that it somehow stabilizes and returns the same.
I have no idea why this is happening.
Here's my Typescript (and Vue3) code:
const result = cropperRef.value?.getResult();
if (result && result.canvas) {
let imagedata: Uint8ClampedArray = new Uint8ClampedArray(0);
const ctx = result.canvas.getContext('2d');
if (ctx) {
const imageData = ctx.getImageData(
0,
0,
result.canvas.width,
result.canvas.height,
);
imagedata = imageData.data;
}
console.log(imagedata);
}
Any idea why this data could be different when nothing else was changed?
The text was updated successfully, but these errors were encountered:
It seems this has something to do with farbling, which Brave Browser does by default on each canvas. It's for security reasons. Kinda sucks though, since this causes the canvas to be (a tiny little bit) different from time to time, which is not what I want.
When I do multiple tests, without changing the cropper, and use
getImageData
on the canvas, I get different ImageData the second time. After that it somehow stabilizes and returns the same.I have no idea why this is happening.
Here's my Typescript (and Vue3) code:
Any idea why this data could be different when nothing else was changed?
The text was updated successfully, but these errors were encountered: