C#Bitmap currentRegionMap = .... BitmapData btmData= currentRegionMap.LockBits(new Rectangle(x, y, width, height), ImageLockMode.ReadOnly, currentRegionMap.PixelFormat); byte* a = (byte*)btmData.Scan0.ToPointer();