I just had a similar problem a few hours ago check your boundaries for Clone. If you move outside of your bitmap it will throw this exception.
So be careful that this is the case.
1: MinWidth + (int)croppedBitmap.Width - MinWidth - MaxWidth <= croppedBitmap.Width
2: 0 + 1323 <= croppedBitmap.Height
if my guess is correct 1 & 2 are not fulfilled
EDIT:
Add this in front of Clone and post the result in your post
Debug.WriteLine("Bitmap-width: "+croppedBitmap.Width);
Debug.WriteLine("Bitmap-height: "+croppedBitmap.Height);
Debug.WriteLine("Width: "+(croppedBitmap.Width - MinWidth - MaxWidth));
Debug.WriteLine("MinWidth: "+MinWidth);
EDIT2:
1. Your width is < 0 (in this case -1) which shouldn't be the case
2. Even if it would be > 0 it would result in an error since 877 + x is > croppedBitmap.Width which is not allowed
So what I was saying from the very beginning is that you have to make sure that your width and height have to be larger 0 AND that the sum of width + MinWidth and height + 0 from your rectangle mustn't exceed the boundaries of your image.
Right now your rectangle looks like this:
new Rectangle(877, 0, -1, 1323) // Rectangle(posx, posy, width, height)
So as you can see the width is negative which is not what you want it has to be larger 0. So if you would do this now:
new Rectangle(877, 0, 1, 1323)
It would still be wrong since your rectangle would be from from 877 to 878 (x coordinate) which can't be since your image is only 877 pixels wide. This means MinWidth
and (int)croppedBitmap.Width - MinWidth - MaxWidth
are wrong. You have to make sure that your values don't cause these kind of problems.
It's not a problem with the Copy method it's more a problem of the passed parameters. You have to check them before passing them!