Skin Lock PNG Aspect Ratio Not Working

Q&A about the latest versions
Post Reply
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Hi,

It seems that locking the aspect ratio of an image using the percentage for width or height of a PNG is no longer working with 6.1 beta 3 64bit.

Here is a video showing what's going on https://youtu.be/eXQCGVu3Sj0

In the past all that was needed was to define either width or height as percentage and then depending on the width and height of the screen the PNG would resize with aspect ratio intact. Using the same logic no longer works on PNG's.

After the video I converted the PNG image to an SVG and THAT did in fact work for locking aspect ratio....however PNG doesn't work anymore.

Any ideas?

Thanks!
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Do you know what versions of Pano2VR it use to work in?
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Tony wrote: Thu Sep 19, 2019 7:12 am Do you know what versions of Pano2VR it use to work in?
Hi Tony! I am not sure which one it was. Doesn't matter though, I just went ahead and converted everything to SVG :-) Would be nice to still be able to do it though. Hell for all I know I could be misremembering and maybe I've just always converted to SVG :shock: Stranger things have happened!

I'll let you know if I figure it out.
christoph
Gnome
Posts: 108
Joined: Mon Aug 20, 2012 3:01 pm

Hi!
No - it has always been this way:
- an svg is drawn inside its 'container', but always keeps the aspect ratio.
- a raster image like png or jpg fills its container in both dimensions, and therefore will get distorted if the container has a different aspect ratio.
So - yes - if you want a graphic to scale with the browser window (if you have 'percent' in width or height) but keep aspect ratio, use an svg.

If you want a raster image to scale with the browser window but keep its aspect ratio at the same time, you could use an external loader.
In the external loader you have 'Content Scaling', where you define how the image adapts to its container size (in all cases except 'Fill' it will keep aspect ratio)

Regards,
Christoph
User avatar
TheRealMojoJojo
Posts: 341
Joined: Thu Sep 20, 2018 10:18 pm

Hi Christoper,

Aha...now I see why Tony was asking me what magical version of Pano2vr I had :-)

I really must be losing my mind. I think I may have bit down on a few too many lead split shot line sinkers back in my fishing days. My wife says I've been like this ever since she met me but I remember that differently too :shock:
Post Reply