我正在从一张1bpp索引图像剪切并粘贴到一张新图像。一切正常,直到起始像素是8的除数。在下面的代码中,步幅等于相对于矩形宽度的值,直到我达到字节边界。那么步幅等于整个页面的宽度。varcroppedRect=newRectangle((int)left,(int)top,(int)width,(int)height);BitmapDatacroppedSource=_bitmapImage.LockBits(croppedRect,ImageLockMode.ReadWrite,BitmapImage.PixelFormat);intstride=croppedSource.Strid