开发者

How to crop image on selecting certain area of it

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); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜