Social Icons

Thursday, March 8, 2012

How to crop image in c#

Give the Image and location x,y with width and height and get the croped image

Rectangle srcRect = new Rectangle(LocX, Locy, width, heigth);

 private static Image cropImage(Image img, Rectangle cropArea)
            Bitmap bmpImage = new Bitmap(img);
            Bitmap bmpCrop = bmpImage.Clone(cropArea,
            return (Image)(bmpCrop);

1 comment:

  1. Thanks for this helpful Blog.
    I used a WordPress plugin that I found interesting. So I would like to recommend it.
    The plugin helps me quickly create and customize images before inserting them in my blog post.
    Check at:
    It’s free.



Sample text

Sample Text