Sign in to follow this  
Honeybadger

J2ME Graphics question

Recommended Posts

I have written a game using MIDP 2.0, and have included image files in the deployment JAR, gifs and pngs for example. And they work fine. However, when I open up the JARs on other games, I often see very little in the way of gifs and png. I can only assume that they are creating images in a different way, which cuts down on the JAR size. This is something I would like to do. I imagine they are doing via the Image.createRGBImage method. Am I going in the right direction, or are images being created in another way?

Share this post


Link to post
Share on other sites
You should look for the "Tricks to minimize JAR size" thread on j2meforum. It contains information on how to put raw image data (RGB(A)) into the jar file. Tests show that the compression is better when the jar file does the compressing and NOT the image file format (PNG for example).
You can load the raw image data into memory with a Java class that can be found in that thread. Go ahead and browse it!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this