Page 1 of 1

Skin Lock PNG Aspect Ratio Not Working

Posted: Thu Sep 19, 2019 5:34 am
by TheRealMojoJojo
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!

Re: Skin Lock PNG Aspect Ratio Not Working

Posted: Thu Sep 19, 2019 7:12 am
by Tony
Do you know what versions of Pano2VR it use to work in?

Re: Skin Lock PNG Aspect Ratio Not Working

Posted: Thu Sep 19, 2019 8:29 am
by TheRealMojoJojo
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.

Re: Skin Lock PNG Aspect Ratio Not Working

Posted: Thu Sep 19, 2019 10:17 am
by christoph
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

Re: Skin Lock PNG Aspect Ratio Not Working

Posted: Thu Sep 19, 2019 11:34 am
by TheRealMojoJojo
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: