How to enable retina Mode in Corona SDK? or How to work with images in retina Mode in Corona?

By | April 26, 2012

To enable retina mode in your application you have to first find the config.lua file in your project folder.

Then edit this file to include the contents like this.

application =
{
	content =
	{
		width = 320,
		height = 480,
		scale = "letterbox",
		imageSuffix =
			{
				["-x15"] = 1.5,		-- A good scale for Droid, Nexus One, etc.
				["-x2"] = 2,		-- A good scale for iPhone 4 and iPad
			},
	}
}

You have to include images twice the size([“-x2”] = 2) and about 1.5 the size ([“-x15”] = 1.5) in your project folder. These images should have correspondingly these suffixes at the end.
your_image_name-x2.png or jpg for x2(double size) images and
your_image_name-x15.png or jpg for x15 (1.5 size images) images

Corona SDK will automatically detect the right images for retina display according to the device. For example if the device has no retina display then it will take images with no x2 suffix and like that.

Please leave your valuable comments if this post was useful.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Reply

Your email address will not be published. Required fields are marked *