help with Dynamic Image Scaling

I’m just getting my feet wet with Corona, and I decided to make my first project resolution independent so I can use the high resolution graphics I had made. I’ve been reading about the Dynamic Content Scaling and Dynamic Image Resolution, but I’m having trouble getting it implemented.

Just displaying the normal image as a background works great:

and this is my code:

local background display.newImage("blackSpace.png")  

However, when I try to enable dynamic scaling, the image gets all whacky:

This is what I have in my main.lua

local background display.newImageRect("blackSpace.png", 480, 320)  

and this is what I have in my config.lua

application =  
{  
 content =  
 {  
 width = 480,  
 height = 320,  
 scale = "zoomEven",  
  
 imageSuffix =  
 {  
 ["@2"] = 2,  
 },  
 },  
}  

Both the blackSpace.png and blackSpace@2.png exist in the directory. Am I doing something wrong? Thanks for the help :slight_smile: [import]uid: 8300 topic_id: 2787 reply_id: 302787[/import]

Just in case it matters, this is my build.settings file

[code]
settings =
{
orientation =
{
default = “landscape”,
},

iphone =
{
plist =
{
UIPrerenderedIcon = true,
},
},

build =
{
custom = “a1234”,
}
}
[/code] [import]uid: 8300 topic_id: 2787 reply_id: 8337[/import]

well, i figured it out. Part coding problem on my end. This is the code that worked:

main.lua

local background = display.newImageRect("blackSpace.png", 480, 320)  
  
background.x = display.contentWidth / 2  
background.y = display.contentHeight / 2  

config.lua

[code]
application =
{
content =
{
width = 320,
height = 480,
scale = “zoomEven”,

imageSuffix =
{
["@2"] = 2,
},
},
}
[/code] [import]uid: 8300 topic_id: 2787 reply_id: 8342[/import]