Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

ascii_art

> DevOps
Open source

Real-Time ASCII Art Rendering Library

737 stars0 likes0 views
WebsiteGitHub

About

Real-Time ASCII Art Rendering Library

ASCII Art

Real-Time ASCII Art Rendering Library - Live demo: https://art.pixlab.io

Integration Reference Guide: https://pixlab.io/art

ASCII Art is a single file C/C++ library that let you transform an input image or video frame into printable ASCII characters at real-time using a single decision tree. Real-time performance is achieved by using pixel intensity comparison inside internal nodes of the tree.

ASCII Camera Now Availabe On Unity Asset Store: https://assetstore.unity.com/packages/slug/165558

For a general overview on how the algorithm works, check the bottom of the demo page.

ASCII art is a related (and older) graphic design technique for producing images from printable characters. This implementation is based on the paper:

N. Markus, M. Fratarcangeli, I. S. Pandzic and J. Ahlberg, "Fast Rendering of Image Mosaics and ASCII Art", Computer Graphics Forum, 2015,

Getting started

Embedding the library in your application is straightforward. All you have to do is drop the ascii_art.c and its header file in your source tree plus the hex model that can be downloaded here and perform the following API calls successively:

  1. Call AsciiArtInit first to initialize the ascii_render structure defined in the ascii_art.h header file.
  2. Prepare the image to be processed by converting it to the grayscale colorspace. You can rely on some external library like OpenCV cvtColor or the built-in AsciiArtLoadImage interface.
  3. Allocate a buffer big enough to hold the entire ASCII text output. The amount of bytes needed is returned via the AsciiArtTextBufSize interface. This step is optional if you do not want a text output but instead a binary ASCII glyphs image.
  4. Finally, transform the input image into ASCII glyphs/text via AsciiArtRender.

Below is a simple C program that demonstrates a typical usage of the ASCII Art C/C++ interfaces.

…

sample.c source code

Resources

  • The C/C++ API reference (Only three interfaces are exported plus another optional), the hex model are all available on the official PixLab page at: https://pixlab.io/art
  • The live demo: https://art.pixlab.io
  • Please report any issue or feature request here on Github.
  • Unity Asset Store Package: https://assetstore.unity.com/packages/slug/165558

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Calgorithmsascii-artascii-glyphsembedded

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理