如何在C#中裁剪位图 [英] how can crop bitmap in c#
本文介绍了如何在C#中裁剪位图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个位图(534 * 91)
我想从例如(宽度200到宽度= 300)进行裁剪
我该怎么办????????????
位图bmp =新位图(paint_Control1.Width,paint_Control1.Height);
Rectangle rec = new Rectangle(0,0,paint_Control1.Width,paint_Control1.Height);
paint_Control1.DrawToBitmap(bmp,rec);
i have a bitmap (534*91)
and i want crop this from for example (Width 200 to Width=300)
how can i do it??????????
Bitmap bmp= new Bitmap(paint_Control1.Width, paint_Control1.Height);
Rectangle rec = new Rectangle(0, 0, paint_Control1.Width, paint_Control1.Height);
paint_Control1.DrawToBitmap(bmp, rec);
推荐答案
检查此链接 ^ ].希望它能为您提供帮助.
Check this link out C# Tutorial - Image Editing: Saving, Cropping, and Resizing[^]. Hop it can help you.
这篇关于如何在C#中裁剪位图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文