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.
OBJECT-FIT / GEOMETRY EXPLORER
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
Example: an 800 × 600 source in a 300 × 200 box. CSS pixels and source units differ; neither describes physical screen pixels.
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
Generate geometry to reveal the result. The schematic is not a photograph or native image rendering.
Light background = box margins; green grid = source region. The outer outline identifies the stage, not a mathematical box border.
Displayed values are rounded and may not sum exactly. Right and bottom edges are geometric boundaries, not final included pixels; retained area is not an image-quality score.
Selection only, not automatic copying. Use your operating system’s Copy command; clearing this page cannot clear that clipboard.
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.
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 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.