Originally posted by Joe Cheung:
Dear all,
I want to create a image object using J2ME Wireless Toolkit with the following statement:
try{
Image img = Image.createImage("/Tiles.png");
}catch (IOException e) {}
and I put the image "Tiles.png" in the folder "res".
but there is "Uncaught exception java/lang/OutOfMemoryError"hen running the program.
What is the problem?
Regards,
Joe
You need to reduce your image size..what is probably the case is that you have not optimized the pallete included in the png image..most graphics programs have this feature..refer to your users manaul index to find it and how to use it..
Also remember that png headers take up space if possibl eif you are using several images you might want to cut anpaste them into a multi frame filmstrip image and use clipping to load that image and choose the individual frame which represents your individual image..