How this tool computes its result
Accepts image file upload in the browser, reads dimensions via Image element onload, then resizes using canvas drawImage with computed scale factor. Scale is derived as min(targetWidth / originalWidth, targetHeight / originalHeight, 1) to maintain aspect ratio and prevent upscaling. Canvas output is encoded to WebP format via canvas.toBlob() with a quality parameter (1-100, default 80%). Output size, dimensions, and compression reduction percentage are reported. Resized image is displayed in a preview area and can be downloaded.
