I know similar topics have been asked dozen times, but I can't find a satisfying answer, so I start a new one.
What is the best way to keep the original image ratio when I use display.newImageRect to load an image?
I want to use display.newImageRect to benefit of the "dynamic image selection" feature (@2x), but since I must specify both width and height when calling display.newImageRect, I loose the aspect ratio of my image.
So the most obvious answer would be to access the image's original size before using newImageRect, by calling newImage (see this post: http://www.jeromehollon.com/2012/05/12/setting-max-width-and-height-on-images-for-corona-sdk/), but it seems to me extremely overkill to do that.
Is there a way to access the original size of an image without actually loading it in memory?
If not, do you plan to provide a similar feature?
Or something like modifying display.newImageRect so we would call it without specifying both width and height parameter, and it would keep the aspect ratio in this case (this feature would be very convenient)?