| File | Original | Aspect | Size (KB) | Target | Copy |
|---|---|---|---|---|---|
| {{ f.name }} | {{ f.originalWidth }}×{{ f.originalHeight }} | {{ f.aspect }} | {{ f.sizeKB }} | {{ f.targetWidth }}×{{ f.targetHeight }} | |
| No files | |||||
Digital images are grids of tiny color samples called pixels, and resizing changes how many of those pixels the picture contains. Use it when you need consistent dimensions for galleries, banners, or product shots and want results that look natural across different layouts.
You bring one or more pictures, choose how the new size should be decided, and pick an output format. The result comes back at the target dimensions with the aspect handled the way you prefer so the picture fits its frame without surprises.
An everyday example is preparing a 4032 by 3024 photo for a page that shows images 1200 pixels wide. Fit to width keeps the shape of the scene and returns 1200 by 900 so nothing looks stretched or squashed.
Be mindful that enlarging a small picture can soften detail, especially for photos with fine texture. For crispness after shrinking, a light sharpening pass can help edges look clean without halos.
The tool operates on raster images, treating width and height as pixel counts measured on the source. It computes a target canvas size and, depending on the mode, either scales the whole image, fits it inside a box, pads it to an exact canvas, or crops to fill a canvas before resizing. Output may be encoded as JPEG, PNG, or WebP, with optional quality control for lossy formats.
Computation proceeds by selecting a scale factor from your inputs, applying it to the source dimensions, and rounding to whole pixels. Results are interpreted as follows: a scale preserves shape at a chosen percentage, a fit keeps the entire image visible within the box, a letterbox preserves all content on an exact canvas with padding, and a cover fills the canvas by cropping evenly from the long side.
When a file size cap is set for JPEG or WebP, encoding quality is searched to stay at or below the target while favoring the highest attainable quality under that limit. PNG is lossless and ignores quality and size caps.
| Symbol | Meaning | Unit/Datatype | Source |
|---|---|---|---|
| , | Source width, height | px | Input |
| , | Requested box or canvas | px | Input |
| p | Scale percentage | 10 to 200 | Input |
| f | Scale factor after clamping | real | Derived |
| , | Exact canvas for letterbox or cover | px | Derived |
| , | Output dimensions | px | Derived |
| Q | Lossy quality | 0.1 to 1.0 | Input |
| File size cap | kilobytes | Input |
| Field | Type | Min | Max | Step/Pattern | Notes |
|---|---|---|---|---|---|
| Width, Height | integer | 1 | ∞ | — | Rounded to whole pixels; blank allowed for Fit calculations. |
| Scale percent | integer | 10 | 200 | 1 | Clamped; percent ignored in other modes. |
| Quality (Q) | real | 0.1 | 1.0 | — | Lossy only; PNG ignores quality. |
| Mode | enum | — | — | scale | fit | letterbox | cover | Cover crops; letterbox pads to canvas. |
| No upscale | boolean | — | — | — | Prevents enlarging; cover may fall back to letterbox. |
| File size cap | integer | 0 | ∞ | KB | Active for JPEG/WebP; searched via quality. |
| Background color | string | — | — | #RGB or #RRGGBB | Used for letterbox and JPEG transparency. |
| Unsharp amount | integer | 0 | 500 | — | Enabled when sharpening is on. |
| Unsharp radius | real | 0 | 5 | 0.1 | Typical ~0.6 px. |
| Unsharp threshold | integer | 0 | 255 | — | Protects flat areas from sharpening. |
| Filename template | string | — | — | {name} {w} {h} {pct} {mode} {ext} | Non‑word characters become underscores. |
| Input | Accepted Families | Output | Encoding/Precision | Rounding |
|---|---|---|---|---|
| Raster image files | PNG, JPEG, WebP | JPEG, PNG, WebP | Quality for JPEG/WebP; PNG is lossless | Dimensions rounded to nearest pixel |
| Constant | Value | Unit | Notes |
|---|---|---|---|
| Quality search lower bound | 0.2 | — | For JPEG/WebP size targeting |
| Quality search upward probes | 4 | — | Attempts to approach the cap without overshoot |
| Quality search iterations | 7 | — | Binary search toward the cap |
| Size cap slack | 6 | KB | Permits slight overshoot |
Units, precision, and rounding. Width and height are integers in pixels. Percent and quality inputs are clamped to their bounds. Offsets for padding and cropping are integer rounded to center the image. File sizes shown in kilobytes are computed from bytes and displayed to one decimal place.
Networking and storage. Processing is browser‑based. Files are read locally, resized on a canvas, and encoded to downloadable blobs. When multiple outputs are produced, a ZIP archive is created on the client. Object URLs are revoked when cleared.
Performance. Work scales with total pixels processed. Very large images may require noticeable time and memory, especially when trying multiple qualities to meet a size cap.
Diagnostics and determinism. Given the same inputs, outputs are deterministic. There is no randomness in scaling, cropping, padding, or quality search.
Security considerations. Untrusted image files are decoded and re‑encoded; scripts are not executed. Background color replaces transparency when saving JPEG, which removes alpha. Avoid opening downloaded files from unknown sources outside your workflow.
Image resizing with precise control over dimensions and format.
Example. Fit a 2560 × 1707 image to 1280 width → output 1280 × 854; save as WebP at 80% quality.
You end with images sized to spec and ready for reuse.
Processing happens in your browser. Files are read locally and not uploaded. Object URLs are revoked when cleared.
JPEG/WebP quality is searched to meet or sit just under your target. A small slack allows near‑cap results without repeated retries.
Inputs: PNG, JPEG, WebP. Outputs: JPEG, PNG, WebP. PNG ignores quality and size caps; JPEG/WebP support them.
Yes. Enable the no‑enlarge option to keep sources from being scaled above their original size.
JPEG has no alpha channel. Transparent pixels are replaced by your chosen background color when saving to JPEG.
Use the filename template. Placeholders include {name}, {w}, {h}, {pct}, {mode}, and {ext}. Non‑word characters are replaced with underscores.
Once loaded, it continues to work without a network connection because processing runs locally.
Fit keeps the whole image visible inside the box. Cover fills the box by cropping evenly from the long side.