[java] Image Formats in J2ME

Started by
0 comments, last by umarfm13 20 years, 1 month ago
Hi ! I wanted to know the following things about the images in J2ME. 1. Which image formats are supported in J2ME. 2. From the supported formats, does any one format has some some edge over others formats, or they are equal in terms of detail/size/performace etc. 3. How many different color depths are supported. 4. Are there any specific tools available for making optimized images for J2ME games. Regards, Umar
Advertisement
1. The only format that MUST be supported is png. Some phones might support other formats (usually jpeg and gif), but that depends on the device, and if you wanna be as cross-platform as possible then just use pngs.
2. The formats are regular graphics formats, with the usual pros and cons. There is no special consideration because it's J2ME. Most phones, when loading an image, will convert it to their native pixel format for performance, so usually the detail/size (specially size since we're dealing with constrained devices) are the things to take in mind.
3. That depends on the phone. As far as the J2ME code though, the format is 24-bit RGB in MIDP 1.0, and also 32-bit ARGB for some methods in MIDP 2.0. What I mean is that the library functions (the API) work with those formats, and the underlying implementation converts those values to the phones native format (tries to find the closest match from the available hardware colors).
4. Again, the images are regular images. There is nothing special about them. Of course, since you probably want to make them as small as possible, you might want to try a tool like pngcrush, for that.

You'll find that some devices might have strange quirks about images, and some of what I said might not be true for them, but that's the fragmented J2ME landscape for ya...

shmoove

[edited by - shmoove on February 29, 2004 5:35:23 AM]

This topic is closed to new replies.

Advertisement