git clone https://github.com/Frezzle/image2ascii
cd image2ascii
pip install .
In Python 3.x or 2.7.x:
import image2ascii
image2ascii.convert('/path/to/image')
Reduce/increase x_step
and y_step
for more/less detail in the ASCII output:
image2ascii.convert('/path/to/image', x_step=5, y_step=10)
Colours can be inverted:
image2ascii.convert('/path/to/image', invert_colours=True)
ASCII character set inspiration
.,,.
*((#%&(. //
** ** ** **
.*. /##%%%#(((((#%#//*
,*/%#((/************,,.*#/
*#(/***/*****************,./(.
.((//************************,,/*
*(///**************************,.//
,((///***************************,.//
/#////****************************,./*
,((////*****************************,*/.
,(/////*****************************,,/*
./(////******************************,/*
*#////************/*****************,.,(*
.((///*******(/. .((***((. ///*.
/#////****(* /%* **
,(///(/**/* ** ,,
,*/#/(#(/*/. ,* **
,(##/((((//, .#@# (@/
,,.(#((/((/* /%######* *,
,, ,%&(/((///. .//********/, ,/.
. /#///****/(#/,.,*(#(***********/#(/.
*(/**/(/*************************(/(/
/##%&(*/********(###//*/(##%%##(/((#*
/(/((////***(#(*******************,**
/#((#%(//(#/**********************,,**
./////((**************************,*,
.////((***************************,/*
.////(/***************************,*(,
,////(/*****************************,*.
*(*//((*****************************/*
*(*//((****************/(////(##/*.
*##(////((*********************//,
./*/(/////*/#(****************/#/
,/*,,,(%(/*****(#/************(#, ,*
./*,,,,,,,/#(*******(#%%%%%%#(**(#* *,
*(,,,,,,,. .(#/**************(/ .*.
,(#(,,,,,, .*(/*********/%%* ,,
*#(*,,,,,*((*/(*,,,. .*. *(*******//../* .,.
.(/,,,,,,,,,,,,,((,((,. *, .((****//. **. *#/((*
*(*,,,,,,,,,. */,,(* ** /(**//, ./* ***, */,
,/*,,,,,,,,,. ,,..,,(* ,* ,(((, *#(. .,. */.
.//,,,,,,,,,, ,. ./#* . ,, .*,
*/,,,,,,,,,,. ,, .,. ,*.
./*,,,,,,,,,,. ,. ,(%####(*. **
*/,,,,,,,,,,,. .,. ,((***********/#/ *,
,/*(%%%%%#(/,,. ,, *(*****************/(*,/*
.(%(/////////(#(, ,, /(*********************(#/.
/(//////******///#(, ,, .//************************/(*
/(//////***********//#(. ,, .//**/(/***((*****/((**********(/
*(//////****************#/.*. *(****/(/***((****(%%(***********//,
*(//////***********(##/*(/ .//****/(#(/**/((***//##/************/,
,///////*****************(#* ./(///#%#(##%%%((#(/(%#///************/,
*(//////********************/((. *#(##(////**////(((##//(//**********/*
/(/////*************************/##(((########/. ,* /(//***********/,
./(//////****************************************/(* *//(*. .,*/(#(/**********/,
/(///////******************************************(* ,, .,**,. ** *(/*********/.
*(/////////*************************************(#(**(* ,, .. *, .*, ** ** *(//*****/(*
*(////////////************************************((*(**, *, *, .*, .. ** *(///////(*
,((//////////////////////*******************(#(****((((* *, *, .*, ** ** *(/////#/
*##////////////////////////////////////*****((***#/** ** *, .*, ** ** *((##*
,(#%%###((((###%%%#((##///////(#(//*****((*//.** ** ** .*, ** ** *,
*#(///(* ** ** **.. .*, ** **.*,
.. ,*,*****((****//****, *(.
,(#(///////////////(##*
*/**////////////*,*,
,*/(((((((/,