Image to C Array
Convert images to C byte arrays for OLED and LCD displays — monochrome 1bpp (horizontal or SSD1306 vertical) and RGB565, Adafruit GFX / U8g2 ready.
Convert an image into a C byte array for OLED/LCD displays (Adafruit GFX, U8g2, SSD1306) — monochrome 1bpp or RGB565, all in your browser.
About Image to C Array
Embedded displays need images packed as byte arrays — this converter turns any image into ready-to-paste C code for Adafruit GFX, U8g2, SSD1306 and similar libraries. Choose horizontal or vertical 1bpp byte packing, RGB565 for color TFTs, adjust threshold and inversion, and get a PROGMEM-ready array.
Everything runs in your browser: the image is drawn to a canvas, thresholded or quantized, and emitted as hex bytes — no upload, no server. The live preview shows exactly what the display will render.
How to use Image to C Array
- Upload the source image and set the target width/height in pixels.
- Pick the byte format — vertical 1bpp for SSD1306 pages, horizontal for most monochrome libs, RGB565 for color TFTs.
- Tune the threshold and invert if the preview looks wrong.
- Copy the generated C array into your sketch or download it as a .h file.
Frequently asked questions
Which format does the SSD1306 use?
Vertical bytes (page mode) — each byte is a column of 8 pixels with the LSB at top. That is the 'mono-v' option here.
What does PROGMEM do?
On AVR it keeps the array in flash instead of RAM — the generated declaration already includes it; remove it for ESP32/STM32 where it is unnecessary.
Why does my bitmap look inverted on the display?
Some panels treat bit=1 as pixel-off. Toggle the Invert checkbox — the preview shows the result as the display will render it.