# Image Resizer

Version: 0.2.0
License: MIT

Resize or crop one static JPG, PNG, or WebP image to exact pixel dimensions. Choose proportional scaling, crop-to-fill, or intentional stretching. Preview and download the result locally in your browser.

## Run
Serve this folder over localhost or HTTPS (for example, `python -m http.server 8000`) and open `index.html`. No backend, API key, third-party runtime, or install is required.

## Use
Choose an image, set width and height, select a fit mode and output format, then generate and inspect the preview. Preserve proportions adjusts the other dimension as you type. Crop to fill keeps the requested dimensions and trims the source edges; horizontal and vertical sliders select the crop focus. Stretch to fit keeps the dimensions but can distort the image.

For example, a 1600 × 900 landscape source cropped to 1080 × 1080 selects a 900 × 900 square before resampling. At centered focus, the square starts 350 source pixels from the left edge.

## Limits and privacy
Maximum input: 15 MB and 20 megapixels; maximum output: 20 megapixels. Supports one static JPG, PNG, or WebP image. Resizing cannot add detail; cropping removes image edges; stretching distorts mismatched aspect ratios. JPEG transparency is flattened on white. Browser canvas can change color profiles and metadata. Processing happens in the current tab and the source file is not uploaded.

## Environment
Modern browser with JavaScript modules, Canvas, and image decoding/export support.

## Version history
- 0.2.0 (2026-10-28): Added crop-to-fill with adjustable focus and explicit fit modes; extracted a standalone MIT source project.
- 0.1.0 (2026-10-28): Initial browser-local exact-pixel resizer.
