Skip to main content

Ascii-Image-Art Documentation with AI & ML

🌱 ASCII-IMAGE-ART is very simple to use package for converting images into ASCII character strings and ASCII character colored images. Integrated with AI and Machine Learning modules as well to provide better and smoother results. Can achieve better compression and smoother edges as well with AI module.

Elephant ASCII Conversion Human ASCII Conversion Female ASCII Conversion Female ASCII Conversion

Import

  • 🔗 from ascii_image_art import ASCIIArt

Parameters

obj = ASCIIArt( path = 'path to file without dots'[mandatory], scale = 0.1 [optional], chars = 'string of characters'[optional], filename = 'name of file you want to save with without extension'[optional] )

  • 🔗 path = absolute path to image file available locally. Don't use dots in the file name or file path.
  • 🔗 filename = name of file you would be saving the final processed results with. Don't provide any extension like '.txt' or '.png' just the name.
  • 🔗 scale = from 0.01 to 1. The scaled percentage of image of you want your end text and image with. By default = 0.1 or 10%.
  • 🔗 chars = character 'string' you want to recreate the image with.

Methods

a.getPath() a.convert() a.convertWithAI(depth) a.printASCII()

  • 🔗 getPath() : incase you don't want to pass the mandatory path to image and want to ask for image path at runtime from user.

  • 🔗 convert() : to convert image to ascii. Use - obj.convert()

  • 🔗 convertWithAI() : Uses AI for smoother and more compressed results. Convert image to ascii text and ascii text colored image. Use - obj.convertWithAI(depth=4). depth takes values from 2 to 50. More depth more, color and more time it will take. Less depth will compute the results quicker! This method with create 4 files. One ASCII text file. 3 images -> one compressed.png, output_filename.png and output_inverted_filename.png

  • 🔗 getASCII() : returns an ascii image in string format.

  • 🔗 printASCII() : prints the ascii string like below.

                            D..AA.AD                                   
                           A   . S..                                   
                                    S                                  
                          D AAASSAA                                    
                            S..AA A..                                  
                           SSAASAAAAA                                  
                            AAA..A..A                                  
                           A ..AA.  AD                                 
                          SDA       AS                                 
                     DDDDDDDA      .SDDS                               
                    DDDDDDDDS.    SASSDDDDD                            
                    DDDDDDDDDSSA   SDDDDDDD                            
                   DDDDDDDDDDDDS  DDDDDDDDD                            
                  DDDDDSDDDDDDDD. DDDDDDDDD                            
                 DDDDDDDDDDDDDD. SDDDDDDDDD                            
                 DDDDDDSDDDDDDD .DDDDDDSDDD                            
                DDDDDDDDDDDDDDDS.DDSDDDDDDD                            
                DDDDDDDDDDDDDDDDDDDDDDDDDDD                            
                DDDDDDDDDDDDDDDDDDDDDDDDDDD                            
                DDDDDDDDDDDDDDD DSDDDSDDDD                             
                DDDDDDDDDDDDDDDDSDDDSDDDDD                             
                 DSDDDDDDDDDDDDSDDDDDDDDS                              
                  DDDDDDDDDDDDSDDDDDDDDD                               
                  DDDDDDDDDDDD DDDDDDDD                                
                  DSDDDSDSDDDD.DDDDDDD                                 
                 DDDDDDDDDDDA.AAADDDSS                                 
                SDDDDDDDDDAAA .AAADSSS                                 
                DDDDDDDDSA.AAAA..SSSSS                                 
                DDDDDDDDDS.AA...SSSDDD                                 
                 SDDDDDDSDDSDDSSDDDD.                                  
                 DDDSDSDDDDDDDDDDDD                                    
                 DDDDDDDSDDSDDDDDDDD                                   
                 DDDDDDDSD DDDDDDDDD                                   
                 DDDDDDSS  DDDDDDDD                                    
                 DDDDDDDS  SDDDDDDD                                    
                 DDDDDDS   DDDDDDDD                                    
                 DDDDDDS   DDDDDDDD                                    
                 DDDDDDS   DDDDDDDD                                    
                 SDDDSS   DDDDDDDDA                                    
                 DDDDSS DDDDDDDDDD                                     
                 DDDSSSDDDDDDDDDD                                      
                 DDDSDDDDDDDDDDS                                       
                 DSDDDDDDDDDDS                                         
                 DDDDDDDDDDDD                                          
                DDDDDDDDDDD                                            
    
  • 💞️ Thank You. Mohammad ASAD

Release files for ascii-image-art 0.0.5.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ascii-image-art 0.0.5.4
File Size Uploaded
ascii_image_art-0.0.5.4.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ascii-image-art 0.0.5.4
File Interpreter ABI Platform
ascii_image_art-0.0.5.4-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / ascii_image_art-0.0.5.4.tar.gz

Download URL ascii_image_art-0.0.5.4.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0d649d60e71160c3e913bd6e4b2046c6fe43184498a8da665b3ea0f52e7119a2
BLAKE2b-256 checksum
How to use checksums
786f4ee6da1030f226273ad86b46be0182e3565905637693e56cfcdb7ea1eb57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7

Release files / ascii_image_art-0.0.5.4-py3-none-any.whl

Download URL ascii_image_art-0.0.5.4-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f4d63b4f3ae20ea0ec2d3b73607611c6a5cf46bb031a47a9e871786d65f4300
BLAKE2b-256 checksum
How to use checksums
66a46d5bb57be4f6c7ea9f8f7dc8b509f00974a805c1deab3e2ead4aee68d418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.7
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page