Inverts the image colors.
Syntax

[C#]

void Invert();

[Visual Basic]

Sub Invert()
Notes

Inverts each of the image colors. The intensity of each channel is reversed so that white becomes black, black becomes white and a light gray will become a dark one.

Example

[C#]Canvas canvas = new Canvas(Server.MapPath("rez/boat.gif"));
canvas.Invert();
canvas.SaveAs(Server.MapPath("invert.jpg"));


[Visual Basic]Dim canvas As New Canvas(Server.MapPath("rez/boat.gif"))
canvas.Invert()
canvas.SaveAs(Server.MapPath("invert.jpg"))


Example files are shown below.


boat.gif


invert.jpg