summaryrefslogtreecommitdiff
path: root/shared-module/displayio/OnDiskBitmap.c
AgeCommit message (Collapse)Author
2021-03-15run code formatting scriptmicroDev
2020-12-17OnDiskBitmap: Correct handling of "0 color palette" imagesJeff Epler
Microsoft documentation says: > If biCompression equals BI_RGB and the bitmap uses 8 bpp or less, the bitmap has a color table immediatelly following the BITMAPINFOHEADER structure. The color table consists of an array of RGBQUAD values. The size of the array is given by the biClrUsed member. If biClrUsed is zero, the array contains the maximum number of colors for the given bitdepth; that is, 2^biBitCount colors. Formerly, we treated 0 colors as "no image palette" during construction, but then during common_hal_displayio_ondiskbitmap_get_pixel indexed into the palette anyway. This could have unpredictable results. On a pygamer, it gave an image that was blue and black. On magtag, it gave a crash.
2019-08-22More cleanupScott Shawcroft
2019-08-22EPaper displays work mostly.Scott Shawcroft
2019-04-17Fix off by one error in OnDiskBitmapScott Shawcroft
It resulted in the first row of pixels being pulled for out of bounds. Fixes #1801
2019-03-01fixed typoBryan Siepert
2019-03-01fixed whitespace, clarified variable name, and updated error messagesBryan Siepert
2019-02-28added monochrome, 8bpp indexed, and 32bpp ARGB BMPsBryan Siepert
2019-02-23(fork rebuild) Initial support for 16bpp 555&565 and 8bpp grayscale bitmapsBryan Siepert
2019-01-20adding height and width to OnDiskBitmap for #1460Bryan Siepert
2018-09-12Add OnDiskBitmap which loads pixel data straight from disk.Scott Shawcroft
Also, renamed Sprite's palette to pixel_shader so it can be anything that produces colors based on values (including color values). Added a ColorConverter that converts RGB888 (found in bitmaps) to RGB565 for the display. Fixes #1182