AiLounge Tools

Image Compression & Resizing

Single-image compression, aspect-locked resizing and JPEG/PNG/WebP conversion; this round ships a testable deterministic output plan, with real codecs not yet wired.Local processing · plan only, no real codec this round

Resize image

Compute real export pixels from target width/height and aspect lock; EXIF orientation is applied before scaling. 2000×1000 with locked aspect and width 1000 yields 1000×500, identical for preview and export.

Run in browser

Inputs and parameters

Real example

PNG 2000×1000, lockAspect=true, targetWidth=1000 (alpha=false)
→ {"resize":{"width":1000,"height":500,"scale":0.5,"previewOnly":false,"changesEncodedDimensions":true},"output":{"width":1000,"height":500}}

Limits and failure handling

Dimensions must be integers in 1–100000; outputs over 24 MP are rejected. Only dimension arithmetic is performed — no real resampling or pixel data this round; actual resized encoding is untested.

FAQ

Is only the preview scaled?

No. output.width/output.height are export pixels, identical to resize.width/height; previewOnly is always false.

What about an EXIF-rotated portrait photo?

The stored pixel grid is first normalized for orientation 6 to 3000×4000 with orientation reset to 1, then scaled by target width; no double rotation.