aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to draw an image in negative form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to draw an image in negative form" Watch "How to draw an image in negative form" New topic
Author

How to draw an image in negative form

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Hi,

I have a BufferedImage that I want to paint onto another image, but with the colours inverted (e.g. red=255 -> red=0). Can I set some magic property of the Graphics or Image, so the the painting is done inverted? Or do I have to do inversion as a separate operation?


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8910
    
    8

It has to be a seperate operation. Have a look at Programmer's Guide to the JavaTM 2D API: 5.8 Image Processing and Enhancement


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to draw an image in negative form