Add XBitmap support (direct usage GIMP *.xbm files) by subsonicpulse · Pull Request #31 · adafruit/Adafruit-GFX-Library (original) (raw)

Hi,
I've try the drawXBitmap function, but it doesn't seem to work on a ARDUINO_ARCH_ARC32 (Arduino 101).
Result on the matrix seem to be random pixel.
I use a static const uint8_t PROGMEM:

// My bitmap exported by GIMP ".xbm"
static const uint8_t PROGMEM xbitmap [] = {
0x80, 0xff, 0x00, 0x70, 0x15, 0x03, 0x70, 0x02, 0x03, 0x88, 0x0a, 0x0c,
0x06, 0x05, 0x10, 0xa6, 0x14, 0x10, 0x46, 0x00, 0x10, 0x0b, 0xa0, 0x60,
0x13, 0x00, 0x75, 0x0b, 0x40, 0x65, 0x13, 0x00, 0x61, 0x13, 0x20, 0x60,
0x21, 0x40, 0x60, 0x43, 0x29, 0x60, 0x21, 0x52, 0x60, 0xd1, 0xff, 0x61,
0xe1, 0xff, 0x75, 0x3e, 0x23, 0x1e, 0x08, 0x22, 0x0c, 0x08, 0x22, 0x0c,
0x08, 0x00, 0x0c, 0x30, 0x00, 0x02, 0xc0, 0xdd, 0x01, 0xc0, 0xff, 0x01 };

// code
matrix.drawXBitmap(0, 0, xbitmap, 32, 24, 0xff);

If I use the drabitmap with the image2cpp converter "http://javl.github.io/image2cpp/"
Picture show up correctly on my led matrix.

Can it be a problem with the function "pgm_read_byte()" ??