I would like to cro开发者_运维百科p image by selecting some area of it by dragging it over image.
I hope this helps, its a jquery plugin http://deepliquid.com/projects/Jcrop/demos.php?demo=handler which help u get the coordinates for the crop region. when you get those coordinates you can use the following function in c#.
Rectangle CropArea; // assign the rectangle the x,y cordinates.
Bitmap bmpImage = new Bitmap(img);
Bitmap bmpCrop = bmpImage.Clone(cropArea,
bmpImage.PixelFormat);
return (Image)(bmpCrop);
精彩评论