This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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: 9137

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

[How To Ask Questions On JavaRanch]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: How to draw an image in negative form
It's not a secret anymore!