ardnew / ILI9341-STM32-HAL

ILI9341 color TFT display and touchscreen driver for STM32 using HAL SPI with DMA
MIT License
86 stars 17 forks source link

Distorted bitmaps when not covering entire LCD #4

Open IboKhaled opened 3 years ago

IboKhaled commented 3 years ago

Hi,

I ran into an issue when drawing bitmaps using ili9341_draw_bitmap_1b. Bitmaps work fine when filling the entire screen but appear distorted when they only cover a smaller area. Each row is shifted one pixel to the left.

I've tested checkerboards in three different sizes, covering the full, quater or sixteenth of the screen area. A header (rename .txt to .h) with the bitmaps is attached.

Calling ili9341_draw_bitmap_1b(myLCD, ILI9341_WHITE, ILI9341_BLACK, 0, 0, 320, 240, (uint8_t*)checkerboard_full) results in this: Checkerboard_full

Calling ili9341_draw_bitmap_1b(myLCD, ILI9341_WHITE, ILI9341_BLACK, 0, 0, 160, 120, (uint8_t*)checkerboard_quater) results in this: Checkerboard_quater

And calling ili9341_draw_bitmap_1b(myLCD, ILI9341_WHITE, ILI9341_BLACK, 0, 0, 80, 60, (uint8_t*)checkerboard_sixteenth) results in this: Checkerboard_sixteenth

Could this be a problem with my specific hardware or is something wrong with the library there?