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

Frederic_Delhoume
Sat, 02 Jun 2018 19:22:05 +0000
FastLED Archive

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

gist.github.com

https://gist.github.com/delhoume/561c4a135bb5796c6415c0f4e0ad1a0f

invaderbmp.ino

#define FASTLED_ALLOW_INTERRUPTS 0
#define FASTLED_INTERRUPT_RETRY_COUNT 1

#include <FS.h>
#include <FastLED.h>

#define baud 57600

const uint8_t width = 8;
const uint8_t height = 8;
This file has been truncated. show original

Do not hesitate to test and comment

7 posts - 1 participant