Scale any size image into target screen. [import]uid: 31039 topic_id: 7186 reply_id: 307186[/import]
Huh? Just get the dimensions of the image, the viewable area and do it. It is all in the docs. [import]uid: 5712 topic_id: 7186 reply_id: 25313[/import]
It’s my experience that when corona attempts to resize, or display images it considers ‘too large’, I get a white screen.
I would appreciate it if you could show me working code (ie; an image size of 1725 x 2550, 72 or 150 dpi) to avoid this. [import]uid: 31039 topic_id: 7186 reply_id: 25321[/import]
I’m pretty sure the maximum texture size supported by iPhone 4 and iPad hardware is 2048 pixels in width and/or height, so an image the size you specified simply can’t be displayed as one texture. Not sure about other phones, but I suspect they have similar or even smaller texture size limitations.
If you want to use images that big you’ll need to split them up into multiple textures and piece them back together on screen. Of course, then you have to worry about running out of texture memory. I think one 2048x2048 pixel image consumes more than half the iPhone 4’s texture memory. [import]uid: 9422 topic_id: 7186 reply_id: 25368[/import]
It’s even worse than that for older iOS devices… where 1024x1024 is the limit.
Large images can cripple performance. [import]uid: 13264 topic_id: 7186 reply_id: 25382[/import]
an image size of 1725 x 2550
Why are you using an image that huge? The entire screen is 1024x768 on iPad, 640x960 on the iPhone 4, and 320x480 on older iPhones. [import]uid: 12108 topic_id: 7186 reply_id: 25426[/import]
I can see wanting to use an image that big, or even bigger, for, say, a painterly game background that isn’t reducible into tiles that you’d scroll around in, or an e-comic where you’d pan, scroll, and zoom from panel to panel of a larger image.
But hardware limitations can’t be ignored. [import]uid: 9422 topic_id: 7186 reply_id: 25430[/import]
All of your comments are valid.
I am attempting to integrate corona into a flexible pipeline whereby large images can be built and used in a variety of devices. As we all know, the idea of what is mobile is changing as we speak.
My point is that maybe corona should allow us to size any image into the target device in the simulator. We can monitor the texture memory ourselves, or corona could let us know per device. Either way would work.
I agree in the end, hardware rules. [import]uid: 31039 topic_id: 7186 reply_id: 25437[/import]