Skip to content

QuantumPixelator/ANSICreator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ANSI Creator

[ Import image (File menu) is currently not working ]

A simple ANSI art editor for making 80x25 terminal/DOS-style ANSI art files. Built with Free Pascal and Lazarus.

I mostly made this for personal use — I wanted a way to create .ans files that would display correctly in Python terminal apps, and couldn't find anything lightweight that didn't require a ton of setup. So I built my own.

There are some excellent ANSI creator apps available (Moebius!) but I wanted something easier to learn and use. So, here's my take on it.

ANSI Creator Screenshot

ANSI Creator Screenshot


What it does

  • Draw on a configurable canvas (default 80x25) using the full CP437 character set (all 256 characters)
  • 16-color VGA palette or 256-color xterm palette
  • Tools: brush, flood fill, eyedropper, line, rectangle, ellipse, selection, and typing mode
  • Selection workflow: copy (Ctrl+C), cut (Ctrl+X), paste (Ctrl+V) with interactive placement
  • Interactive paste placement: move with mouse or arrow keys, commit with Enter or click, cancel with Esc
  • Image import (PNG/JPG/BMP/GIF) with ANSI conversion
  • Live preview window that renders color output from the current grid
  • Row and column rulers, optional grid overlay, and recent chars/colors swatches
  • Saves and loads .ans files as clean UTF-8 with ANSI escape sequences
  • Undo/redo (100 action history)

Keyboard Shortcuts

Shortcut Action
Alt+B Brush tool
Alt+F Flood fill
Alt+E Eyedropper
Alt+L Line tool
Alt+R Rectangle tool
Alt+O Ellipse tool
Alt+S Selection tool
Alt+T Toggle typing mode
Ctrl+Z Undo
Ctrl+Y Redo
Ctrl+C Copy selection
Ctrl+X Cut selection
Ctrl+V Paste (interactive placement mode)
Ctrl+P Toggle live preview
Ctrl+N New canvas
Ctrl+O Open file
Ctrl+S Save
Ctrl+Shift+S Save As
Ctrl+G Toggle grid
Alt+F4 Exit

In typing mode: arrow keys move the cursor, Backspace erases, Enter goes to next row, Escape exits typing mode.

Right-click on the canvas acts as the eyedropper (picks char + fg + bg).

In paste placement mode: arrow keys move the ghost paste, Enter commits, Esc cancels.


Building from Source

You need Free Pascal 3.2+ and Lazarus installed. The build script assumes Lazarus is at C:\lazarus — adjust the paths in build_full_clean.ps1 if yours is somewhere else.

.\build_full_clean.ps1

That compiles everything and puts the exe in the project folder. It also cleans up all the .o, .ppu, and other build artifacts FPC leaves around.

The output is a single standalone .exe, no installer, no dependencies.

Size-optimized build

build_full_clean.ps1 now compiles with size-focused flags (-O3 -XX -CX -Xs) and embeds the app icon resource. This is the recommended script when you want the smallest standalone executable.

Release package build

.\build_release.ps1

This creates dist/release-win64/ with:

  • ANSICreator.exe
  • README.md
  • samples/

ANSI Creator is built with Lazarus/FPC and can be compiled on multiple platforms.


Sample Files

There's a samples/ folder with a few .ans files to open and poke around:

  • welcome.ans — info/welcome screen showing keyboard shortcuts
  • rainbow.ans — full-color gradient showcase
  • blockart.ans — retro block-character landscape scene
  • boxdemo.ans — box-drawing and block/shade character reference
  • logo.ans — pixel-art style ANSI Creator logo

File Format

Saved files are plain UTF-8 text with ANSI escape sequences — the same thing you'd get from a Python colorama output or a classic BBS ANSI file. No proprietary format, no SAUCE record appended. You can read them directly in Python:

import sys
with open('myart.ans', encoding='utf-8') as f:
    sys.stdout.write(f.read())

Or on Windows with the right terminal (Windows Terminal works fine):

type myart.ans

License

MIT License

Copyright (c) 2026 Quantum Pixelator

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.