Cannot Get Background To Scale Properly On Landscape Orientation.

I cannot get my background to scale properly on landscape orientation. It works on portrait, the image displays at the proper size and the imageSuffix code works - just not on landscape. The background image comes out small with huge borders on the sides. Here is my code, pls let me know if you spot something. 

config.lua:

application = { content = { width = 320, height = 480, scale = "letterBox", xAlign = "center", yAlign = "center", imageSuffix = { ["@2x"] = 1.5, } } }

build.settings:

settings = { orientation = { default = "landscapeLeft", supported = { "landscapeLeft" }, }, }

main.lua:

local background = display.newImageRect( "background.png", 360, 570 ) background.x = display.contentCenterX background.y = display.contentCenterY

Like I said, the super frustrating thing is that if I simply change “landscapeLeft” to “portrait” it works fine - just not the other way around. Thanks in advance for your help!

Hi @beck,

I see you put “letterBox” (capital “B”). Change it to “letterbox” and let me know if it helps.

Thanks,

Brent

Tried it and still no luck :frowning:

I’m just so confused. If my code works perfectly with Portrait orientation but not with Landscape, what could that mean? Could my image be faulty? 

Hah! It WAS the image! I was changing its resolution with an image editor because I was under the impression that I had to do it. Big newb ^^

Anyway, problem solved. Thanks Brent. 

Hi @beck,

I see you put “letterBox” (capital “B”). Change it to “letterbox” and let me know if it helps.

Thanks,

Brent

Tried it and still no luck :frowning:

I’m just so confused. If my code works perfectly with Portrait orientation but not with Landscape, what could that mean? Could my image be faulty? 

Hah! It WAS the image! I was changing its resolution with an image editor because I was under the impression that I had to do it. Big newb ^^

Anyway, problem solved. Thanks Brent.