Hi,
I am working on image processing. I want to crop the image. I have written code like/*********
Bitmap bmp = image as Bitmap;
// Check if it is a bitmap:
if (bmp == null)
throw new ArgumentException(" image in null");
// Crop the image:
Bitmap cropBmp = bmp.Clone(selection, bmp.PixelFormat);
// Release the resources:
image.Dispose();
bmp.Dispose();
return cropBmp;
***********/
when i am run cropping, Its give the error : Out of Memory..Please help me.
5 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

vijayPosted May 31, 2014, 8:11 AM
Refer the below link to do crop the image..........
http://vdsite.com/Articles/185/Image-cropping-using-jquery-in-Asp.net
amy whitePosted Mar 23, 2014, 10:19 PM
starthas negative X or Y when error happens or the Size.Hight + Y or Size.Width + X is bigger than Hight or width of the image.Copied directly from other posts, hope it can help you solve your image crop issue.
Abhijeet SinghPosted Mar 20, 2014, 5:19 AM
http://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c
Zavier RomeroPosted Mar 20, 2014, 5:05 AM
If your application handles huge images, consider using a 64-bit computer with lots of free RAM, and explicitly build your application as 64-bit (not x86). This allows it to handle much more memory than the limit for 32-bit processes (about 2 to 4 GB memory).
If your imaging needs go beyond simple cropping and you need more advanced features, you could consider using a professional imaging toolkit such as Leadtools.
VulpesPosted Dec 31, 2013, 11:39 AM
So could that be the case here?