|
Java™ by example!
|
|
|
How do I invert an image?
 To invert an image, you can use the class LookupOp. This class works with one or more tables that will be applied to the color values of the pixels. To invert an RGB image, every R, G, and B value are subtracted from 256. The lookup table reflects these changes. The following example shows the original image and an image that has been inverted.
Main.java:
Image used:
 To learn more about image processing, check out this expensive but excellent book:

Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|