It was not immediately obvious to me how format graphic for the Wifi 32 kit OLED ESP32 module, so here is the step by step process that I found to work.
- Find your graphic, in one of the common formats – e.g Jpeg, but keep in mind it will converted to a low res black and white image
- Using Windows paint convert to a bit size that will fit on the display (remembering that the max size is 128 x 64
- Convert it to the XBM format
- visit Online Utility site http://www.online-utility.org/image_converter.jsp
- follow instructions to convert and save file to XMB format
- Edit the file using notepad (or similar text editor), firstly change the title to something sensible (yellow highlight), then change the main array from ‘static char’ (red highlight) to ‘const unsigned char’ – see example below. Note: – The PROGMEM directive puts the array data into the program area rather than using variable space
- Change the file extension to ‘.h’ and save it to the same sub-director as the .ino source file