Resize and Crop an Image Without Changing the Aspect Ratio
Using a 4032 × 3024 px photo, shows how to scale it down to 800 px wide at the same aspect ratio, and how many pixels to trim from each edge to make a 1200 × 630 px Open Graph image, with screenshots of the calculator.
Contents
To put a 4032 × 3024 px photo on a web page at 800 px wide, the height becomes 600 px. If you want to use the same photo as the image that appears when a link is shared on social media (the Open Graph image) at 1200 × 630 px, the photo is 4:3 and the output is 40:21, so you first have to decide how much to cut away, top and bottom included.
The Aspect Ratio Calculator takes the width and height of the original image and works out the resized dimensions and how much a center crop removes. It is useful when you want to know what will stay in the frame before you open an image editor.
Enter the photo’s real size and scale it to 800 px wide
- Enter
4032in “Original width (horizontal)” and3024in “Original height (vertical)”. “Aspect ratio (width:height)” shows4:3. - In “Dimension to specify”, choose “Specify width”, then enter
800in “New width (px)”. - Check that “New width × height” reads 800 × 600 px. If you are using the whole image, enter this width and height in your image editor’s resize dialog.
When the height calculated from the width has a fraction, it is rounded to a whole pixel. At 16:9 and 1000 px wide, for example, the height is 563 px. If you need an exact 16:9, pick a width that is a multiple of 16.
Crop the center to finish at 1200 × 630 px
- Leave the original width and height at
4032and3024, and move on to the “Crop from the center” section. - In “Crop ratio (width:height)”, choose “Specify output width and height”, then enter
1200for the width and630for the height. - “Remaining width × height” is 4000 × 2100 px. “Pixels removed from each edge” is 16 px on the left and right and 462 px at the top and bottom.
- In your image editor, cut out this area from the center, then scale it down to 1200 × 630 px. If your editor lets you set the crop by its top-left position and size, use
x = 16,y = 462, a width of 4000 px and a height of 2100 px, with the top-left corner of the original image as the origin.
The result is 4000 × 2100 px because the calculator looks for the largest whole-pixel area that matches 40:21, the reduced form of 1200:630, exactly. The largest multiple of 40 that fits in 4032 px is 4000 px, and the matching height is 21 × 100 = 2100 px. Cropping to the right ratio first means the subject keeps its shape when you scale the image down to 1200 × 630 px.
If the photo has a headline or a person’s face near the top, check that it falls inside the area kept in the center. If cutting 462 px from the top would lose something you need, move a crop frame of the same ratio upward in your image editor. You only type dimensions into the calculator; editing and saving the image happen in your image editor.