MyCalCute
Install
Calculators / Technology / Image cover crop

Image cover crop calculator

Calculate a centred cover crop that fills a target rectangle while preserving image proportions.

On this page

Your result

Required scale factor0.48
Scaled image width1,920px
Scaled image height1,440px
Horizontal crop per side0px
Vertical crop per side180px

Calculator controls

How to calculate

Image cover cropCompare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides. Concept diagram; not to scale.Image cover cropSource width(px)4000Source height(px)3000Required scalefactor0.48MyCalCute.com
Compare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides. Concept diagram; not to scale.

Calculate a centred cover crop that fills a target rectangle while preserving image proportions.

Required scale factor = ((tw/sw+th/sh+abs(tw/sw-th/sh))/2)
Scaled image width = sw*((tw/sw+th/sh+abs(tw/sw-th/sh))/2) px
Scaled image height = sh*((tw/sw+th/sh+abs(tw/sw-th/sh))/2) px
Horizontal crop per side = (sw*((tw/sw+th/sh+abs(tw/sw-th/sh))/2)-tw)/2 px
Vertical crop per side = (sh*((tw/sw+th/sh+abs(tw/sw-th/sh))/2)-th)/2 px

Worked example

  • Source width (px): 4000
  • Source height (px): 3000
  • Target width (px): 1920
  • Target height (px): 1080
  • Required scale factor: 0.48
  • Scaled image width: 1,920 px
  • Scaled image height: 1,440 px
  • Horizontal crop per side: 0 px
  • Vertical crop per side: 180 px

Assumptions and limits

Assumes square pixels, uniform scaling and a centred crop. Fractional pixels are geometric estimates; a scale above one requires upscaling and adds no image detail.

Results are rounded for display; calculations use unrounded values. Read our calculation methodology.

Understanding the result

Calculate a centred cover crop that fills a target rectangle while preserving image proportions. Compare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides.

When this tool is useful

Compare the two target-to-source ratios and use the larger. This fills the frame; the excess is cropped equally on opposing sides.

Understanding your inputs

InputExample
Source width (px) sw4000
Source height (px) sh3000
Target width (px) tw1920
Target height (px) th1080

Frequently asked questions

What does this model leave out?

Assumes square pixels, uniform scaling and a centred crop. Fractional pixels are geometric estimates; a scale above one requires upscaling and adds no image detail.

How do I reproduce the example?

Enter the displayed example values in their labelled units. Apply the formula before rounding; change one input at a time to compare scenarios.