<p>Usually the resolution of the video is changed on-the-fly to match the size being displayed. So if you have video that has a 16:9 aspect ratio and 1920 x 1080 pixels and you turn your phone into the vertical position, you'll now have a width of 1080 pixels instead of height. So the width changed from 1920 to 1080. Now you have to figure out how to change the height by the same ratio:</p>

<pre><code>newHeight = 1080 * (1080 / 1920)
</code></pre>

<p>Or, using the aspect ratio of the footage:</p>

<pre><code>newHeight = 1080 * (9 / 16)
</code></pre>

<p>So the new height would be 607.5, but it probably gets rounded up to 608 since that's an even number. So now, when each frame is displayed, it first gets scaled down (probably using the GPU since it's very fast at that) from 1920 x 1080 to 1080 x 608.</p>

CC BY-SA 3.0
2018-02-10T15:56:50.583Z
2018-02-10T15:56:50.583Z
user1118321
<p>What is the process involved in calculating the resolution of image to be displayed when the screen of my phone(android) is rotated? My screen resolution is 1920x1080. It displays some videos only in the center while top and bottom of the video are blacked(when phone is held vertical), where as full screen video is shown when phone is held in horizontal position.</p>

CC BY-SA 3.0
2018-02-09T08:29:49.473Z
I don't quite understand. What's the problem, or what are you trying to achieve?
Dan Hulme
CC BY-SA 3.0
2018-02-09T16:08:25.027Z
when I am using phone to watch a video it plays in full screen (1920x1080), but when I tilt it(rotate) the video will be played only in part of the screen, the rest of the  areas of screen is black. I wanted to know whether the resolution of image(video) is changed to achieve this! If so how does this happen. Think in terms of aspect ratio or some thing like that
Charan K
<rendering><image-processing><computational-geometry><rasterizer>
How does image resolution change(process involved in calculation), when a screen on phone is rotated?
Charan K
# How does image resolution change(process involved in calculation), when a screen on phone is rotated?

(Asked by: username_0 on 2018-02-09)

What is the process involved in calculating the resolution of image to be displayed when the screen of my phone(android) is rotated? My screen resolution is 1920x1080. It displays some videos only in the center while top and bottom of the video are blacked(when phone is held vertical), where as full screen video is shown when phone is held in horizontal position.

**Tags:** rendering, image-processing, computational-geometry, rasterizer

> **Comments:**
> **username_1**: I don't quite understand. What's the problem, or what are you trying to achieve?  
> **username_0**: when I am using phone to watch a video it plays in full screen (1920x1080), but when I tilt it(rotate) the video will be played only in part of the screen, the rest of the  areas of screen is black. I wanted to know whether the resolution of image(video) is changed to achieve this! If so how does this happen. Think in terms of aspect ratio or some thing like that  

---

## 1 answers

### Answer by username_2 on 2018-02-10. Score: 1

Usually the resolution of the video is changed on-the-fly to match the size being displayed. So if you have video that has a 16:9 aspect ratio and 1920 x 1080 pixels and you turn your phone into the vertical position, you'll now have a width of 1080 pixels instead of height. So the width changed from 1920 to 1080. Now you have to figure out how to change the height by the same ratio:

```
newHeight = 1080 * (1080 / 1920)

```

Or, using the aspect ratio of the footage:

```
newHeight = 1080 * (9 / 16)

```

So the new height would be 607.5, but it probably gets rounded up to 608 since that's an even number. So now, when each frame is displayed, it first gets scaled down (probably using the GPU since it's very fast at that) from 1920 x 1080 to 1080 x 608.


---

