Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
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);
Posted
Comments
OriginalGriff 25-Jun-11 3:50am    
If you want to make a change to your question, use the "Improve question" widget to edit it, not create a new question. I have deleted teh spare.

1 solution

Check this link out C# Tutorial - Image Editing: Saving, Cropping, and Resizing[^]. Hop it can help you.
 
Share this answer
 
Comments
Espen Harlinn 25-Jun-11 13:42pm    
Nice link, my 5
Kim Togo 27-Jun-11 3:36am    
Thanks Espen. And yes great link.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900