Image Actual size regardless of resolution (Ruler)

I can’t find it anywhere or im just blind lol,

my question is how can i use an Image’s Actual size regardless of screen resolution?

for example a ruler background that has the same inches as true ruler that i can use in diff devices?

thanks in advance :slight_smile:

I think you adaptive scaling is what you want : https://coronalabs.com/blog/2014/10/28/resolution-independence-adaptive-content-scaling-in-corona/

hhmmm, I have seen this before, but the problem is I’m using letterbox because I’ll use this ruler inside many tools, like a multi tool app, is there any other way? btw thanks for your suggestion

bump…

On Android, if the device/os supports it, we can get the DPI of the screen as well as the actual pixel width/height and we also have the ability to get the scaling factor.  From there you should be able to determine the number of content units per inch and build your rule that way. iOS doesn’t have the ability to get DPI, but they have a limited set of devices and you could build your own lookup table.

Rob

I think you adaptive scaling is what you want : https://coronalabs.com/blog/2014/10/28/resolution-independence-adaptive-content-scaling-in-corona/

hhmmm, I have seen this before, but the problem is I’m using letterbox because I’ll use this ruler inside many tools, like a multi tool app, is there any other way? btw thanks for your suggestion

bump…

On Android, if the device/os supports it, we can get the DPI of the screen as well as the actual pixel width/height and we also have the ability to get the scaling factor.  From there you should be able to determine the number of content units per inch and build your rule that way. iOS doesn’t have the ability to get DPI, but they have a limited set of devices and you could build your own lookup table.

Rob