Sorry if there is information missing, im new to the topic.
I have an ESP32 connected to a Waveshare 7,5" RWB display, and i can display images by converting them to .xbm and including the hex code in the sketch. So far, so good.
But heres my question: What exactly are the requirements? Because when looking at the .xbm image code, i see that its a pattern like this:
0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00
But when i used a python script
import binascii
filename = 'test.png'
with open(filename, 'rb') as f:
content = f.read()
print(binascii.hexlify(content))
to convert an image to hex code, i got this:
b'89504e470d0a1a0a0000000d4948445200000280000001800802000000b2...'
(continues for thousands of characters, didnt want to paste all of that here
However, when trying to run the sketch that successfully displayed the first hex code with the second image code, i got this error(cut out the big string clutter again):
...0000000049454e44ae426082};
^
C:\Users\Administrator\Desktop\SPI_test_example\SPI_test_example.ino: In function 'void loop()':
SPI_test_example:167:21: error: 'showBitmapExample' was not declared in this scope
showBitmapExample();
^
SPI_test_example:171:51: error: 'showFont' was not declared in this scope
showFont("FreeMonoBold9pt7b", &FreeMonoBold9pt7b);
^
exit status 1
'showBitmapExample' was not declared in this scope
So, i would like to know - does the image code have to have exactly the format i mentioned first? This is very important for me because i want to automate the process from inputting any image to using the resulting code to feed the display.
Thanks in advance!
EDIT: As far as my understanding goes, both formats are the same data, just that the first one is displaying a white pixel as 0xFF,0xFF,0xFF and the second one as FFFFFF.