代码如下:public Bitmap CopyBitmap(Bitmap source){ int depth = Bitmap.GetPixelFormatSize(source.PixelFormat); if (depth != 8 && depth != 24 && depth != 32) { return null; } Bitmap destination = new Bitmap(source.Width, source.Height, source.PixelFormat); BitmapData source_bitm