像大多数的图片转换工具一样,C#的重绘功能也可以实现相同的效果.
Graphics g = this.CreateGraphics();
g.Clear(Color.White);
Bitmap image = new Bitmap("test.jpg");
int Width = image.Width - 1;
int Height = image.Height - 1;

//绘制原图
g.DrawImage(image, 0, 0);
g.TranslateTransform(image.Width, 0);

image2、image3分别用来保存最大值法
和加权平均法处理的灰度图像*/
Bitmap image2 = image.Clone(new Rectangle(0, 0, image.Width,image.Height),PixelFormat.DontCare);
Bitmap image3 = image.Clone(new Rectangle(0, 0, image.Width,image.Height),PixelFormat.DontCare);

Color color;
相关文章:
-
2022-12-23
-
2022-12-23
-
2021-10-09
-
2022-12-23
-
2021-10-09
-
2021-10-12
-
2022-01-13