Skip to main content

Resize image keeping aspect ratio

Short answer

Aspect ratio 1024:768 = 4:3. New height = 640 × (768/1024) = 480 pixels. Resized image is 640×480.

If we want to resize a 1024×768 image to one that is 640 pixels wide with the same aspect ratio, what would be the height of the resized image?

Keeping the aspect ratio means width : height stays the same.

Aspect ratio = 1024 / 768 = 4 : 3
new height / new width = 768 / 1024
new height = 640 × 768 / 1024
           = 640 × 0.75 = 480

Answer: the resized image is 640 × 480, so the height is 480 pixels.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 1 questions →