Letterbox Calculator

Calculate bars, crop, or stretch for a source image and a target canvas.

Source
px
px
Canvas
px
px

Crop or pad an image file

Visible content dimensions

1000 × 563 px
The solid rectangle shows the content. The striped area shows the bars.
Final canvas
1000 × 1000 px
Final canvas ratio
1:1
Top / bottom bars
218 / 219 px
Left / right bars
0 / 0 px
Sampled source
1920 × 1080 px
Canvas area without content
43.7%
Source area cropped
0%
Horizontal / vertical scale
0.520833 / 0.521296
Content ratio difference
-0.0888%

Fit keeps the whole source. Rounding can make opposite bars one pixel different.

Worked example

Fit 1920 × 1080 inside 1000 × 1000 with center alignment. The image occupies 1000 × 563 px, leaving 218 px above and 219 px below.

How it works

Fit keeps the full image, fill uses the full canvas, stretch scales each axis separately, and matte covers the area outside an opening in an existing canvas.

What to check

The result uses whole pixels. A centered placement can have one extra pixel of padding on the bottom or right.