B
babz
AoA all,
I am trying to create transparent png images. I create them using the
following code :
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc =
gs.getDefaultConfiguration();
// Create an image that supports transparent pixels
BufferedImage bufImg = gc.createCompatibleImage(width,
height, Transparency.BITMASK);
Graphics2D g = (Graphics2D)bufImg.getGraphics();
g.setBackground(new Color(0,0,0,0));
g.clearRect(0,0,width,height);
//then some code for drawing lines.. etc
When I open the image in Internet explorer, it gives me a translucent
image with light greenish background. opening in Paint gives me a
complete black background.
Can someone help me out with it? I want a completely transparent image.
Thnks
Babz
I am trying to create transparent png images. I create them using the
following code :
GraphicsEnvironment ge =
GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice gs = ge.getDefaultScreenDevice();
GraphicsConfiguration gc =
gs.getDefaultConfiguration();
// Create an image that supports transparent pixels
BufferedImage bufImg = gc.createCompatibleImage(width,
height, Transparency.BITMASK);
Graphics2D g = (Graphics2D)bufImg.getGraphics();
g.setBackground(new Color(0,0,0,0));
g.clearRect(0,0,width,height);
//then some code for drawing lines.. etc
When I open the image in Internet explorer, it gives me a translucent
image with light greenish background. opening in Paint gives me a
complete black background.
Can someone help me out with it? I want a completely transparent image.
Thnks
Babz