automatic image scaling

Hello to all!

i am a bit new to corona and my english isn’t the best, sorry for that.

Would like to use the automatic scaling function.
I am using 2 images, first one bgSettings.jpg has a resolution of 320x480, the other bgSettings@2.jpg = 640x960.

My config.lua:

application =
{
content =
{
width = 320,
height = 480,
scale = “letterbox”,
fps = 60,

imageSuffix =
{
["@2"] = 2,
},
},
}

so far, i didn’t find any mistakes, but after the statement:

local background = display.newImageRect(“images/bgSettings.jpg”, 320,480)

i see my image using just a quarter of the display, starting at x=0 and y=0.

Any idea ?

Thanks Klaus

[import]uid: 5456 topic_id: 6742 reply_id: 306742[/import]

Try adding

  
background.x = 160  
background.y = 240  

after

[code]

local background = display.newImageRect(“images/bgSettings.jpg”, 320,480)
[/code] [import]uid: 7863 topic_id: 6742 reply_id: 24752[/import]

This works good with 320 x 480 in config.lua, but if i switch to 640 x 960 the same effect, the background is just a quarter of the screen in the upper left side.

?? [import]uid: 5456 topic_id: 6742 reply_id: 24762[/import]