Hi all, I would like to share something I've written these last days.

Hi all,

I would like to share something I’ve written these last days. It is a minimal BMP Bitmap reader for ESP8266. It supports reading from memory and SPIFFs. When reading from SPIFFS only minimal memory is needed (it allocates only one row of data - could be changed to allocate almost nothing but one line is usually not much). It supports non-compressed BMPS with depth of 8 and 24 currently (no RLE compression)

It seems to work for some files from http://bmptestsuite.sourceforge.net/ :
24bpp-320x240.bmp
24bpp-321x240.bmp
24bpp-322x240.bmp
24bpp-323x240.bmp
24bpp-topdown-320x240.bmp
8bpp-320x240.bmp
8bpp-321x240.bmp
8bpp-322x240.bmp
8bpp-323x240.bmp

and also it works for 8x8 RGB 24 bit bitmaps generated by Jinx!, that is my primary use with FastLed.

I hope it will help someone storing and display large data using FastLED.

Here is the code, with a large number of Serial outputs…and calls to FastLED disabled, as my 8x8 matrix does not handle these 320x240 BMPs…

See http://arduino-esp8266.readthedocs.io/en/latest/filesystem.html

Do not hesitate to test and comment

I have added RGB 4 bits/pixel support, it allows for 16 colors and 8x8 BMP files are only 150 bytes, that allows a lot of them to be stored on SPIFFS on esp8266. Code on request. I use http://www.coranac.com/projects/usenti/ for generating these files, it is a nice colormap based bitmap editor and supports 4/8/24 BMP export.

Well, what timing, I just did the same thing for gif reading from SPIFFS, using code from Jason Coon that I was able to port. See https://github.com/marcmerlin/FastLED_NeoMatrix/tree/master/examples/espgifread

@Marc_MERLIN Gifs might be much more useful than BMPs for large panels such as yours (32x32 IIRC) . And they support animation too…
SPIFFS is really a nice thing to have on ESP8266, no more wasted inliine char* bitmaps in our code !

Yeah, animated gifs rule and as you said it’s great not to waste program space. Feel free to give my library a try, I hope it works for you.

I have specific needs, as my matrix is 8x8. An 4 bit per pixel (16 color) BMP 8x8 is 150 bytes, hard to beat. It might be made smaller using RLE compression, but I do not think it is worth it. I use filenaming for animations right now <filename000xxx.bmp> and load and display them in this order.

Yeah, fair enough, it’s not big.