I want to get part of a canvas in the base 64 data url format which will be sent to my api for this is I am using the ctx.getImageData() method which is returning a clamped uint 8 array here is the code:
const data = ctx.getImageData(mousex, mousey, mousex1, mousey1);
const clamped = data.data
}
I have tried many btoa methods but the either return a broken array full of A
or a broken array with a lot of /