Question about image sizes

I have a background image that I created. It is 960 x 320 for iOS. I noticed that when I display the image on the iPhone (not the iPhone 4), that it is reduced in size by half to fit the 480 x 320 criteria. Is this normal with Corona? Do i need for my background images to be 480 x 320 for parallaxing?

Any input is appreciated :slight_smile:

Alan [import]uid: 93315 topic_id: 21168 reply_id: 321168[/import]

It’s width is halved, as in it’s squished down, or half of the image is cut off?

Neither of this things should happen automatically. What are your config.lua settings like right now?

Peach :slight_smile: [import]uid: 52491 topic_id: 21168 reply_id: 83915[/import]

The image is exactly halved. At least it looks to be. Its not squished. It looks normal. Its just not spanning 2 screen sizes like it should. It looks to be 480 x 160 in iPhone mode.

Alan

Here is the config file:

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

[import]uid: 93315 topic_id: 21168 reply_id: 83927[/import]

No issues there - try this;

[lua]display.newImageRect(“yourimage.jpg”, 960, 320 )[/lua]

That should fix it if you are currently using display.newImage()

Peach :slight_smile: [import]uid: 52491 topic_id: 21168 reply_id: 83954[/import]

@corn_a:

The default behavior of display.newImage() is to auto-scale large images. This is to conserve texture memory. However, there are times when you do not want to have images auto-scaled, and there is an optional boolean flag in the parameter list to control this manually.

To override autoscaling and show the image at its full-resolution, use the optional isFullResolution parameter. By default, it is false, but if you specify true, then the new image is loaded at its full resolution:

display.newImage( [parentGroup,] filename [, baseDirectory] [, x, y] [,isFullResolution] )

So, in your case:

myImage = display.newImage( "yourimage.jpg", 960, 320, true )  

Hope this helps!
Joe [import]uid: 8444 topic_id: 21168 reply_id: 83962[/import]

Thanks! You are both awesome! It works great now.

As always, your input is appreciated!

Alan [import]uid: 93315 topic_id: 21168 reply_id: 84036[/import]