Crop left side of image
11,015
Have you read MSDN?
It's clearly stated that:
rect
Type: System.Drawing.Rectangle
Defines the portion of this Bitmap to copy. Coordinates are relative to this Bitmap.
All you need are proper coordinates:
Rectangle(20, 0, 182, 17)
Author by
yasmuru
Sharing Knowledge is the way to Gain Knowledge . So I'm the one who here Starving to gain knowledge.
Updated on June 09, 2022Comments
-
yasmuru almost 2 years
What i need to do is just crop following image
and display only the mail item instead of with that mail picture .
I have used the following code but it just crop the right side not left .
Note: Picture is just an example get it from google image
Bitmap croppedBitmap = new Bitmap("E:/my234.png"); try { croppedBitmap = croppedBitmap.Clone(new Rectangle(0,0,202, 17), System.Drawing.Imaging.PixelFormat.DontCare); pictureBox1.Image = croppedBitmap; } catch(Exception ex) { string se = ex.ToString(); }