I developed an input that allows me to paste images inside, using CTRL-V.
I copy an image from the browser using (copy image address), done that, put the mouse in the input and do ctrl-v to paste the image.
I can get the image in base64, is there a way to "draw / transform" that image and place it with a height and width of 600/600?
That is, in the image I receive, I intend it to be 600 in height and width. I have tried to implement some functions using Canvas but without success.
Can someone help me?
Code
@HostListener("paste", ["$event"])
onPaste(e: ClipboardEvent) {
let clipboardData = e.clipboardData || (window as any).clipboardData;
let pastedData = clipboardData.getData("text");
console.log(pastedData)
}