Screen oriention based on width or height of an image?

How to change the screen orientation based on the height or width of an image.?
E.g if widht is greater than height screen orientation landscape
If height is greater than width screen orientation portrait

You provided the answer yourself; I merely joined the blocks. :smile:

blocks (5)

4 Likes

I explained myself wrongly, I intended to position the image based on the Natural.width or Natural.height of it, not based on the image component placed by us in the app.
Your solution has no effect even if you set width and height automatic and screen orientation as full sensor as parameters.
The image to be displayed is loaded dynamically.

I just tried this and it works. You might have to delay the calculation a bit, as the properties seem to not be updated instantly after changing the image. :slight_smile:

2 Likes