Large Images appear blank?

4 replies [Last post]
justkyle
User offline. Last seen 13 weeks 3 days ago. Offline
Joined: 2 Feb 2010

When I create a newImage with say "background.png" or "background.jpg" if the width is under 900px or so it shows up fine on the iPhone, but when it is any larger (tested around 1200px) then it shows up as just a white box. It looks fine in the simulator but not the phone. Anyone else noticed this?

Replies

carlos m. icaza's picture
carlos m. icaza
User offline. Last seen 8 hours 41 min ago. Offline
Ansca Staff
Joined: 22 Jun 2009

can you send me the images to info@anscamobile.com and sample code as well.

c

keoma
User offline. Last seen 1 year 44 weeks ago. Offline
Joined: 7 Mar 2010

I have the same, and I think its not just a problem with pictures.
If U create a bigger "display" with rectangles, text, lines and so on , its getting very very slow!

evank
User offline. Last seen 1 year 4 weeks ago. Offline
Joined: 16 Sep 2009

The largest possible texture size on the iPhone is 1024 x 1024, so no single bitmap can be larger than that. If you load a larger image, Corona will auto-resize it.

Also note that the iPhone only has 10MB of texture memory in total, and all image data is stored uncompressed (24 bits per pixel). If you exceed this memory threshold, it starts swapping texture data between the GPU and normal memory, which can be a lot slower than keeping everything on the GPU buffer.

In general, image memory is a limiting factor on the iPhone. However, there are features that would make this memory easier to manage, such as texture atlases and tiling, and we're working on that for future releases.

Matthew Pringle
User offline. Last seen 3 weeks 2 days ago. Offline
Joined: 23 Feb 2010

In the past (corona 1.1) images seemed to be resized if under the 1024 threshold, there was talk of a true / false param when loading images to get Corona to stop resizing, ie I could load one 640,480 image (basically 2 x 320x480 images) without any resizing. Can I do this in 1.1.3?

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.