Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Hexprite Logo

The dedicated pixel art and font editor for embedded displays.

Platform License Website


Hexprite is a indie desktop desktop application specifically engineered for embedded software engineers, IoT creators, makers, pixel artists, and retro-computing hardware enthusiasts.

Unlike general-purpose art tools (like Photoshop or Aseprite), Hexprite is purpose-built with a strict 1-bit monochrome data engine to bridge the gap between creative pixel art design and the rigid memory, format, and display constraints of embedded hardware displays (OLED, e-Paper, Flipper Zero etc.).

Currently, it supports 1-bit monochrome mode and custom bitmap font editor mode. In future, I plan to develop a color mode for color displays.

✨ Key Features

🖥️ Full 1-Bit Graphics Editor

Full 1-Bit Graphics Editor

Everything you need to design pixel-perfect monochrome graphics without the bloat.

  • Comprehensive drawing and editing tools.
  • Advanced selection, move, and precise transformation controls.
  • Clean, distraction-free interface focused on pixel manipulation.

🔌 Direct Source File Updating

Link directly to your project's code files and automatically update embedded sprites.

  • Sprite Extraction: Scans .c, .h, .cpp, or .py source files for embedded graphics definitions.
  • Two-way sync: Replaces the target array body directly inside existing source code files on disk.
  • Deterministic Backup & Restore: Provides one-click restoration to original source states.
Direct Source Code Syncr

🔌 Live Hardware Preview

View your animations and pixel art live on your physical OLED/TFT display while you draw!

  • Include the lightweight HexpritePreview.h Arduino library in your own project firmware.
  • Hexprite streams pixel data directly to your board over Serial.
  • No Reflashing Required: You don't have to overwrite your project's firmware to preview art. Hexprite takes over the display only when streaming, allowing your sketch to run normally otherwise.
  • No library? No problem. A standalone quick-start sketch (no library install, but it replaces your sketch's code) is one click away from the sidebar for a fast first test.
  • The sidebar shows a live connection status (Connecting → Streaming → Connected) once your board acknowledges a frame, so you know the link is actually working — not just that the port opened.
#include <U8g2lib.h>
#include <HexpritePreview.h>

U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE);
HexpritePreview preview;

void setup() {
  Serial.setRxBufferSize(8192);
  Serial.begin(115200);
  u8g2.begin();
#if defined(ESP32)
  Serial0.setRxBufferSize(8192);
  Serial0.begin(115200);
  preview.begin(u8g2, Serial, &Serial0);  // dual listen for custom UART USB boards
#else
  preview.begin(u8g2, Serial);
#endif
}

void loop() {
  if (preview.update()) return;
  if (preview.isActive()) return;
  // Your normal display code when Hexprite is not streaming
}

PlatformIO: Copy Hexprite/Assets/HexpritePreview/ into your project's lib/ folder. See HexpritePreview/PLATFORMIO.md for full setup.

🎨 Strict 1-Bit Engine (No Faking It)

  • What you see is exactly what renders on your SSD1306, SH1106, or Flipper Zero.
  • The core data model is a strict bool[] array. Zero ambiguity, zero accidental grayscales, and zero anti-aliasing artifacts that corrupt C-array generation.

🔠 Embedded Font Editor & Typography

Go beyond sprites with a dedicated, professional embedded bitmap font editor (Ctrl+Shift+F).

  • Complete Typography Studio: Draw glyphs on a pixel grid with interactive baseline, ascent, descent, and X-advance guide overlays.
  • Import Pipelines: Convert TrueType (.ttf), BMFont (.fnt), and Sprite Sheets directly into editable monochrome font documents.
  • Kerning & Metrics: Adjust per-character advances, baseline offsets, and pair kerning table adjustments.
  • Live Preview Panel: Test sample text strings in real-time as you modify glyphs.

Supported Export Formats

Format Target Framework Output Extension Typical Usage
Adafruit GFX Arduino / PlatformIO (<Adafruit_GFX.h>) .h display.setFont(&myFont);
u8g2 Arduino / PlatformIO (<U8g2lib.h>) .bdf (bdfconv) u8g2.setFont(u8g2_font_myFont);
LVGL v8 / v9 Embedded GUI ("lvgl.h") .h lv_obj_set_style_text_font(label, &myFont, 0);
Raw C Array RP2040 Pico SDK, STM32 HAL, ESP-IDF .h Direct framebuffer bit-blitting
// Example: Using an exported Hexprite font with Adafruit GFX
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include "myFont.h" // Exported from Hexprite

display.setFont(&myFont);
display.setCursor(0, 14); // Custom GFX fonts position cursor at baseline
display.print("Hello 123!");

📖 Comprehensive Guide: For complete setup instructions, bdfconv CLI commands, and copy-paste sketches for Arduino, u8g2, and LVGL, see the Embedded Fonts Guide (docs/EMBEDDED_FONTS.md).

🐬 Native Flipper Zero Integration

  • Built with the Flipper Zero community in mind.
  • Natively reads and writes .bm and .xbm formats specific to the Flipper Zero OS—completely eliminating the need for python conversion scripts.

🎬 Animation, GIFs & Image Dithering

  • Import and Export animated GIFs.
  • Import standard image files (PNG/JPG) and use the smart Bitmap-to-Monochrome Converter to cleanly dither them into 1-bit constraints using Checkerboard, Bayer matrices, or custom dithering algorithms.
  • Full animation timeline support with frame-by-frame editing.

🛠️ Pro-Level Pixel Tools

  • Pixel-Perfect Stroke Engine: Automatically prunes redundant corner pixels ("L-shapes") during freehand drawing for ultra-clean pixel art lines.
  • Dual-Paste Engine: Paste floating selections in Transparent mode (skips "off" pixels) or Opaque mode (stamps the whole bounding box).
  • Procedural Outlines: Generate solid outlines (Inside or Outside) around your sprites automatically.
  • Dither Brushes: Paint custom dither patterns directly onto the canvas.

FAQ

## 🚀 Why I build Hexprite

Stop copying and pasting C-arrays from web converters. Stop dealing with accidental grayscale artifacts breaking your microcontroller memory bounds.

Hexprite is designed to natively understand the displays you are coding for. It writes the code for you, syncs with your source files, and even lets you preview your art directly on your hardware in real-time.

🏗️ Technical Architecture

Hexprite is built in C# using WPF on .NET 10, following a highly decoupled MVVM architecture.

Roadmap Note (RGB Pro Tier): Hexprite currently operates in strict Monochrome mode. A future RGB tier is planned to support full-color TFT displays (ST7789, ILI9341, GC9A01) with RGB565 array exports and LVGL True Color support.

📥 Installation & Build Instructions

Hexprite is currently distributed as a source repository. To build it locally:

Prerequisites

  • Windows 10/11
  • .NET 10.0 SDK
  • Visual Studio 2022 (v17.12+) or JetBrains Rider

Build Steps

  1. Clone the repository:
    git clone https://github.com/showmik/Hexel.git
    cd Hexel
  2. Build the solution:
    dotnet build Hexprite.slnx -c Release
  3. Run the application:
    dotnet run --project Hexprite/Hexprite.csproj -c Release

📚 Getting Started

  1. Launch Hexprite: Create a new canvas (e.g., 128x64 for a standard SSD1306).
  2. Draw: Use the pencil, shapes, and dither brushes to create your artwork.
  3. Export to Code: Click File -> Export -> Source Code.... Choose your target framework (e.g., Adafruit GFX), and Hexprite will generate the exact C++ block you need.
  4. Link Source: Want to edit later? Click File -> Link Source File, point it to your .h file, and Hexprite will automatically update the array inside your file every time you save.

📄 License

Hexprite is licensed under the Freeware End-User License Agreement (EULA).

See the LICENSE file for full details. In short, the software is free to use for personal, educational, and internal commercial purposes (such as creating assets for your hardware or software projects).

🔗 Links

  • Website: hexprite.com
  • Documentation: Access the Help menu (F1) within the app.
  • Issues & Bugs: Please use the built-in Bug Report dialog or open an issue on GitHub.