Invert all the colors in an image.
Syntax

[C#]

static void Invert(Bitmap bitmap);

[Visual Basic]

Shared Sub Invert(bitmap As Bitmap)
Params
Name Description
bitmap The bitmap to which the effect should be applied.
Notes

None.

Example

[C#]using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/felix-tchverkin-7pkN83wDZwY-unsplash.jpg"))) {
  Effects.Invert(bm);
  bm.Save(Server.MapPath("IG8_Effects_Invert.jpg"));
}


Example files are shown below.


felix-tchverkin-7pkN83wDZwY-unsplash.jpg


IG8_Effects_Invert.jpg