Background image became smaller on Iphone?

The background image works fine in simulator, but become 20% smaller on Iphone. The size is 480*600. Is it a bug?

Thx [import]uid: 81853 topic_id: 13654 reply_id: 313654[/import]

try,

display.newImage(“bg.png”,true)

or

display.newImageRect(“bg.png”,width,height)

:slight_smile: [import]uid: 12482 topic_id: 13654 reply_id: 50119[/import]

Because in the simulator you are using iPhone3 by default that has the 320x480 resolution, where as you have an iPhone4 which is 640x960 in resolution.

In the simulator, from the menu, select the Window->View As->iPhone4 to test you app on an iPhone4 (in the simulator)

now to fix it, you can use the options as suggested by HGVyas or set your configuration to a 320x480 resolution, so that you get the same across most of your devices.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 13654 reply_id: 50120[/import]

Thanks alot, hgvyas123 and jayantv.
But my configuration is 320x480, and the bug happened on my Iphone 3.

I write the code on windows and use myTouch as the simulator, when I need to run it on Iphone, I will copy the folder to Mac and build it.
This bug happened on both my Iphone3 and in the myTouch simulator on Mac.

After I restart the corona, it works fine on Mac now without change any code, but Iphone still has the same problems.

[import]uid: 81853 topic_id: 13654 reply_id: 50128[/import]

i am guessing you had width = 320 and height = 480 in config file.

now whenever corona finds any large image than this it will automatically scale that image to fit the size and i think that’s the your problem that’s why you need to give true at the end as i said above have you tried that?? if that doesn’t work let me know [import]uid: 12482 topic_id: 13654 reply_id: 50131[/import]

hgvyas123
It works, thanks. [import]uid: 81853 topic_id: 13654 reply_id: 50466[/import]