How to create a Bitmap deep copy

B.Clone(new Rectangle(0, 0, B.Width, B.Height), B.PixelFormat)

My environment:Windows 10, Visual Studio 2015, Framework 4.5.2

It works for me.

Bitmap deepCopy = new Bitmap(original);

Another way I stumbled on that achieves the same thing is to rotate or flip the image. Under the hood that seems to create a completely new copy of the bitmap. Doing two rotations or flips lets you end up with an exact copy of the original image.

result.RotateFlip(RotateFlipType.Rotate180FlipX);
result.RotateFlip(RotateFlipType.Rotate180FlipX);