0

I have an image with height=75pixels and width=75pixels (75x75).

I want to calculate what the resolution for this image would be in different resolutions [480p (640x480), 720p (1280x720), and 1080p (1920x1080)] while still keeping the image's original aspect ratio.

For example, I know if I keep multiplying by 2 that eventually I will reach a number for each resolution like so:

75x75     * 2 = 144x144
144x144   * 2 = 288x288
288x288   * 2 = 576x576
576x576   * 2 = 1152x1152  (This resolution would be just over 480p)
1152x1152 * 2 = 2304x2304  (This resolution would be over 720/1080p)

How can I calculate different resolutions for an image while keeping the original aspect ratio?

Martin
  • 1,336
  • 4
  • 32
  • 69
  • Do you want it to match the width resolution, height resolution, or diagonal resolution? – Rojo Dec 15 '20 at 03:13
  • I would like for the image to not be stretched, so matching the diagonal resolution I think? – Martin Dec 15 '20 at 03:14
  • Well for any choice it would keep aspect ratio. So do you want keep stretching the image (on the diagonal) until it reaches the required height, width, or diagonal? Supposed that 75x75 image needs to be 1080p. Do you the image to be 1080x1080 or 1920x1920? (Ignore the fact that I said diagonal. That was kinda dumb. Unless you want the length of each diagonal to match ) – Rojo Dec 15 '20 at 03:26
  • Okay, for an image where width = height (like if the resolution is 75x75) it seems like I can just use a resolution like 1920x1920 that will upscale the image file without distorting it, im trying to make this work for any image, so in a case like where the resolution is 1600 x 1018 I need to think of a way to upscale an image like that to HD – Martin Dec 15 '20 at 03:37
  • 1
    I think I found my answer with the equation on this website: https://eikhart.com/blog/aspect-ratio-calculator – Martin Dec 15 '20 at 03:51
  • That’s great! I’d recommend you to post an answer yourself. – Rojo Dec 15 '20 at 12:49

0 Answers0