ILI9341-STM32-HAL icon indicating copy to clipboard operation
ILI9341-STM32-HAL copied to clipboard

Distorted bitmaps when not covering entire LCD

Open IboKhaled opened this issue 3 years ago • 0 comments

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?

IboKhaled avatar Feb 24 '21 14:02 IboKhaled