Hi everyone
I think this is a simple question but its got me stuck. I’ve been using the Leptonica image library and came across the term “Words Per Line” or “WPL”. I tracked down the code but have no idea what its for:
wpl = (width * depth + 31) / 32;
Has anyone ever come across wpl when working with images?
Thanks,
Laurence
Somewhere along the pipeline the software (or hardware) only wants to deal with multiples of 32 bits.
WPL is computed by the formula you quote as the number of 32-bits words necessary to represent a line.
width * depthmeans the number of pixels per line multiplied by the number of bits per pixel. This multiplication results in the number of bits per line.The
( + 31) / 32part rounds up to the next integral number of 32-bit words.