---
title: "Resize image keeping aspect ratio"
subject: "Computer Graphics"
chapter: 1
key: "semester_5/computer_graphics:resize-image-aspect-ratio"
source: https://www.bctengineer.com/q/semester_5/computer_graphics/resize-image-aspect-ratio
site: BCT Engineering
---

# Resize image keeping aspect ratio

Computer Graphics · Chapter 1: Introduction and Application

- Asked in: 2070 Asar, 4 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_5/computer_graphics/resize-image-aspect-ratio
- Whole chapter: https://www.bctengineer.com/md/semester_5/computer_graphics/chapter-1

## Question

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?

## Short answer

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

## Answer

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

```text
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.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is the aspect ratio of 1024 x 768?
   A. 16 : 9
   B. 3 : 2
   C. 4 : 3
   D. 5 : 4
   Answer: C. 1024/768 = 4/3. (Key point: Aspect ratio)

2. What keeps the aspect ratio when resizing?
   A. new height = new width - 384
   B. new height = new width x (old width / old height)
   C. new height = old height
   D. new height = new width x (old height / old width)
   Answer: D. Width:height stays constant. (Key point: Method)

3. What is the new height for width 640?
   A. 480
   B. 512
   C. 360
   D. 600
   Answer: A. 640 x 768/1024 = 480. (Key point: Result)

4. If the aspect ratio does not match the screen, the image
   A. becomes sharper
   B. looks stretched or has black bars
   C. uses less memory
   D. gets a higher resolution
   Answer: B. Mismatch produces stretching or bars. (Key point: Wrong ratio)

## Related in Computer Graphics

- [Time to scan one row of pixels](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Arow-scan-time-refresh) — Computer Graphics, chapter 1
- [Short note: Resolution and aspect ratio](https://www.bctengineer.com/question.md?key=semester_5%2Fcomputer_graphics%3Ashort-note-resolution-aspect-ratio) — Computer Graphics, chapter 1

## Related in other subjects

- [Mesh quality: skewness, aspect ratio, orthogonality](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Amesh-quality-metrics) — Applied Computational Fluid Dynamics, chapter 4
- [Skewness and aspect ratio of cells](https://www.bctengineer.com/question.md?key=semester_7%2Fapplied_computational_fluid_dynamics%3Askewness-aspect-ratio-numerical) — Applied Computational Fluid Dynamics, chapter 4
- [T/F: tower height same for single/double circuit](https://www.bctengineer.com/question.md?key=semester_8%2Ftransmission_and_distribution_system_design%3Atf-tower-height-single-double-circuit) — Transmission and Distribution System Design, chapter 4
- [Roughness height from velocity ratio](https://www.bctengineer.com/question.md?key=semester_4%2Fhydraulics%3Arough-pipe-velocity-ratio-roughness) — Hydraulics, chapter 1
