calculate width and height of region for proper display

Asked by Jaap Bos

I am wondering how the following is possible:

I drew a region that is 187px wide and 140px high to properly display images that are 300px wide and 225 high without borders. I found the dimensions for xibo by deviding 1280 by 800 since i use the 16:9 template the result is 1.6, so, 300/1.6=187 and 225/1.6=140.

The strange thing is that when i try to do the same trick with 172px and 250px, the image (in this case a rss feed) is not displayed properly, i use 107,5 and 156,25 here. By using trial and error i found that 115 and 170 does fit.

Am i not seeing something, is this the wrong method, how can this happen?

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Harrington (alexharrington) said :
#1

1280x800 is a 16:10 aspect ratio, not 16:9.

Alex

Revision history for this message
Jaap Bos (mp3speler) said :
#2

That is true, but the aspect ratio remains the same since i only calculated with the width so 1280/800=1.6 for height the calculation would be 720/450=1.6.

How would you calculate the pixel dimensions in the following situation:
16:9 background
in layout design the dimensions are 800px wide and 450px high
you want to determine the width and height of a region that needs to display a image that is 172px high and 250px wide

TIA!

Revision history for this message
Alex Harrington (alexharrington) said :
#3

> That is true, but the aspect ratio remains the same since i
> only calculated with the width so 1280/800=1.6 for height the
> calculation would be 720/450=1.6.

Yes - but your screen isn't 720 pixels high so your output size won't be
1280x800 pixels, it will be smaller.

> How would you calculate the pixel dimensions in the following
> situation:
> 16:9 background
> in layout design the dimensions are 800px wide and 450px high
> you want to determine the width and height of a region that
> needs to display a image that is 172px high and 250px wide

There are an infinite number of sizes. Any box of the correct aspect
ratio will fit the picture exactly, but Xibo will make the background of
the region transparent so it doesn't matter if the picture doesn't fix
the box exactly.

If you want the output resolution to be 172x250 then it depends entirely
on the screen resolution you're outputting to and you haven't specified
that.

If the screen is actually a 16:10 resolution then it DOES make a
difference as the layout will not fill the screen.

Alex

Revision history for this message
Jaap Bos (mp3speler) said :
#4

The picture that needs to be displayed comes from a rss feed and is put in an iframe, I have added the code: style="background:transparent;" and now i do not have to worry about the exact size.

Can you help with this problem?

Provide an answer of your own, or ask Jaap Bos for more information if necessary.

To post a message you must log in.