Hello developers, I’m experiencing an issue with non retina iPad risolutions:
I’ve got “.png” and “@2x.png” images in my project, now retina iPads get the correct images with “@2x” suffix, but now I even want the “normal” iPads to use those images, otherwise the graphics quality in the whole app is very very bad on these devices. Of course I will use if statements to scale down images on non retina iPads (Is there another method?).
My config.lua file looks like this:
local aspectRatio = display.pixelHeight / display.pixelWidth application = { content = { width = aspectRatio \> 1.5 and 400 or math.ceil( 600 / aspectRatio ), height = aspectRatio \< 1.5 and 600 or math.ceil( 400 \* aspectRatio ), scale = "zoomStretch", fps = 60, imageSuffix = { ["@2x"] = 2 }, }, } application = { content = { width = 400, height = 712, --scale = "zoomEven" scale = "zoomStretch", fps = 60, imageSuffix = { ["@2x"] = 2, } } } -- For iPads if system.getInfo("model") == "iPad" or system.getInfo("model") == "iPad Simulator" then application = { content = { width = 384, height = 512, --scale = "zoomEven" scale = "zoomStretch", fps = 60, imageSuffix = { ["@2x"] = 2, } } } end if(aspectRatio\<1.34)then application = { content = { width = 384, height = 512, --scale = "zoomEven" scale = "zoomStretch", fps = 60, imageSuffix = { ["@2x"] = 2, } } } end -- For "tall" sizes (iPhone 5 and new iTouch) if display.pixelHeight \> 960 then application = { content = { width = 400, height = 712, scale = "zoomStretch", audioPlayFrequency="44100", fps = 60, imageSuffix = { ["@2x"] = 2, } } } else -- For traditional sizes (iPhone 4S & below, old iTouch) application = { content = { width = 400, height = 712, scale = "zoomStretch", audioPlayFrequency="44100", fps = 60, imageSuffix = { ["@2x"] = 2, } } } end
Thank you and best regards.