Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rectangle sourceRect = new Rectangle(iX1, iY1, w, h);
- System.Drawing.Image imgNew = CropImage(imgOrig, sourceRect);
- private static System.Drawing.Image CropImage(System.Drawing.Image img, Rectangle cropArea)
- {
- Bitmap bmpImage = new Bitmap(img);
- Bitmap bmpCrop = bmpImage.Clone(cropArea, bmpImage.PixelFormat);
- img.Dispose();
- return (System.Drawing.Image)bmpCrop;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement