Retina Images

Hey,

Ok, so I looked at many tutorials and many demo apps to learn how to use retina images. It look really simple but I think I’m doing something wrong!

Config.lua :

[lua]application =
{
content =
{
–zoom
width = 320,
height = 480,
fps = 30,
scale = “letterbox”,

imageSuffix =
{
["@2x"] = 2,
}
}
}[/lua]
Images in folder:

[lua]Soccer.png

Soccer@2x.png[/lua]

In the demos apps the normal images are small, and the images with the @2x suffix are 2X bigger.

When i have (Soccer.png) and (Soccer@2x.png) in my folder, they are the exact same images. The @2x one is not bigger.

Does anyone know what I can do to have retina images? What I’m doing wrong?

Thanks so much!

  • Michael

[import]uid: 23689 topic_id: 26902 reply_id: 326902[/import]

Are you loading your images like this?

local img = display.newImageRect("Soccer.png", 40, 40)   

with 40x40 being the base images width/height (base image being the “Soccer.png” image [import]uid: 84637 topic_id: 26902 reply_id: 109245[/import]

The Images stay the same, in the folder it says both images, soccer.png and soccer@2x.png are 8KB. The images is also very blurry on the screen…

Thanks for your help :slight_smile: [import]uid: 23689 topic_id: 26902 reply_id: 109260[/import]

Email me the images : danny [at] anscamobile.com

And I will take a look :slight_smile: [import]uid: 84637 topic_id: 26902 reply_id: 109269[/import]