[英]Stride and Width in image processing
I HAVE A 1bpp image that needs to be read. 我有一个需要读取的1bpp图像。
I came across the following logic. 我遇到了以下逻辑。 but I am not sure what it is trying to do.
但我不确定它要做什么。
int value = (imagebmd.Width + 15) >> 3;
byte* row = (byte*)imagebmd.Scan0;
I don't understand what value is stored in columns and row variables. 我不明白列和行变量中存储了什么值。
int columns = (imagebmd.Width + 7) >> 3;
This is byte length of image line. 这是图像行的字节长度。 It is equivalent of rounding up
相当于四舍五入
columns = Ceil(bitwidth / 8)
row is pointer to image data start address. 行是指向图像数据起始地址的指针。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.