开发者

How to crop image on selecting certain area of it

开发者 https://www.devze.com 2023-03-18 04:43 出处:网络
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 whic

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

精彩评论

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