private Bitmap getVerticalMirorr(Bitmap srcImg)
{
int width = srcImg.Width;
int height = srcImg.Height;
Bitmap finalbmp;
Graphics g = Graphics.FromImage(srcImg);
Bitmap img = new Bitmap(width, height);
System.Drawing.Color c = new System.Drawing.Color();
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
c = srcImg.GetPixel(i, j);
img.SetPixel(i, height - 1 - j, c);
}
}
finalbmp = img;
return finalbmp;
}
利用C#实现图片的垂直镜像
最新推荐文章于 2024-10-09 09:55:19 发布