Resizes an image inside the Worker: fit inside a box (no upscaling unless allowed), cover a box, exact size, percentage, or a fixed width or height with the aspect ratio kept. Shrinking uses area averaging (alpha-weighted) and enlarging bilinear interpolation. PNG is decoded and encoded in pure JavaScript; other formats are decoded by the browser, and JPEG/WebP output with quality control is available where the browser can encode them. The result downloads as a binary file and is shown in the preview. Everything runs locally.