rdagger / micropython-ili9341

MicroPython ILI9341Display & XPT2046 Touch Screen Driver
MIT License
194 stars 40 forks source link

Image formats #2

Closed aleggon closed 3 years ago

aleggon commented 3 years ago

Not exactly an issue, more a question. What image formats does the draw_image method support? I checked the images folder and found only raw files, but I could not open them as raw on my PC. Windows did not recognize them as raw.

rdagger commented 3 years ago

It uses raw bitmap format. You can open, edit and save raw bitmaps using Gimp. You would need to manually specify the format as raw image data using RGB565 big endian with the correct dimensions in pixels for width and height. My repo includes a utility called img2rgb565.py which converts common image formats such as jpeg and png to the required raw format.