更新时间2018-03-06 21:38:20
操作如下: Bitmap _Bitmap = (Bitmap)Image.FromFile(@"c:1.BMP"); BitmapData _BitmapData = _Bitmap.LockBits(new Rectangle(0, 0, _Bitmap.Width, _Bitmap.Height), ImageLockMode.ReadWrite, _Bitmap.PixelFormat); byte[] _Value = new byte[_BitmapData.Stride * _BitmapData.Height]; Marshal.Copy(_BitmapData.Scan0, _Value, 0, _Value.Length);写回去还是用 Marshal.Copy.