Closed Reddds closed 3 years ago
If width of bitmap * 3 MOD 4 == 0 then bytes in row greater then necessary on 4.
Right calculation: uint8_t d = (iwidth * 3) % 4; rowbytes = (iwidth * 3); if(d > 0) { rowbytes += 4 - d; }
uint8_t d = (iwidth * 3) % 4; rowbytes = (iwidth * 3); if(d > 0) { rowbytes += 4 - d; }
Thank you your support . I will fix it .
Thank you your support . Merged .
If width of bitmap * 3 MOD 4 == 0 then bytes in row greater then necessary on 4.
Right calculation:
uint8_t d = (iwidth * 3) % 4; rowbytes = (iwidth * 3); if(d > 0) { rowbytes += 4 - d; }