Skip to content

Jclong98/img_to_ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to use img_to_ascii, run

python img_to_ascii.py <filepath or url to the image>
    -w --width <max character width of output>

this will print out the output to the terminal. If you want to save it to a file, use > filename.txt


Sample Usage:

Banana

python image_to_ascii.py ./examples/banana.png -m 40 > ./examples/output.txt:

       -=                             
       -=+=                           
      -:-==-                          
        ---=                     @=++ 
        ---------+==-   ==--=-======  
       ::--:-===+*++-===-:--======    
     -------==+=+***===---======+=-   
     ---:  .--=+++==+++===-==-==      
    --------:==*+-.  .:+=======       
   --==----:--=++++++++***+++*-       
    ===-----::-=+=+++++********       
  -:--==-::.  :::=+=++++*****-        
  ----=====--===+++====++**+-         
:------===============++++==          
-----================++++-            
----=============++++++++:            

python image_to_ascii.py ./examples/banana.png > ./examples/output.txt:

                   :=:.                                                                           
                 @--=+-                                                                           
                  :--+*=*.                                                                        
                 :---=+*-:=                                                                       
                . ---==+**-                                                                       
                   --===++*+  -                                                                   
                - ::---==++==-:-                                                                  
                  :::-----=+:--=                                                                  
                :-::-::--:--=-..                                                        =@   ::   
                  - -:::-::--=-.                                                   ==  ==+===+-.= 
                    :::--:::---:..-::  -                                        - .==+=======-.:  
                    :----=-------=--==-::-=           :*------            -@   -=+==========- -   
                    ::----------===-----===++*+++++===-==-=---::-::...::--=============-==-:      
                  ::::::----:---------=+=++++++++++----=========-------=-============-===-: =     
                 :::::::-----:----====++=++**++++++=---=======---::-----================:         
                :::-------=====-====++++++*****+*++---====-==----------============+++=: :        
               :::-----=--=-=----==++++==+**+*****+===-=======------===============++=+: -        
              -------------------========++++*****++=======-=-=---===========-====++=--- =        
           - -------:   .:::-------======++++++***++++++====---=-==-=====------====  -=           
            ---------:..    ..:-----===++++++===++=+++++++========---=====----==+=                
          @---------------::...------=++++++===---====++++++========--=====--==== =               
          ------------------:::---====+++**+=--::-::-==+++++++============----=== *               
         = ----=--=-------------::=++=++**++-...      .. :=++++===========-====+= @               
           -----===-----------:::-=++=++****======------=+++**++=++++===+===++++ @                
        - -----=====--------::::---====+++***++++++++++++*******++++++=++**++++=                  
          ---=====-==---=---:::-----==-==+++++++++++++++++*********++++++****=-                   
         ---======-----------::---::::==+++=++++++++++++++***********++++****-                    
         -=========-----------:::::---====+==++++*++++++++++***************** *                   
       =:---========-::....-.  .:::---========+++++=++++++++****************+ @                   
        :------=====--:::::.:.       .:--=====++++==+++++++++**************++=                    
      - :------======---:::::::.....:-.-:::--==+=++++++++++++++**********+++                      
     =..-------========-----:::::::::-:::::::::--=++++===+++++++********++ =                      
    =:---------============--------------==================+++++******+++ @                       
=: :-------------=====================++++++++++=======+=++++++++++++++=-                         
:-----------------===================+===++++++==========+++++++++++++  :                         
::---------------=======================================++++++++++++=-=                           
----------------=======================================+++++++++++=- -                            
---------------========================================+++++++++=-::                              
---------------====================================+++++++++++++=-                                
-------------=================================+=++++++++++++++++=-                                
-----------===================================++++++++++++++++++-::=                              
-----------===============================+++++++++++++++++++++=-:..                              

About

A python script to convert an image from the web into ascii blocks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages