Add image scaling

This commit is contained in:
Kurt
2018-11-18 12:39:50 -08:00
parent cfe966eee1
commit 862ca89bca
2 changed files with 2130 additions and 2119 deletions

View File

@@ -228,5 +228,16 @@ public static Color Blend(Color color, Color backColor, double amount)
byte b = (byte)((color.B * amount) + (backColor.B * (1 - amount)));
return Color.FromArgb(r, g, b);
}
public static Bitmap ScaleImage(Bitmap rawImg, int s)
{
var bigImg = new Bitmap(rawImg.Width * s, rawImg.Height * s);
for (int x = 0; x < bigImg.Width; x++)
{
for (int y = 0; y < bigImg.Height; y++)
bigImg.SetPixel(x, y, rawImg.GetPixel(x / s, y / s));
}
return bigImg;
}
}
}

File diff suppressed because it is too large Load Diff