Probably, it's scaling. Check your PictureBox settings, specifically the
PictureBox.SizeMode Property (System.Windows.Forms) | Microsoft Docs[
^] - if it isn't set to "Normal" then the mouse coordinates you are using are relative to the Picturebox but not the the image it contains. If the image is scaled at all, then when you use mouse coordinates at all they don't match the actual picture you are clipping from.
A couple of other things:
1) Graphics contexts are scarce resources - and you are responsible for Disposing of them when you create them. If you don't, you will get "out of memory" errors long before the GC gets called in to tidy up after you. A
using
block is the best way, as it automatically Disposes when the object goes out of scope, regardless of how it exits the block.
using (Graphics g = Graphics.FromImage(_img))
{
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic;
...
}
2) Why are you creating so many bitmaps? You don't need half of them!
3) Never swallow exceptions:
catch (Exception ex)
{
}
When you do that, you throw away all information that might help you fix a problem later, as well as "hiding" the problem so you don't even know it happened, and can't fix it early enough to not make a proper mess. Log 'em, Show 'em to the user, display them on the Debug console - whatever works for you. But don;t just blanket swallow them!