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

Win a copy of Java 8 in Action this week in the Java 8 forum!
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

How to draw an image in negative form

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970

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

Joined: Oct 29, 2001
Posts: 8713

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:
subject: How to draw an image in negative form
Similar Threads
The Black Box: reloaded again
what is the difference between saving file as and "" ???
inverted text in applications
inverted index in java
Getting the Raw Request and Response XML from axis.