tr
Diff: N5110.cpp
- Revision:
- 53:62184d04f9b5
- Parent:
- 52:1210e39a4748
--- a/N5110.cpp Thu Mar 18 13:58:10 2021 +0000 +++ b/N5110.cpp Tue Mar 30 13:47:15 2021 +0000 @@ -461,6 +461,10 @@ int ncols, char *pic) { + if(ncols%8) + { + ncols = (ncols/8 + 1) * 8; + } if((nrows - x0) < 84) x0 = nrows - 84; if((ncols - y0) < 48) @@ -472,7 +476,7 @@ char pixels = 0; int divisor = ((x0 + m) * ncols + (y0 + n * 8))/8; int remainder = ((x0 + m) * ncols + (y0 + n * 8))%8; - pixels = ((pic[divisor] << remainder)) + ((pic[divisor+1] >> (8 - remainder))); + pixels = ((pic[divisor] >> remainder)) + ((pic[divisor+1] << (8 - remainder))); buffer[m][n] = pixels; } }