Skip to main content

img2pixel

Convert any image to pixel art for your terminal — perfect for neofetch, fastfetch, or just for fun.

Uses Unicode half-block characters () with true-color ANSI codes to render 2× vertical resolution per character row.


Installation

From PyPI:

pip install img2pixel

From source:

git clone https://github.com/RooWiki/img2pixel
cd img2pixel
pip install .

Usage

img2pixel <image> [options]
Option Default Description
-w, --width N 40 Output width in terminal characters
-b, --block N 4 Pixel-art block size — higher = chunkier
-c, --colors N unlimited Limit color palette (e.g. 8, 16, 32)
-o, --output FILE stdout Write result to file instead of printing
-v, --version Show version and exit

Examples

# Preview in terminal
img2pixel avatar.png

# Save for neofetch
img2pixel avatar.png -o ~/.config/art.txt
neofetch --ascii ~/.config/art.txt

# Retro look — chunky blocks, limited palette
img2pixel avatar.png -w 35 -b 6 -c 16

# Fine detail, no palette limit
img2pixel avatar.png -w 60 -b 2

# 8-bit style
img2pixel avatar.png -b 8 -c 8

Neofetch integration

Generate the art file once and point neofetch to it:

img2pixel ~/Pictures/avatar.png -w 35 -o ~/.config/neofetch/art.txt

In your ~/.config/neofetch/config.conf:

image_backend="ascii"
image_source="$HOME/.config/neofetch/art.txt"

Requirements

  • Python 3.8+
  • Pillow (pip install Pillow)
  • A terminal with true-color support (most modern terminals)

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

img2pixel-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

img2pixel-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file img2pixel-0.1.0.tar.gz.

File metadata

  • Download URL: img2pixel-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for img2pixel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5afa3a469fd520e9bb45feb2a7664e593ee29f8a417cdc11f91f212a7f8fc48
MD5 adcede881a09f20fae8a2b2ffedca457
BLAKE2b-256 565ee92063268f788a85b935c74e0eaf8514ad457e077ffa5d2db232a74a5fed

See more details on using hashes here.

File details

Details for the file img2pixel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: img2pixel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.6

File hashes

Hashes for img2pixel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4384e94cab82ef8b5e4bb69446409d8df11e64ee7bbf83ea7961dd2fa351bc6
MD5 cd2a0482e749e75a7107f9dbf0960854
BLAKE2b-256 1bcb38cd10df9b54c190935410c45ab576219096e3c7f6e12ee5c9accd9f86d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page