0
我想通过将图像拖动到图像上来选择某个区域来裁剪图像。如何在选择某个区域时裁剪图像
我想通过将图像拖动到图像上来选择某个区域来裁剪图像。如何在选择某个区域时裁剪图像
我希望这会有所帮助,它是一个jQuery插件http://deepliquid.com/projects/Jcrop/demos.php?demo=handler,它可以帮助您获得作物区域的坐标。当你获得这些坐标时,你可以在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);
Umm..ok?如果他们毫无疑问,或者你至少有*尝试*某事,我们无法帮助你。我们不是代码猴子,也不介意读者。 –