I HAVE A 1bpp image that needs to be read.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.