Is there a way to tell image orientation?
#1
Hi Everyone,

I know its a long shot, but does anyone have a way to tell if a image file is orientated in 'poster' or 'landscape'. I ask this, as I have been updating some of my photo views and am finding that the boarder that I put around the image only really looks ok when the image is in 'landscape'.

ListItem.PictureResolution give you something like '1xxx X 2xxx' (poster) or '2xxx X 1xxx' (landscape). Which is not really that helpful as I can't think of a general way to use this info to determine orientation.

Now I know there is a ListItem entry for orientation, but it's exactly the same for ALL of my images (some helpful program has rotated the image and set that info to the same value).

Does anyone have a trick to determine orientation of an image?

Wyrm (xTV SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#2
Nope you can't at present. The main problem is that there's very little difference for images that are close to square, right?

Perhaps if you show me how you're going to use it then it may be something we might become interested in.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
jmarshall Wrote:Nope you can't at present. The main problem is that there's very little difference for images that are close to square, right?

Perhaps if you show me how you're going to use it then it may be something we might become interested in.

Cheers,
Jonathan

Jonathan,

Thanks for the reply mate. Here are a couple of screenshots of what I have at the moment.

Image Image

Now if I had access to the 'X' and 'Y' size of the image maybe I could go 'X' - 'Y' and then say result is zero (use square frame). Result is negative (use poster frame) or result is positive (use landscape frame). Even better would be to use the 'X' and 'Y' plus a frame size to determine the frame image width and height (but that starts getting messy as you need to limit the size of the image displayed). I guess it could even be used in skins to determine if an thumbnail is a poster or banner.

Either way sounds like a bit of work for you guy's, so for the time being I will just go with what I have.

Wyrm (xTV SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
why don't you use EXIF info ?
Reply
#5
Why don't you just use a bordered image?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#6
jmarshall Wrote:Why don't you just use a bordered image?

Jonathan,

Yes, could do that, but I thought people would arc up if I stretched the images to use a border image. Also still does not handle the photos in 'poster' orientation. I would like to have the displayed image the same relative size as the 'landscape' orientated image, just up/down, not left/right. Also, having image X and Y would help with the problem of displaying a banner thumb when the skin is expecting a poster thumb. Instead of displaying a squashed thumb, skin could display a fallback image instead. Not real important at this stage. Just thought I would throw the idea out there and see what you thought.

bizulk,

EXIF info is available via listitem.xxxxxx at the moment, but not in a usable form for me. As mentioned in my first post, listitem.orientation has been changed to the same thing for either orientation by a helpful program when the poster images where originally rotated to right way up.

Wyrm (xTV SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#7
Why not use <aspectratio aligny="top">scale</aspectratio> ?
Reply
#8
Hitcher Wrote:Why not use <aspectratio aligny="top">scale</aspectratio> ?

Hitcher,

while it does not solve the basic problem of allowing me to show the complete photo in a poster or landscape orientation, I don't mind how that looks. Will run that past my beta testers and see what they think. Thanks for the suggestion (had not seen that before).

Wyrm (xTV SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#9
Again, use a border texture. You need not stretch the images in any way. See how confluence does some of the picture views for instance. Am I misunderstanding the problem??
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
jmarshall Wrote:Again, use a border texture. You need not stretch the images in any way. See how confluence does some of the picture views for instance. Am I misunderstanding the problem??

<facepalm reason="fixated on a solution">

No Jonathan, you were right. Had a look at confluence and saw what you were talking about. Other than a few sizing tweaks, I have this working in my skin. Thanks for your patience.

Wyrm (xTV SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#11
No worries, glad you got it sorted Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a way to tell image orientation?0