Too many Images issue

Hey people,

I’m new on corona, and i was trying to place 8 images on stage and make an animation, it worked perfectly in the simulator, but on my GalaxyTab, it didn’t open.

When I remove 4 images, it works ok, but if i add one more the problem returns.

The problem is not with the images I removed, I tried to remove other images, and it make no difference.

The code below shows how I instantiate those images. The commented lines are the images i need to remove to make it work.

[lua]local bg = display.newImageRect(“ceu.jpg”,1500,1500);
bg:setReferencePoint(display.TopLeftReferencePoint);
bg.x = 0; bg.y = -700;

local chaoFundo = display.newImageRect(“08_caoFundo.png”,1500,1500);
chaoFundo:setReferencePoint(display.TopLeftReferencePoint);
chaoFundo.x = 0; chaoFundo.y = -700;

local chaoFrente = display.newImageRect(“07_chao.png”,1500,1500);
chaoFrente:setReferencePoint(display.TopLeftReferencePoint);
chaoFrente.x = 0; chaoFrente.y = -700;

local personagens = display.newImageRect(“08_caoFundoa.png”,1500,1500);
personagens:setReferencePoint(display.TopLeftReferencePoint);
personagens.x = 0; personagens.y = -700;

– local pataTras = display.newImageRect(“05_pataTras.png”,1500,1500);
– pataTras:setReferencePoint(display.TopLeftReferencePoint);
– pataTras.x = 0; pataTras.y = -700;

– local musculos = display.newImageRect(“04_musculos.png”,1500,1500);
– musculos:setReferencePoint(display.TopLeftReferencePoint);
– musculos.x = 0; musculos.y = -700;

– local pataMeio = display.newImage(“03_pataMeio.png”,0,0);
– pataMeio:setReferencePoint(display.TopLeftReferencePoint);
– pataMeio.x = 0; pataMeio.y = -700;

– local pataFrente = display.newImage(“02_pataFrente.png”,0,0);
– pataFrente:setReferencePoint(display.TopLeftReferencePoint);
– pataFrente.x = 0; pataFrente.y = -700;[/lua]

the size of the images together is: 3.42mb.

thanks for helping. [import]uid: 58782 topic_id: 10804 reply_id: 310804[/import]

images at 1500,1500 are very large and so you wont be able to fit a lot of them into memory

obviously as the simulator runs on a computer with a lot more memory it will work locally

any animation you are trying to accomplish with 8 1500,1500 images is wrong. you just cannot do it like that.

you need to be clever and load the background separate from any parts that move and also design your animation for mobile devices [import]uid: 5354 topic_id: 10804 reply_id: 39340[/import]

You are blowing texture memory - need to reduce your image sizes

c. [import]uid: 24 topic_id: 10804 reply_id: 39357[/import]

In my experience, you must limit the count of your images for new displayImage and use removeSelf() to release part of images when they are no-visual. [import]uid: 51300 topic_id: 10804 reply_id: 39920[/import]