convert VB to C#

This commit is contained in:
2020-09-24 11:21:53 +02:00
parent 64277916cd
commit fecbeb4659
320 changed files with 17755 additions and 10320 deletions

View File

@@ -0,0 +1,20 @@
using global::System.Drawing;
namespace Pilz.Drawing
{
public static class BitmapExtensions
{
public static void InvertColors(this Bitmap bmp)
{
for (int y = 0, loopTo = bmp.Height - 1; y <= loopTo; y++)
{
for (int x = 0, loopTo1 = bmp.Width - 1; x <= loopTo1; x++)
{
var inv = bmp.GetPixel(x, y);
inv = Color.FromArgb(inv.A, byte.MaxValue - inv.R, byte.MaxValue - inv.G, byte.MaxValue - inv.B);
bmp.SetPixel(x, y, inv);
}
}
}
}
}