Skip to main content

How can I create an empty bitmap?

1 reply [Last post]
david@windward.net
Offline
Joined: 2006-02-14

Hello;

When I create a bitmap object, it is filled with Color.BLACK. How can I get a bitmap object that is empty? What I want is a bitmap where when I am done, it is transparent where I drew nothing and then I can overlay it on another bitmap.

Like a sprite in a game.

thanks - dave

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gfx
Offline
Joined: 2003-06-14

BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);