Skip to content

Repository files navigation

pixels2text

Takes images and outputs ASCII shaded strings for each line.

Github Pages hosted demo

Here: https://superpencil.github.io/pixels2text/

Usage

  • npm install
  • npm start
  • Go to localhost:8080
  • In pixels2text.js change the source on line 60 and manually put the width and height you want on line 62 and 63

Example output

letoutput=[' ▓▓▓▓▓ ▓▓▓▓▓ ',' ▓▓▓▓▓▓███▓▓▓▓█▓▓█▓▓ ',' ▓███▓▓▓▓▓▓████████▓ ',' ▓▓██▓▓▓██▓▓▓▓▓▓▓▓▓▓▓█▓ ',' ▓▓██▓▓██▓▓▓███████████▓ ',' ▓▓█████▓▓███████▓▓▓▓▓██▓ ',' ▓▓█████▓███████▓▓█████▓██▓▓ ',' ▓▓▓▓▓███████████████████████▓ ',' ▓▓▓▓███████████████████████▓█▓ ',' ▓█████████████████████░░█████▓ ',' ▓████░░░░░█████████░░░░░░████▓ ',' ▓████░░░░░░░░░░░░░░░░░░░░░░▒▓█▓ ',' ▓███▓░░░░░░░░░░░░░░░░░░░░░░░▓▓▓ ',' ▓█▓▓░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓ ',' ▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓ ',' ▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓ ',' ▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓ ',' ▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓ ',' ▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒ ',' ▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ',' ▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒ ',' ▒▒░░░░░██████░█░░░░░█░█████░░░▒ ',' ▒▒░░░░█████████░░░░░████████░░▒ ',' ▒▒░░░█░░░░░░███░░░░░███░░░░░█░▒ ',' ░░▒░░█░░░░░░░░░░░░░░░░░░░░░░░░░▒ ',' ░░░▒░░░░░░░░▓▒░░░░░░░░░░░▓▒░░░░░▒░ ',' ░░░░░░░░░░░░▓▓░░░░░░░░░░░▓▓░░░░░░░ ',' ░░░▒░░░░░░░ ▒▒ ░░░░░░░░░ ▒▒ ░░░░▒░ ',' ░░░▒░░░░░░ ▒▒ ░░░░░░░ ▒▒ ░░░▒░ ',' ░░░▒░░░░ ░ ░ ░░▒░ ',' ░░░▒░░░░░ ░ ░░░ ░ ░░▒░ ',' ░░░▒░░░░░ ░░░░░ ░░▒░ ',' ░░▓▒░░░░ ░░░░░ ░░▒░ ',' ░▓▓░░░░░ ░░░░░░░ ░░░▓░ ',' ▓▓░░░░░░ ░░░░░░░▒░ ░░░░▓ ',' ▓▓▓░░░░░░░░░░░░░░░▒▒░░░░░░░░▓▓ ',' ▓▓▓░░░░░░░░▓▓▓▒▒▒▒▒▓▓▓░░░░░▓▓▓ ',' ▓▓▓▓░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓ ',' ▓▓▓▓▓▓░░░▓▓▓░▓▓▓▓▓▓▓░▓▓▓░▓▓▓▓▓ ',' █▓▓▓▓▓▓░░▓▓▓▒░░░░░░░▒░▓▓▓▓▓▓▓▓ ',' ▓▓▓▓▓▓▓▓▓▓░░▒▒▒▒▒▒▒░░▓▓▓▓▓▓▓ ',' █▓▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓█ ',' ██▓▓▓▓▓▓▓▓░░░░░░░░░░░▓▓▓▓▓▓█ ',' ██▓▓▓▓▓▓▓░░░▓▓▓▓▓░░░▓▓▓▓▓█ ',' ██▓▓▓▓▓▓░░░░▓▓▓░░░░▓█▓▓█ ',' ░███▓▓█▓▓░░░▓▓▓░░░▓▓████ ',' ░░█████▓▓▓▓▓▓▓▓▓▓▓▓▓███ ',' ░░░█████▓▓▓▓▓▓▓▓▓▓▓███░ ',' ░░░░█████▓▓▓▓▓▓▓▓▓███░░ ',' ░░░░░░░████▓▓█▓▓█▓███░░░ ',' ░░░░░░░░░██████████░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░░░░░░ ',' ░░░░░░░░░░░░░░░░░ ']

About

Convert images to ascii shade blocks ░▒▓█

Resources

Stars

10 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages