GlossQuote Labs繁體中文 ↗

OBJECT-FIT / GEOMETRY EXPLORER

How does an image fit?

See the geometry before choosing the crop. Explore the difference between preserving the source and filling a box—without sharing a photograph.

Numbers only · No upload · No storage · Select CSS manually

01 / SET THE DIMENSIONS

One source, one box

Example: an 800 × 600 source in a 300 × 200 box. CSS pixels and source units differ; neither describes physical screen pixels.

1–4096 source units
1–4096 source units
1–4096 CSS px
1–4096 CSS px
Fit mode
0–100%; 0 left, 100 right
0–100%; 0 top, 100 bottom

Preparing the calculator. If unavailable, use a browser supporting BigInt and SVG.

Editing any value revokes the previous result. Language navigation or leaving the page does not transfer unsaved values; manually retain anything you need first.

02 / READ THE GEOMETRY

Margins, or cropping?

Generate geometry to reveal the result. The schematic is not a photograph or native image rendering.

Selection only, not automatic copying. Use your operating system’s Copy command; clearing this page cannot clear that clipboard.

Before using it on a real page

Contain ≠ scale-down

Contain keeps the whole source, but may enlarge it. Cover fills the box and produces zero or negative offsets on cropped axes. Position percentages align corresponding locations of source and box.

Dimensions have different jobs

Exported width and height describe the CSS content box, not source resolution. Apply fit-image to an img with the supplied ratio; check existing max-width, minimum sizes, important declarations and container rules.

No image file processing

No photos, URLs or EXIF are read; no cropped image is exported. Source dimensions are assumed to be correctly oriented. Coordinates are continuous geometry, not integer pixel-cropping instructions.