Background Image Black Bars

Hi, I’ve been out of developing for the last 10 months and am just now updating some of my apps, but am having a problem that I’ve never had before and thats black bars appearing on the top an bottom of the background images.
 
In the past I’ve used the following code to deal with my scaling
 
config.lua

--calculate the aspect ratio of the device: local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = aspectRatio \> 1.5 and 320 or math.ceil( 480 / aspectRatio ), height = aspectRatio \< 1.5 and 480 or math.ceil( 320 \* aspectRatio ), scale = "letterBox", fps = 30, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, }

and then the following to include the background in a scene

bg = display.newImageRect( "images/bg.png", 360, 570 ) bg.x, bg.y = display.contentWidth / 2, display.contentHeight / 2 screenGroup:insert( bg )

then my background image is 1440x2280. This has always worked for me no problem, how I’ve just updated to 2992 and now when I test on an iPhone 5 there are black bars on the top and the bottom.

I’ve tried different scaling properties but can’t seem to get anything to work. I’ve tested on a 1st gen iPad mini and it works fine (not been able to test on Xcode simulator - thats an whole other issue)

When I test on the Corona simulator everything works fine as well.

My method is about 4 years old now, but need to get this working in the next 24 hours as I’m on a tight deadline.

So my question is, does anyone know what the issue is and how I would fix this… or secondly whats the preferred method of scaling bg images these days??

Fixed!

My previous method above still works - it appears that the sizes that the launch images are defined in the build.settings is now different to what is was, have updated that and it seems to work fine now.

It would be great if you could mark it solved for future reference. Thank you :slight_smile:

Fixed!

My previous method above still works - it appears that the sizes that the launch images are defined in the build.settings is now different to what is was, have updated that and it seems to work fine now.

It would be great if you could mark it solved for future reference. Thank you :slight_smile: