# Search the Community

Showing results for tags 'dimension'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• Welcome to ProcessWire
• News & Announcements
• Showcase
• Wishlist & Roadmap
• Community Support
• Getting Started
• Tutorials
• FAQs
• General Support
• API & Templates
• Modules/Plugins
• Themes and Profiles
• Multi-Language Support
• Security
• Jobs
• Off Topic
• Pub
• Dev Talk

### Product Groups

• Form Builder
• ProFields
• ProCache
• ProMailer
• Login Register Pro
• ProDrafts
• ListerPro
• ProDevTools
• Likes
• Custom Development

• 0 Replies

• 0 Reviews

• 0 Views

Found 1 result

1. ## Calculate Imagedimensions on the basis of surface area and ViewportDimensions, - need a Maths-Expert :-)

Hi everyone. I'm coming to an old thema of mine. When it comes to present different sized and different orientated images on screens, it is always a bit frustrating. Maybe most time (on desktop) there is a landscape oriented widescreen, on which you can show a panorama image (2:1) very large but that it fits into the viewport. If you want to show a square image (1:1) you only have the half (content/amount?) of surface area. (The image only has half superficial content). And if you want show a Portrait (maybe 2:3) this image is somewhat more smaller displayed than the square one. So, I'm searching for some math that calculate dimensions depending on a equivalent superficial content and depending on the available viewport. Puh! But maybe it also shouldn't be a (technical) linear one. when downsizing the panorama to an equivalent, it looks a bit poor, alone in the viewport. For example, with the width and height of an image one can create a superficial content number: 100 is a square, 200 is a 2:1 and so on: 1:1 = 100 5:4 = 125 4:3 = 133 3:2 = 150 2:1 = 200 Is there anybody on the forums who can build a elegant maths formula for that? Or there are other suggestions, thoughts to that?
×
×
• Create New...