Space between images with different ratio
#1
I'm trying to present 4 scenes from each movie as thumbnails. The problem is that videos have different aspect ratios, and so do the images, resulting in different spaces, and even overlapping:

Image Image

I thought the <top>, <right>, and so on parameters would refer to "the left side of the image renders at this point", which would have fixed it, but I don't think it does. My code (images above) is as follows:

xml:
        <control type="image">
            <right>500</right>
            <bottom>600</bottom>
            <width>275</width>
            <height>195</height>
            <aspectratio>keep</aspectratio>
            <texture background="true">$INFO[ListItem.Path,,extrathumbs/thumb1.bmp]</texture>
        </control>
        <control type="image">
            <left>1450</left>
            <bottom>600</bottom>
            <width>275</width>
            <height>195</height>
            <aspectratio>keep</aspectratio>
            <texture background="true">$INFO[ListItem.Path,,extrathumbs/thumb2.bmp]</texture>
        </control>
        <control type="image">
            <right>500</right>
            <top>450</top>
            <width>275</width>
            <height>195</height>
            <aspectratio>keep</aspectratio>
            <texture background="true">$INFO[ListItem.Path,,extrathumbs/thumb3.bmp]</texture>
        </control>
        <control type="image">
            <left>1450</left>
            <top>450</top>
            <width>275</width>
            <height>195</height>
            <aspectratio>keep</aspectratio>
            <texture background="true">$INFO[ListItem.Path,,extrathumbs/thumb4.bmp]</texture>
        </control>

Really hope someone can help.
Reply
#2
Not possible. 
Just use "scale" for the aspectratio. It will increase the picture size to your wanted dimension, but keep in mind that some areas of the picture are going to be cropped. 
"stretch" is also possible but looks strange in some cases.

https://kodi.wiki/view/Aspect_Ratio
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#3
Oh. Well, I really don't want to do that. I give much thought into the picture of each thumbnail, I'd rather not have to compromise whats seen.

Thanks for responding with clear confirmation. I'll merge this with another issue I've encountered and submit it as a feature request then.
Reply
#4
You can diffuse with a 275x195 mask, if that works better..
Reply
#5
You mean to blur out the edges? I really don't want to mess with effect and things like that, I just want the image. My current workaround will involve generating a thumbnail collage with a script (manually, though).
Reply
#6
Your diffuse can be solid, like a mask.
Reply
#7
(2018-05-30, 09:07)firewater Wrote: Oh. Well, I really don't want to do that. I give much thought into the picture of each thumbnail, I'd rather not have to compromise whats seen.

Thanks for responding with clear confirmation. I'll merge this with another issue I've encountered and submit it as a feature request then.
 There is no way to scale any ratio to another ratio without loss or distortion.
You can only scale and zoom.
So lefthand picture is what you want, you need the dimensions of that, then use scale on all images.
Only way.
Reply
#8
(2018-05-31, 12:13)badaas Wrote: So lefthand picture is what you want, you need the dimensions of that, then use scale on all images.
Only way. 
 Not sure I fully understand this, but if the end objective implies 'scale' (as in the Kodi function), I'd lose part of the image, if it doesn't fit the box of the controller, correct? I find that undesirable, much like locking the aspect ratio of the posters in a way that it cuts off the edges or even stretches them (which a lot of skins seem to do).

Think for now I'll just settle into making a script that turns all 3 images into one .bmp. No other way...
Reply
#9
If you want the 'cross' area between the images to remain the same size then you'll need to add alignments to the aspect ratio of each image.

eg

code:
<aspectratio align="right" aligny="bottom">keep</aspectratio> [Top left image]
<aspectratio align="left" aligny="bottom">keep</aspectratio> [Top right image]
<aspectratio align="right" aligny="top">keep</aspectratio> [Bottom left image]
<aspectratio align="left" aligny="top">keep</aspectratio> [Bottom right image]
Reply
#10
(2018-06-01, 12:23)Hitcher Wrote: If you want the 'cross' area between the images to remain the same size then you'll need to add alignments to the aspect ratio of each image.

eg

code:
<aspectratio align="right" aligny="bottom">keep</aspectratio> [Top left image]
<aspectratio align="left" aligny="bottom">keep</aspectratio> [Top right image]
<aspectratio align="right" aligny="top">keep</aspectratio> [Bottom left image]
<aspectratio align="left" aligny="top">keep</aspectratio> [Bottom right image]
I was just about to post this Wink
You could even vignette each outer corner if doing this, to kind of fade the outer edges a little, may look better (though ofc. you said no blur).
Reply
#11
Oh my, that's some fix right there! Thank you guys, really excited to try it out.
Reply

Logout Mark Read Team Forum Stats Members Help
Space between images with different ratio0