How do I invert an image, like the one in photoshop?
Printable View
How do I invert an image, like the one in photoshop?
1. Get the pixel color.
2. Split it into its R, G, and B components.
3. Convert back into a Color:
4. Put the pixel back in its place.Code:Dim c As Long
c = RGB(255 - R, 255 - G, 255 - B)
Z.
You could also turn it to HSB (aka. HSV/HSL) and invert it from there... heard it gives a better effect.