Author Topic: Aspect Ratio?  (Read 5273 times)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Aspect Ratio?
« on: February 12, 2019, 07:35:26 AM »
When I use the "preserve_aspect_ratio = true;" command for my wheel images,  it works great for the wheel logos.  Whether in horizontal or vertical mode,  they appear as they should...

...however,  when I use that command and i come across a missing logo and my "attract mode missing logo" image pops up... it looks fantastic in horizontal mode,  but it's VERY VERY squished horizontally in vertical mode?

Now,  if I leave that command off,  everything is stretched to the boundries of the image box that is created... but then all the wheel logos are aren't exactly correct (and change their dimensions based on vertical/horizontal mode)... including the attract mode missing logo image. 

What is going on here where the missing logo image is being negatively affected in such a way... it's almost as if that one image is being corrected HORIZONTALLY but being stretched vertically?

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #1 on: February 12, 2019, 07:37:14 AM »
Oh,  and I suppose a potential fix would be to somehow apply preserve_aspect_ratio = true; only to wheel files but NOT to the "wheel logo missing" image?
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #2 on: February 12, 2019, 11:25:23 AM »
You can see the difference in this image... same image... same image box... both VERTICAL and HORZONTAL orientation... but with preserve_aspect_ratio = true; ... both should look the same,  though I could see the vertical version being "smaller" overall,  no?

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #3 on: February 12, 2019, 11:33:02 AM »
After some testing,  it seems the setting is doing the same for all images... it will correct the image HORIZONTALLY... (meaning if the image is tall and thin,  with the setting off,  it will stretch horizontally,  with it on,  it will correct and show properly)... but it will not correct the image VERTICALLY (meaning that if the image is wide,  but not tall... it will NOT correct vertically... it will stretch vertcially).

What's going on with this?

Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

Bgoulette

  • Sr. Member
  • ****
  • Posts: 116
  • I wrote a book.
    • View Profile
    • BlakeGoulette.com
Re: Aspect Ratio?
« Reply #4 on: February 12, 2019, 02:16:19 PM »
Have you considered the preserve-art module? Using the set_fit_or_fill() method with "fit" should give you the same result in a more predictable manner. I think. Just a suggestion!

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #5 on: February 12, 2019, 04:34:14 PM »
Have you considered the preserve-art module? Using the set_fit_or_fill() method with "fit" should give you the same result in a more predictable manner. I think. Just a suggestion!

Hmmm... will have to look in to that (honestly,  never knew about it)...



Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: Aspect Ratio?
« Reply #6 on: February 13, 2019, 07:21:36 AM »
After some testing,  it seems the setting is doing the same for all images... it will correct the image HORIZONTALLY... (meaning if the image is tall and thin,  with the setting off,  it will stretch horizontally,  with it on,  it will correct and show properly)... but it will not correct the image VERTICALLY (meaning that if the image is wide,  but not tall... it will NOT correct vertically... it will stretch vertcially).


This is strange, I will do some tests on a test layout, but can you replicate the issue with a simple code you can share here?

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: Aspect Ratio?
« Reply #7 on: February 13, 2019, 07:26:22 AM »
I noticed one weird thing: if you "add_image" it won't work well, if you "add_artwork" and then instead of "snap" "wheel" etc you put "imagefile.png" it seem to work.

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #8 on: February 13, 2019, 09:41:05 AM »
After some testing,  it seems the setting is doing the same for all images... it will correct the image HORIZONTALLY... (meaning if the image is tall and thin,  with the setting off,  it will stretch horizontally,  with it on,  it will correct and show properly)... but it will not correct the image VERTICALLY (meaning that if the image is wide,  but not tall... it will NOT correct vertically... it will stretch vertcially).


This is strange, I will do some tests on a test layout, but can you replicate the issue with a simple code you can share here?

Here is one of the instances I use the code...

Code: [Select]
if (my_config["header_type"] == "wheel" )
{
if (my_config["preview_size"] == "large" )
{
local marquee = fe.add_artwork( "wheel", flx*0.225, fly*0.005, flw*0.550, flh*0.180 );
if (my_config["header_aspect"] == "on" )
{
marquee.preserve_aspect_ratio = true;
}
local marquee_scale_cfg = {
when =Transition.ToNewSelection,
property = "scale",
start = 0.0,
end = 1.0,
time = 0700,
tween = Tween.Linear,
}
local marquee_move_cfg = {
when =Transition.ToNewSelection,
property = "y",
start = fly*0.125,
end = fly*0.020,
time = 0700 ,
}
animation.add( PropertyAnimation( marquee, marquee_scale_cfg ) );
animation.add( PropertyAnimation( marquee, marquee_move_cfg ) );
}
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

FrizzleFried

  • Sr. Member
  • ****
  • Posts: 243
    • View Profile
    • Idaho Garagecade
Re: Aspect Ratio?
« Reply #9 on: February 13, 2019, 09:44:03 AM »
I noticed one weird thing: if you "add_image" it won't work well, if you "add_artwork" and then instead of "snap" "wheel" etc you put "imagefile.png" it seem to work.

I am not sure how I would make the system load up the "wheel file is not found" image if I don't use the the "wheel" option... I 'think' you're suggesting I simply put the imagename.png in place... that would work fine if I was looking for only a single image to put in that place... right?  Or am I misunderstanding you?
Visit my arcade blog ... www.idahogaragecade.com (updated 06-27-19)

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: Aspect Ratio?
« Reply #10 on: February 13, 2019, 10:18:58 AM »
I am not sure how I would make the system load up the "wheel file is not found" image if I don't use the the "wheel" option...

You are absolutely right, I wasn't suggesting that as a solution but as a possible cause of the issue. It seems that if you load a single image as "add_artwork" it works, but for some reason when loading the placeholder image it works like when you load a single picture with "add_image". I suspect this is a bug in AM