There is a canvas, which I set the size
<canvas id='my_canvas' height=300px width=400px>Reload page</canvas> After that I upload a picture into it and crop it (I do not quite cut it, but I display a part)
ctx.drawImage(pic,position,0,size,size,0,0,size,size); How can I resize the canvas after "trimming" the image? If you prescribe through the code, nothing changes
canvas.width=position; canvas.height=position; Thank!