I'm trying to crop a picture in C# from integer x, y coordinates.. I just can't figure out how to get it?
public void doCroppedImage(int pointX, int pointY)
{
Rectangle cropRect = //???
}
I'm trying to crop a picture in C# from integer x, y coordinates.. I just can't figure out how to get it?
public void doCroppedImage(int pointX, int pointY)
{
Rectangle cropRect = //???
}
You can use this code. It returns the cropped image.
But one comment, to crop an image you have to know not only the x and y coordinates of cropping point but also the width and height of the cropped image.