DPixel — Pixel Art Editor
Retro-inspired pixel art editor for Windows.
Multi-file source, single portable .exe — copy anywhere and run; no installer, no redistributable.
Why no installer is needed
Release uses /MT (static CRT). All other DLLs (d2d1.dll, dwrite.dll, windowscodecs.dll, dwmapi.dll) ship with Windows 10/11.
Editor Mode System
DPixel has multiple editor modes. Each mode can have sub-modes toggled with Spacebar.
| Key | Action |
|---|---|
| Tab | Next editor mode |
| Shift+Tab | Previous editor mode |
| Spacebar | Toggle sub-mode within the current mode |
Modes remember their state when you switch away. For example, if animation is playing in Paint mode and you Tab to Tilemap, then Tab back — playback resumes exactly where it was.
Paint mode
The default drawing mode.
| Spacebar | Play / pause animation |
|---|
Sub-mode label shows Draw or ▶ Playing.
Tilemap mode
Edit tile-based graphics and maps.
| Spacebar | Toggle Block View ↔ Map View |
|---|
| Sub-mode | Description |
|---|---|
| Block View | Edit pixel content of individual tiles. Tile grid is forced on; selected tile is highlighted amber. Arrow keys navigate tiles. All drawing tools work normally. |
| Map View | Assemble a map by painting tiles onto a grid. Right panel shows a tile picker. Left-click canvas paints selected tile. Right-click canvas picks tile at that position. |
Source Layout
DPixel/
├── DPixel.sln
├── DPixel.vcxproj
├── src/
│ ├── main.cpp Entry point (WinMain)
│ ├── resource.h All menu, dialog and mode IDs
│ ├── App.h/.cpp Application — owns modes, routes Tab/Space/input
│ ├── EditorMode.h Abstract base class for all editor modes
│ ├── PaintMode.h/.cpp Drawing + animation mode
│ ├── TilemapMode.h/.cpp Tilemap block/map editor mode
│ ├── Canvas.h/.cpp Indexed pixel buffer, undo stack, drawing primitives
│ ├── Palette.h/.cpp 256-colour table, platform presets, .ACT I/O
│ ├── Animation.h Header-only frame container with playback
│ ├── Tilemap.h Preset definitions (NES, SNES, ZX Spectrum…)
│ ├── Tool.h All tool declarations + factory
│ ├── Tools.cpp All tool implementations
│ ├── Renderer.h/.cpp Direct2D — canvas, mode tab bar, tile picker, panels
│ ├── FileIO.h/.cpp PNG/BMP (WIC), ZX SCR, NES CHR, image import
│ └── Dialogs.h/.cpp In-memory DLGTEMPLATE dialogs (no .rc file)
└── docs/
├── README.md (this file)
├── SHORTCUTS.md Full keyboard reference
├── FILE_FORMAT.md .dpx binary format spec
└── PLATFORMS.md Tilemap presets and platform export notes
Adding a new editor mode
- Create
src/MyMode.h/.cppinheriting fromEditorMode. - Override
Name(),SubModeName(),SpaceBar(),Tick(), and the input callbacks you need. - In
App.h: bumpMODE_COUNT, add aMODE_MYMODEconstant, add am_views[MODE_MYMODE]entry. - In
App::Init():m_modes[MODE_MYMODE] = std::make_unique<MyMode>()with shared state injection. - Add
src\MyMode.cpptoDPixel.vcxproj.
Tab and Shift+Tab cycle automatically over all modes.
Dark mode
Dark title bar via DwmSetWindowAttribute (attribute 20 for Win11 / Win10 20H1+, attribute 19 fallback for older Win10 builds). The Direct2D canvas UI is always dark.