Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


[java] Image Formats in J2ME

This topic is 5399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites
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...


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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!