Transparent BufferedImage

  • Thread starter Mike Westerfield
  • Start date
M

Mike Westerfield

I'm trying to create an initially transparent Image. Among other
things, I have tried

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

This works fine running under Mac OS/X, but when running under Windows
XP Personal using Sun's Java 1.4.1_02, this gives me an image that is
initially gray, and nothing I've tried will clear it to transparent.

Can anyone tell me how to create an initially transparent image
running under Java 1.4.1_02 on Windows?

Can anyone at least confirm that this is a bug? If so, I'll pass it on
to Sun.

Mike Westerfield
 
A

Andrew Thompson

Mike Westerfield said:
I'm trying to create an initially transparent Image. Among other
things, I have tried ....
This works fine running under Mac OS/X, but when running under Windows
XP Personal using Sun's Java 1.4.1_02, this gives me an image that is
initially gray, and nothing I've tried will clear it to transparent.

...ermm. Are you sure you are not seeing straight through
your transparent image to the gray color of the underlying
component?

[ There have been various discussions re 'transparent applets'
where ultimately you get to the same gray color (because
applets cannot be transparent). ]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top