[java] Transparent blitting in java - How?

Started by
3 comments, last by DeVore 23 years, 6 months ago
Hi, How do you blit images in java using a transparent colour. I want to write a game where there isn''t a black box around my game objects like the player etc... Cheers, DeVore
Advertisement
transparant gif colours work for me else you''d need to get @ the image source (i''d use the PixelGrabber class), parse it to int[][] (int[] is better, but the maths harder), and use logic to mask out the colour.
It''s that simple - I did it with the GIMP!

Cheers,
DeVore
yes God bless Gimp & xv....
There are examples of both transparent blitting and blitting using alpha blends (translucent rather than transparent) on the FAQ (for situations where transparent GIF''s are not an option).

Just search for ''transparent''.

(That is of course assuming you can get to the FAQ, which depends on the mood of my ISP).

http://games.cpbinc.com/faq

This topic is closed to new replies.

Advertisement