FREEWING-JP / RaspberryPi_KeDei_35_lcd_v50

Raspberry Pi KeDei 3.5 inch TFT LCD module V5.0 SPI Control program
http://www.neko.ne.jp/~freewing/raspberry_pi/raspberry_pi_3_tft_lcd_3_5inch_kedei_touch_xpt2046_2/
11 stars 5 forks source link

Wrong calculationg bytes in row for bitmap. #1

Closed Reddds closed 3 years ago

Reddds commented 6 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; }

FREEWING-JP commented 6 years ago

Thank you your support . I will fix it .

FREEWING-JP commented 3 years ago

Thank you your support . Merged .