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.


VulpesRank #55 · 29.2K reputationPosted Dec 31, 2013, 6:39 AM EST
So could that be the case here?
Zavier Romero2 reputationPosted Mar 20, 2014, 1:05 AM EDT
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.
Abhijeet SinghRank #415 · 6K reputationPosted Mar 20, 2014, 1:19 AM EDT
http://stackoverflow.com/questions/734930/how-to-crop-an-image-using-c
amy white16 reputationPosted Mar 23, 2014, 6:19 PM EDT
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.
vijay172 reputationPosted May 31, 2014, 4:11 AM EDT
Refer the below link to do crop the image..........
http://vdsite.com/Articles/185/Image-cropping-using-jquery-in-Asp.net