TizzyT

InvertBitmapColors -TizzyT

Apr 7th, 2015
355
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.48 KB | None | 0 0
  1.     Private Sub InvertBitmapColors(ByRef input As Bitmap)
  2.         For x = 0 To input.Width - 1
  3.             For y = 0 To input.Height - 1
  4.                 Dim CrntPixelColor As Color = input.GetPixel(x, y)
  5.                 Dim R As Integer = 255 - CrntPixelColor.R
  6.                 Dim G As Integer = 255 - CrntPixelColor.G
  7.                 Dim B As Integer = 255 - CrntPixelColor.B
  8.                 input.SetPixel(x, y, Color.FromArgb(R, G, B))
  9.             Next
  10.         Next
  11.     End Sub
Advertisement
Add Comment
Please, Sign In to add comment