Skip to content

Frezzle/image2ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

image2ascii

Installing

git clone https://github.com/Frezzle/image2ascii
cd image2ascii
pip install .

Usage

In Python 3.x or 2.7.x:

import image2ascii
image2ascii.convert('/path/to/image')

Customize output

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)

Attribution

Default penguin image

ASCII character set inspiration

Example

                                                              .,,.                                                                
                                                      *((#%&(.      //                                                            
                                                   **   **    **      **                                                          
                                                 .*.   /##%%%#(((((#%#//*                                                         
                                                 ,*/%#((/************,,.*#/                                                       
                                                *#(/***/*****************,./(.                                                    
                                              .((//************************,,/*                                                   
                                             *(///**************************,.//                                                  
                                            ,((///***************************,.//                                                 
                                            /#////****************************,./*                                                
                                           ,((////*****************************,*/.                                               
                                           ,(/////*****************************,,/*                                               
                                           ./(////******************************,/*                                               
                                            *#////************/*****************,.,(*                                             
                                            .((///*******(/.      .((***((.      ///*.                                            
                                             /#////****(*            /%*           **                                             
                                             ,(///(/**/*              **            ,,                                            
                                            ,*/#/(#(/*/.              ,*            **                                            
                                            ,(##/((((//,            .#@#           (@/                                            
                                            ,,.(#((/((/*              /%######*     *,                                            
                                            ,, ,%&(/((///.          .//********/, ,/.                                             
                                             .  /#///****/(#/,.,*(#(***********/#(/.                                              
                                              *(/**/(/*************************(/(/                                               
                                              /##%&(*/********(###//*/(##%%##(/((#*                                               
                                              /(/((////***(#(*******************,**                                               
                                               /#((#%(//(#/**********************,,**                                             
                                                 ./////((**************************,*,                                            
                                                 .////((***************************,/*                                            
                                                 .////(/***************************,*(,                                           
                                                 ,////(/*****************************,*.                                          
                                                 *(*//((*****************************/*                                           
                                                 *(*//((****************/(////(##/*.                                              
                                               *##(////((*********************//,                                                 
                                             ./*/(/////*/#(****************/#/                                                    
                                            ,/*,,,(%(/*****(#/************(#, ,*                                                  
                                           ./*,,,,,,,/#(*******(#%%%%%%#(**(#* *,                                                 
                                           *(,,,,,,,.   .(#/**************(/   .*.                                                
                                          ,(#(,,,,,,       .*(/*********/%%*    ,,                                                
                                *#(*,,,,,*((*/(*,,,.     .*.  *(*******//../*   .,.                                               
                            .(/,,,,,,,,,,,,,((,((,.      *,    .((****//.  **.  *#/((*                                            
                          *(*,,,,,,,,,.      */,,(*     **       /(**//,   ./* ***,    */,                                        
                        ,/*,,,,,,,,,.        ,,..,,(*  ,*         ,(((,     *#(. .,.      */.                                     
                      .//,,,,,,,,,,           ,.    ./#*            .             ,,        .*,                                   
                     */,,,,,,,,,,.            ,,                                  .,.         ,*.                                 
                   ./*,,,,,,,,,,.             ,.                                  ,(%####(*.    **                                
                  */,,,,,,,,,,,.             .,.                              ,((***********/#/   *,                              
                 ,/*(%%%%%#(/,,.             ,,                             *(*****************/(*,/*                             
                  .(%(/////////(#(,          ,,                            /(*********************(#/.                            
                   /(//////******///#(,      ,,                          .//************************/(*                           
                  /(//////***********//#(.  ,,                          .//**/(/***((*****/((**********(/                         
                 *(//////****************#/.*.                         *(****/(/***((****(%%(***********//,                       
                *(//////***********(##/*(/                           .//****/(#(/**/((***//##/************/,                      
               ,///////*****************(#*                          ./(///#%#(##%%%((#(/(%#///************/,                     
               *(//////********************/((.                        *#(##(////**////(((##//(//**********/*                     
               /(/////*************************/##(((########/.        ,*                    /(//***********/,                    
              ./(//////****************************************/(*     *//(*.             .,*/(#(/**********/,                    
               /(///////******************************************(*   ,, .,**,.             ** *(/*********/.                    
               *(/////////*************************************(#(**(* ,, ..   *,   .*,   ** **  *(//*****/(*                     
                *(////////////************************************((*(**, *,   *,   .*,   .. **  *(///////(*                      
                 ,((//////////////////////*******************(#(****((((* *,   *,   .*,   ** **  *(/////#/                        
                    *##////////////////////////////////////*****((***#/** **   *,   .*,   ** **  *((##*                           
                         ,(#%%###((((###%%%#((##///////(#(//*****((*//.** **   **   .*,   ** **  *,                               
                                                           *#(///(*    ** **   **.. .*,   ** **.*,                                
                                                               ..      ,*,*****((****//****, *(.                                  
                                                                       ,(#(///////////////(##*                                    
                                                                         */**////////////*,*,                                     
                                                                             ,*/(((((((/,                                         

About

Converts images to ASCII art.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages