Actual display resolution?

I know that most games don’t use the actual resolution but instead use a much lower resolution as set in config.lua.

Is there any way to display image in full device resolution and not have them mapped to some lower resolution?

I am doing an image display app and don’t want 16mpixel images displayed at 320x480 resolution. It pretty much means that all our newer displays are wasted on Corona.

Hi @stubones99.

That’s not quite how Corona works. The content area defined in config.lua is a measurement in “content units” or “points”, not “pixels”.

Consider an iPhone 4s at 640x960. Corona will downsize the image to fit 640x960. We are going to use all the pixels the screen offers, however, each 320x480 content unit represents a 2x2 grid of pixels. On a 1080x1920 type device, if you image is large enough for that size screen, we will use it.  However the content units or points in this case of a 320x480 content area will represent 3.375 pixels per content unit.  We do not downsize your image to 320x480.

Rob

@stubones99

I think you’re misunderstanding scaling.

If you have this scenario:

  • Content resolution set at 320 x 480
  • letterbox scaling
  • 200 x 200 file image.png

then, you do this:

display.newImageRect( "image.png", 100, 100 )

The image will display at these native resolutions:

  • 100 x 100 on iPhone 3GS (320 x 480)  - image scaled down
  • 200 x 200 on iPhone 4 (640 x 960) - image display at 100% resolution
  • 200 x 200 on iPhone 5 (640 x 136) - image display at 100% resolution
  • 338  x 338  on iPhone 6 (1080 x 1920)  - image scaled up

PS - Rob and I seemed to be typing at same time.

I am seeing images that are 5k by 3k pixels being scaled down the 320x480…

Of course this is only in the simulator, even if I select Kindle Fire HD, still scales the images down.

Make a single simple project just config.lua, main.lua, and the image.  Demonstrate that this happens.

Share that project with us by posting the zipped file to drop box or some other sharing service and giving us a link.

I will be happy to look at a simple project like this and help you get this straightened out.

Also what version of Corona are you using and what skins’s are you selecting to test with?

I agree with @roaminggamer, we need to see your code.

Rob

Hi @stubones99.

That’s not quite how Corona works. The content area defined in config.lua is a measurement in “content units” or “points”, not “pixels”.

Consider an iPhone 4s at 640x960. Corona will downsize the image to fit 640x960. We are going to use all the pixels the screen offers, however, each 320x480 content unit represents a 2x2 grid of pixels. On a 1080x1920 type device, if you image is large enough for that size screen, we will use it.  However the content units or points in this case of a 320x480 content area will represent 3.375 pixels per content unit.  We do not downsize your image to 320x480.

Rob

@stubones99

I think you’re misunderstanding scaling.

If you have this scenario:

  • Content resolution set at 320 x 480
  • letterbox scaling
  • 200 x 200 file image.png

then, you do this:

display.newImageRect( "image.png", 100, 100 )

The image will display at these native resolutions:

  • 100 x 100 on iPhone 3GS (320 x 480)  - image scaled down
  • 200 x 200 on iPhone 4 (640 x 960) - image display at 100% resolution
  • 200 x 200 on iPhone 5 (640 x 136) - image display at 100% resolution
  • 338  x 338  on iPhone 6 (1080 x 1920)  - image scaled up

PS - Rob and I seemed to be typing at same time.

I am seeing images that are 5k by 3k pixels being scaled down the 320x480…

Of course this is only in the simulator, even if I select Kindle Fire HD, still scales the images down.

Make a single simple project just config.lua, main.lua, and the image.  Demonstrate that this happens.

Share that project with us by posting the zipped file to drop box or some other sharing service and giving us a link.

I will be happy to look at a simple project like this and help you get this straightened out.

Also what version of Corona are you using and what skins’s are you selecting to test with?

I agree with @roaminggamer, we need to see your code.

Rob