这句话是什么意思:
The Stride property, holds the width of one row in bytes. The size of a row however may not be an exact multiple of the pixel size because for efficiency, the system ensures that the data is packed into rows that begin on a four byte boundary and are padded out to a multiple of four bytes.
最佳答案
这意味着如果您的图像宽度为 17 像素并且颜色为 3 个字节,则您将获得 51 个字节。因此,您的图像宽度(以字节为单位)为 51 字节,那么步长为 52 字节,这是图像宽度(以字节为单位)四舍五入到下一个 4 字节边界。
关于c# - Bitmap Stride 和 4 bytes 的关系?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5735997/