Jump to content
  • Advertisement

Archived

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

someone2

Color keying in J2ME

This topic is 5213 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 hope you are very fine... just a small question... What is the way to add a color key to an image? I need for example to draw a sprite on a background I use MIDP 1.0 Thank you very much in advance...

Share this post


Link to post
Share on other sites
Advertisement
You dont do it with codes/programmatically. You use a graphics editor to add either an alpha channel, or set a palette entry as a transparency index.

Share this post


Link to post
Share on other sites
That said, the problem arises when you run your app on a phone that does not support transparency or alpha.

Then you are back to using buffers and creating images again.

Share this post


Link to post
Share on other sites
So far I havent had much problem yet even on most emulators. Note the use of *most*. I got 2 or so motorola emulators that showed the transparent area as *grasp* black! :/ And then manually creating images have a problem with midp1''s createImage buffer creating a non-transparent empty image (filled with white I think), and then Nokia''s propertiatory''s createImage for series 60 not working.

Ooh the sad stories of mobile developers.....

Share this post


Link to post
Share on other sites
The only problem I have experienced is that some phones (like SonyEricsson P800/P802 tends to lock the CPU when pressing the screen (does not have keys)) Making optimization a living hell since there seems to be nothing that could prevent it. Well, I am still looking into it at least. .. hmm. never mind. solved it. As usual it was an undocumented feature ;-)


[edited by - MichaelT on April 8, 2004 10:43:01 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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!