Hi Sandhya,

On Wed, Aug 09, 2000 at 03:41:0p -0700, Sandhya Venkatesh wrote:
 > Hi,
 >
 >
 > I am rendering a transparent image "gifImage"
 >       Graphics2D g = (Graphics2D)gifImage.getGraphics();
 >       g.setComposite(AlphaComposite.SrcIn);
 >       g.drawImage(gifImage,0,0,null);
 >
 > but it becomes opaque after this. What can I do to
 > keep the tranparency??

  What did you want to achieve?

  From the snippet you've provided it looks like you're rendering the
  image to itself. Is that what you really wanted?

  If all you want is to render image with transparency to screen (or
  BufferedImage), you just need to call drawImage on the
  destination Graphics object (you don't need to set composite
  rule). Something like
    public void paint(Graphics g) {
            g.drawImage(gifImage, 0, 0, null);
    }

  Thank you,
    Dmitri

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to