Data Conversion for GIMP Bitmap

Hey guys,

I have been banging my head on this issue for a few days now. I want to fetch data from a server, which can be in the form of a char array or a string, and use that data to show something on my (4x) 32x16 P10 LED Panel.

Now, I was testing basically how to pass data from a variable to a structure of GIMP Bitmap. I am using the SmartMatrix Library and ESP32 DevKit.

I have attached the code. Here's a quick glance at where the error is occurring:

unsigned char dataString[] =   
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*\14\12\2427-\336XG\341]"
  "J\337[I\335QB\2412()\13\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0~\32"
  "\26\3277/\334C7\353WI\354ZK\353WJ\352RG\333=2\325/)|\26\25\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\207\2\15\326\37\37\34495\345>8\345B:\346@8\346>7\346;8\344"
  "56\343.1\320\25\34z\4\17\0\0\0\0\0\0\0\0\0\12!\13ee&\351\30%\343(*\341&&"
  "\343\35\32\356^Y\353SG\337>\27\337=\"\336=&\337;%\317(\25)\21\3\0\0\0\0\0"
  "\0*|+0\265>\264+\"\342\23\34\351?B\377\376\375\310\356\377\312\360\377\377"
  "\377\376\356\3144\353\305\13\361\321\17\353\312\0\256\226\0\0\0\0\0\0\0:"
  "\2449H\301K[v1\325\0\5\377\377\377R\232\327c\241\327e\242\330r\251\341\377"
  "\377\376\377\322\0\375\324\5\375\323\10\353\301\0\0\0\0\0\0\0;\2439L\273"
  "I@\276F\241_M\265\333\374>\203\307W\223\315W\223\316@\203\310\253\315\377"
  "\377\341@\374\321\2\374\322\10\353\300\0\0\0\0\0\0\0""9\2368M\271IH\273F"
  "s\255d\263\320\366&t\276;\202\305<\202\305&u\277\242\310\374\377\341@\374"
  "\321\2\374\322\10\351\275\0\0\0\0\0\0\0""7\2307L\270IK\270G>\2658\377\377"
  "\377\25b\252\22e\253\23e\253\20c\257\377\377\377\377\320\0\374\322\6\374"
  "\322\10\344\266\3\0\0\0\0\0\0'j(=\245;L\270IG\266Bi\305a\377\377\377\247"
  "\274\343\244\275\344\365\374\377\363\325-\376\321\0\375\323\10\354\300\1"
  "\245\201\7\0\0\0\0\0\0\11\31\12""6\2216L\263HK\270HG\266B?\2648|\317ul\303"
  "w\204\247\25\377\324\0\374\322\7\371\316\15\340\256\10)\37\3\0\0\0\0\0\0"
  "\0\0\0\32L\35""5\2216K\260HK\266IJ\270GB\267FR\254:\377\322\3\377\321\12"
  "\370\312\21\336\255\12{\\\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\30I\35""1\207"
  "4;\2309H\255H7\252K\323\277\34\375\310\23\343\261\14\325\241\21xX\16\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\26\11\35Y#$|2^\207)\337\232\21\314"
  "\223\26\224j\21&\33\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
  
static const gimp32x32bitmap chrome16 = {
  16, 16, 3, dataString,};

The error that I get is:

bitmapTesting:110:25: error: invalid conversion from 'unsigned char*' to 'unsigned char' [-fpermissive]

16, 16, 3, dataString,};

^

exit status 1
invalid conversion from 'unsigned char*' to 'unsigned char' [-fpermissive]

I am not able to figure out where I'm going wrong. I was wondering if y'all could help me out.

Thanks in advance!!!

bitmapTesting.ino (9.44 KB)

I have a structure that I need to use because it is the default structure format for a GIMP image.

unsigned char dataString[] =   
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0*\14\12\2427-\336XG\341]"
  "J\337[I\335QB\2412()\13\11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0~\32"
  "\26\3277/\334C7\353WI\354ZK\353WJ\352RG\333=2\325/)|\26\25\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\207\2\15\326\37\37\34495\345>8\345B:\346@8\346>7\346;8\344"
  "56\343.1\320\25\34z\4\17\0\0\0\0\0\0\0\0\0\12!\13ee&\351\30%\343(*\341&&"
  "\343\35\32\356^Y\353SG\337>\27\337=\"\336=&\337;%\317(\25)\21\3\0\0\0\0\0"
  "\0*|+0\265>\264+\"\342\23\34\351?B\377\376\375\310\356\377\312\360\377\377"
  "\377\376\356\3144\353\305\13\361\321\17\353\312\0\256\226\0\0\0\0\0\0\0:"
  "\2449H\301K[v1\325\0\5\377\377\377R\232\327c\241\327e\242\330r\251\341\377"
  "\377\376\377\322\0\375\324\5\375\323\10\353\301\0\0\0\0\0\0\0;\2439L\273"
  "I@\276F\241_M\265\333\374>\203\307W\223\315W\223\316@\203\310\253\315\377"
  "\377\341@\374\321\2\374\322\10\353\300\0\0\0\0\0\0\0""9\2368M\271IH\273F"
  "s\255d\263\320\366&t\276;\202\305<\202\305&u\277\242\310\374\377\341@\374"
  "\321\2\374\322\10\351\275\0\0\0\0\0\0\0""7\2307L\270IK\270G>\2658\377\377"
  "\377\25b\252\22e\253\23e\253\20c\257\377\377\377\377\320\0\374\322\6\374"
  "\322\10\344\266\3\0\0\0\0\0\0'j(=\245;L\270IG\266Bi\305a\377\377\377\247"
  "\274\343\244\275\344\365\374\377\363\325-\376\321\0\375\323\10\354\300\1"
  "\245\201\7\0\0\0\0\0\0\11\31\12""6\2216L\263HK\270HG\266B?\2648|\317ul\303"
  "w\204\247\25\377\324\0\374\322\7\371\316\15\340\256\10)\37\3\0\0\0\0\0\0"
  "\0\0\0\32L\35""5\2216K\260HK\266IJ\270GB\267FR\254:\377\322\3\377\321\12"
  "\370\312\21\336\255\12{\\\14\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\30I\35""1\207"
  "4;\2309H\255H7\252K\323\277\34\375\310\23\343\261\14\325\241\21xX\16\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\26\11\35Y#$|2^\207)\337\232\21\314"
  "\223\26\224j\21&\33\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
  "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
static const gimp32x32bitmap chrome16 = {
  16, 16, 3, dataString,};

The structure for a GIMP image is :

typedef struct  {
  unsigned int   width;
  unsigned int   height;
  unsigned int   bytes_per_pixel; /* 2:RGB16, 3:RGB, 4:RGBA */
  unsigned char  pixel_data[32*32*3 + 1];
} gimp32x32bitmap;

Now, whenever I run the first set of code, it gives me the following errors:

bitmapTesting:108:25: error: invalid conversion from 'unsigned char*' to 'unsigned char' [-fpermissive]

   16, 16, 3, dataString,};

                         ^

exit status 1
invalid conversion from 'unsigned char*' to 'unsigned char' [-fpermissive]

Now, the problem I have with this is that both the stringData[] and pixel_data[] are unsigned char arrays so why is this error occurring?

Thanks in advance!

why don't you represent the array in some binary format rather than ascii and octal value?

     00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
     00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 2a, 0c, 0a, a2, 37, 2d, de, 58, 47, e1, 5d,
     4a, df, 5b, 49, dd, 51, 42, a1, 32, 28, 29, 0b, 09, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 7e,
     1a, 16, d7, 37, 2f, dc, 43, 37, eb, 57, 49, ec, 5a, 4b, eb, 57, 4a, ea, 52, 47, db, 3d, 32, d5, 2f, 29, 7c, 16, 15, 00, 00, 00, 00, 00, 00,
     00, 00, 00, 00, 00, 00, 00, 00, 00, 87, 02, 0d, d6, 1f, 1f, e4, 39, 35, e5, 3e, 38, e5, 42, 3a, e6, 40, 38, e6, 3e, 37, e6, 3b, 38, e4,
     35, 36, e3, 2e, 31, d0, 15, 1c, 7a, 04, 0f, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0a, 21, 0b, 65, 65, 26, e9, 18, 25, e3, 28, 2a, e1, 26, 26,
     e3, 1d, 1a, ee, 5e, 59, eb, 53, 47, df, 3e, 17, df, 3d, 00, 22, de, 3d, 26, df, 20, 25, cf, 28, 15, 29, 11, 03, 00, 00, 00, 00,
     00, 00, 2a, 7c, 2b, 30, b5, 3e, b4, 2b, 00, 22, e2, 13, 1c, e9, 3f, 42, ff, fe, fd, c8, ee, ff, ca, f0, ff, ff,
     ff, fe, ee, cc, 34, eb, c5, 0b, f1, d1, 0f, eb, ca, 00, ae, 96, 00, 00, 00, 00, 00, 00, 00, 3a,
     a4, 39, 48, c1, 4b, 5b, 76, 31, d5, 00, 05, ff, ff, ff, 52, 9a, d7, 63, a1, d7, 65, a2, d8, 72, a9, e1, ff,
     ff, fe, ff, d2, 00, fd, d4, 05, fd, d3, 08, eb, c1, 00, 00, 00, 00, 00, 00, 00, 3b, a3, 39, 4c, bb,
     49, 40, be, 46, a1, 5f, 4d, b5, db, fc, 3e, 83, c7, 57, 93, cd, 57, 93, ce, 40, 83, c8, ab, cd, ff,
     ff, e1, 40, fc, d1, 02, fc, d2, 08, eb, c0, 00, 00, 00, 00, 00, 00, 00, 22, 22, 39, 9e, 38, 4d, b9, 49, 48, bb, 46,
     73, ad, 64, b3, d0, f6, 26, 74, be, 3b, 82, c5, 3c, 82, c5, 26, 75, bf, a2, c8, fc, ff, e1, 40, fc,
     d1, 02, fc, d2, 08, e9, bd, 00, 00, 00, 00, 00, 00, 00, 22, 22, 37, 98, 37, 4c, b8, 49, 4b, b8, 47, 3e, b5, 38, ff, ff,
     ff, 15, 62, aa, 12, 65, ab, 13, 65, ab, 10, 63, af, ff, ff, ff, ff, d0, 00, fc, d2, 06, fc,
     d2, 08, e4, b6, 03, 00, 00, 00, 00, 00, 00, 27, 6a, 28, 3d, a5, 3b, 4c, b8, 49, 47, b6, 42, 69, c5, 61, ff, ff, ff, a7,
     bc, e3, a4, bd, e4, f5, fc, ff, f3, d5, 2d, fe, d1, 00, fd, d3, 08, ec, c0,
     01, a5, 81, 07, 00, 00, 00, 00, 00, 00, 09, 19, 0a, 22, 22, 36, 91, 36, 4c, b3, 48, 4b, b8, 48, 47, b6, 42, 3f, b4, 38, 7c, cf, 75, 6c, c3,
     77, 84, a7, 15, ff, d4, 00, fc, d2, 07, f9, ce, 0d, e0, ae, 08, 29, 1f, 03, 00, 00, 00, 00, 00,
     00, 00, 00, 00, 1a, 4c, 1d, 22, 22, 35, 91, 36, 4b, b0, 48, 4b, b6, 49, 4a, b8, 47, 42, b7, 46, 52, ac, 3a, ff, d2, 03, ff, d1,
     0a, f8, ca, 11, de, ad, 0a, 7b, 00, 0c, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 18, 49, 1d, 22, 22, 31, 87,
     34, 3b, 98, 39, 48, ad, 48, 37, aa, 4b, d3, bf, 1c, fd, c8, 13, e3, b1, 0c, d5, a1, 11, 78, 58, 0e, 00,
     00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 07, 16, 09, 1d, 59, 23, 24, 7c, 32, 5e, 87, 29, df, 9a, 11, cc,
     93, 16, 94, 6a, 11, 26, 1b, 05, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,
     00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,

why don't you specify the data in a binary format instead of ascii and octal strings

     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x0c, 0x0a, 0xa2, 0x37, 0x2d, 0xde, 0x58, 0x47, 0xe1, 0x5d,
     0x4a, 0xdf, 0x5b, 0x49, 0xdd, 0x51, 0x42, 0xa1, 0x32, 0x28, 0x29, 0x0b, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e,
     0x1a, 0x16, 0xd7, 0x37, 0x2f, 0xdc, 0x43, 0x37, 0xeb, 0x57, 0x49, 0xec, 0x5a, 0x4b, 0xeb, 0x57, 0x4a, 0xea, 0x52, 0x47, 0xdb, 0x3d, 0x32, 0xd5, 0x2f, 0x29, 0x7c, 0x16, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x02, 0x0d, 0xd6, 0x1f, 0x1f, 0xe4, 0x39, 0x35, 0xe5, 0x3e, 0x38, 0xe5, 0x42, 0x3a, 0xe6, 0x40, 0x38, 0xe6, 0x3e, 0x37, 0xe6, 0x3b, 0x38, 0xe4,
     0x35, 0x36, 0xe3, 0x2e, 0x31, 0xd0, 0x15, 0x1c, 0x7a, 0x04, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x21, 0x0b, 0x65, 0x65, 0x26, 0xe9, 0x18, 0x25, 0xe3, 0x28, 0x2a, 0xe1, 0x26, 0x26,
     0xe3, 0x1d, 0x1a, 0xee, 0x5e, 0x59, 0xeb, 0x53, 0x47, 0xdf, 0x3e, 0x17, 0xdf, 0x3d, 0x00, 0x22, 0xde, 0x3d, 0x26, 0xdf, 0x20, 0x25, 0xcf, 0x28, 0x15, 0x29, 0x11, 0x03, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x2a, 0x7c, 0x2b, 0x30, 0xb5, 0x3e, 0xb4, 0x2b, 0x00, 0x22, 0xe2, 0x13, 0x1c, 0xe9, 0x3f, 0x42, 0xff, 0xfe, 0xfd, 0xc8, 0xee, 0xff, 0xca, 0xf0, 0xff, 0xff,
     0xff, 0xfe, 0xee, 0xcc, 0x34, 0xeb, 0xc5, 0x0b, 0xf1, 0xd1, 0x0f, 0xeb, 0xca, 0x00, 0xae, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a,
     0xa4, 0x39, 0x48, 0xc1, 0x4b, 0x5b, 0x76, 0x31, 0xd5, 0x00, 0x05, 0xff, 0xff, 0xff, 0x52, 0x9a, 0xd7, 0x63, 0xa1, 0xd7, 0x65, 0xa2, 0xd8, 0x72, 0xa9, 0xe1, 0xff,
     0xff, 0xfe, 0xff, 0xd2, 0x00, 0xfd, 0xd4, 0x05, 0xfd, 0xd3, 0x08, 0xeb, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3b, 0xa3, 0x39, 0x4c, 0xbb,
     0x49, 0x40, 0xbe, 0x46, 0xa1, 0x5f, 0x4d, 0xb5, 0xdb, 0xfc, 0x3e, 0x83, 0xc7, 0x57, 0x93, 0xcd, 0x57, 0x93, 0xce, 0x40, 0x83, 0xc8, 0xab, 0xcd, 0xff,
     0xff, 0xe1, 0x40, 0xfc, 0xd1, 0x02, 0xfc, 0xd2, 0x08, 0xeb, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x39, 0x9e, 0x38, 0x4d, 0xb9, 0x49, 0x48, 0xbb, 0x46,
     0x73, 0xad, 0x64, 0xb3, 0xd0, 0xf6, 0x26, 0x74, 0xbe, 0x3b, 0x82, 0xc5, 0x3c, 0x82, 0xc5, 0x26, 0x75, 0xbf, 0xa2, 0xc8, 0xfc, 0xff, 0xe1, 0x40, 0xfc,
     0xd1, 0x02, 0xfc, 0xd2, 0x08, 0xe9, 0xbd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x37, 0x98, 0x37, 0x4c, 0xb8, 0x49, 0x4b, 0xb8, 0x47, 0x3e, 0xb5, 0x38, 0xff, 0xff,
     0xff, 0x15, 0x62, 0xaa, 0x12, 0x65, 0xab, 0x13, 0x65, 0xab, 0x10, 0x63, 0xaf, 0xff, 0xff, 0xff, 0xff, 0xd0, 0x00, 0xfc, 0xd2, 0x06, 0xfc,
     0xd2, 0x08, 0xe4, 0xb6, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x27, 0x6a, 0x28, 0x3d, 0xa5, 0x3b, 0x4c, 0xb8, 0x49, 0x47, 0xb6, 0x42, 0x69, 0xc5, 0x61, 0xff, 0xff, 0xff, 0xa7,
     0xbc, 0xe3, 0xa4, 0xbd, 0xe4, 0xf5, 0xfc, 0xff, 0xf3, 0xd5, 0x2d, 0xfe, 0xd1, 0x00, 0xfd, 0xd3, 0x08, 0xec, 0xc0,
     0x01, 0xa5, 0x81, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x19, 0x0a, 0x22, 0x22, 0x36, 0x91, 0x36, 0x4c, 0xb3, 0x48, 0x4b, 0xb8, 0x48, 0x47, 0xb6, 0x42, 0x3f, 0xb4, 0x38, 0x7c, 0xcf, 0x75, 0x6c, 0xc3,
     0x77, 0x84, 0xa7, 0x15, 0xff, 0xd4, 0x00, 0xfc, 0xd2, 0x07, 0xf9, 0xce, 0x0d, 0xe0, 0xae, 0x08, 0x29, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x1a, 0x4c, 0x1d, 0x22, 0x22, 0x35, 0x91, 0x36, 0x4b, 0xb0, 0x48, 0x4b, 0xb6, 0x49, 0x4a, 0xb8, 0x47, 0x42, 0xb7, 0x46, 0x52, 0xac, 0x3a, 0xff, 0xd2, 0x03, 0xff, 0xd1,
     0x0a, 0xf8, 0xca, 0x11, 0xde, 0xad, 0x0a, 0x7b, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x49, 0x1d, 0x22, 0x22, 0x31, 0x87,
     0x34, 0x3b, 0x98, 0x39, 0x48, 0xad, 0x48, 0x37, 0xaa, 0x4b, 0xd3, 0xbf, 0x1c, 0xfd, 0xc8, 0x13, 0xe3, 0xb1, 0x0c, 0xd5, 0xa1, 0x11, 0x78, 0x58, 0x0e, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x16, 0x09, 0x1d, 0x59, 0x23, 0x24, 0x7c, 0x32, 0x5e, 0x87, 0x29, 0xdf, 0x9a, 0x11, 0xcc,
     0x93, 0x16, 0x94, 0x6a, 0x11, 0x26, 0x1b, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,

That is because the format I am using is the GIMP bitmap standard. It will be easier for the end user to upload a GIMP bitmap image and I will be able to quickly transfer that content from a server to the board.

I am trying to send data from a server to my ESP32, it will be an element of a MySQL database due to certain requirements. Thus, it's compulsory for me to get a unsigned char array.

Morever, the GIMP bitmap standard requires me to store data in the mentioned order. And the SmartMatrix Library requires bitmaps to be in the GIMP standard to display those bitmaps properly.

tgr8db:
I am trying to send data from a server to my ESP32, it will be an element of a MySQL database due to certain requirements. Thus, it's compulsory for me to get a unsigned char array.

Morever, the GIMP bitmap standard requires me to store data in the mentioned order. And the SmartMatrix Library requires bitmaps to be in the GIMP standard to display those bitmaps properly.

The data type of the array, and the format in which the members are specified, are completely different things. So if you are explaining why you can't follow the suggestion of reply #1, you're off track.

Regarding your main problem, I don't think you can pass aggregate data like your 'dataString' to initialize an instance of a struct. Only a pointer.

duplicate thread!
https://forum.arduino.cc/index.php?topic=669676.0

Duplicate topics merged

at least one compiler error is due to the data strings spanning 2 lines -- make sure there's a quote at each end