Jump to content
  • Advertisement


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


[java] Transparent images

This topic is 5494 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

Greetings, I''m trying to get partially-transparent images to work in Java- essentially, I''m writing a little strategy game, and I''d like to be able to highlight areas that a unit can potentially move to. However, I''m having the problem that when I load an image in Java, it seems to only be able to declare a pixel as being either solid or completley transparent... All my images are currently stored as .pngs, and the "highlights" should be at 50% transparency. I''m using standard Java Images and image functions to do this. I figure I must be missing something, but I''m not sure what it is- does anyone have any advice to offer? -- EMail: hlclower@comcast.net -- AIM: SeigfriedH

Share this post

Link to post
Share on other sites
Original post by jermz
If you mean a blended transparency from the alpha channel, switch to the ARGB color mode and modify the alpha bits directly, creating the final image from a MemoryImageSource.

(Taken from his post in the Java FAQ thread)
Hope this helps.

[edited by - Kajsngweaaweg on July 8, 2003 2:20:37 PM]

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!