Proper care of images?

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Leo28C
Posts: 19
Joined: Thu Jan 18, 2007 8:20 am

Proper care of images?

Post by Leo28C »

Hello everyone! :-)

Hey; is there anything I must do to images after my program's closed or even after reusing them?

I ask because; at random times in my game I get an error with Image.createEmpty() that says it failed to create image... And sometimes when I open the game from the Lowser it says it can't load the image, but when I try again it works fine... :-/

Maybe it's a bug in Lua Player? Or maybe I must nil them out or something? Thanks! ;-)
the underminer
Posts: 123
Joined: Mon Oct 03, 2005 4:25 am
Location: Netherlands

Post by the underminer »

It's always a good idea to set your images to nil when you are done using them. Depending on the luaplayer you are using there is is 9(luaplayer 0.20) to 20mb (luaplayer mod and sub 0.18 versions) of free memory left. When you are creating images, keep in mind that values greater than 480X272 are likely to give an error. For loading images; luaplayer supports sizes up to 512x512 (png). jpegs can be larger.
Behold! The Underminer got hold of a PSP
Post Reply