我们在C#中要对图像处理,因为用得少,所以很多时候,搞不清楚应该怎么处理,下面就“缩略图”的创建,和图像的“翻转”处理,给出一段代码,不妨一试:
private void button1_Click(object sender, System.EventArgs e)标签:GetThumbnailImageAbort,210,缩略图,C#,Image,图像,翻转 From: https://blog.51cto.com/u_14365218/6019368
{
Image.GetThumbnailImageAbort myCallback =
new Image.GetThumbnailImageAbort(ThumbnailCallback);
Graphics g = this.CreateGraphics();
Image image = Image.FromFile("D://肖像08.jpg"); //读取图像
Image i = image.GetThumbnailImage(100,210,myCallback,System.IntPtr.Zero); //生成缩略图,100和210为缩略图的大小
i.RotateFlip(RotateFlipType.Rotate180FlipY); //翻转图像
i.Save("d://s.jpg");
}
public bool ThumbnailCallback()
{
return false;
}