https://pricebosema12.blogspot.com/2024/02/html5-canvas-image-resizing.html
Html5 Canvas: Image Resizing