Skip to content

ElvisWong213/image-to-ascii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image To ASCII

About This Project

Convert Image to ASCII character

Build And Install

Clone this prject and run the command

cargo install --path .

Usage

Usage: image-to-ascii [OPTIONS] -i <INPUT_PATH>

Options:
  -i <INPUT_PATH>       Input image path
  -o <OUTPUT_NAME>      Output file name (Optional)
  -w <WIDTH>            Output width (Optional)
  -s                    Save file (Optional)
      --stop-print      Stop print out result to terminal (Optional)
  -h, --help            Print help

Convert image and save to txt file

image-to-ascii -i image.jpg -s

Define output file name

image-to-ascii -i image.jpg -o new_file_name -s

Define output width

image-to-ascii -i image.jpg -s -w 100

Development

cargo run -- -i image.jpg

Preview

.............,,:+**********????????????????%%%????,
,,,,........,,,;**********???????????????%%%%%%%?,
,,,,,........,,:+******?**??????????????%%%%%%%%?,
,,,,,.........,,+**********?????????????%??%%%%%?,
,:::,,.........,;*********?????????**????%?%%%%%?,
::::::,........,:+*********???*??*+::*???%%%%%%%?,
:;;;;::,.......,:+*********?****+:,,:+??%%%%%%%%?,
:;;;;;:,.......,,;************+;:,,,;*?%%%%%%%%%?,
:;+;;;::,.....,,,:;;;++*****+;:,,,,:+??????%%%%%?,
:+++;;:,,....,,,,:,,,,::;+++:,,,,,,:*??????%%?%%?,
:;++;::,.....,,,,,,,,,,,,:::,,,,,,,;*???????%?%??,
:;;;;:,,..,,,,,,,,,,,,,,,,,,,,,::::+?????????????,
::;+;;,,,.....,,,,,:::::;::,,:,:::;*?????????????,
,,;;;:,,,....,,:::::;;;;++;:::::::+*?????????????,
,,:::,,,...,,,:::;;;++++??+;::,,::+??????????????,
,,,,,,,....,,:::::::++++??*;:,..,:+***???????????.
.,,,,,,...,,:::,,,,,;+++??*+:,,.,:;***???????????.
..,,,,,,,,,:::,,,:,,;++*???+::,.,;:+****?????????.
..,,,,,,,,,,::,,,,,:;+*?%??+::,.,;:;****?????????.
....,,,,,,,,:::,,,::+?%%??**;:,,;;:+***??????????,
.....,,,,::,:::,:::+?%%%?***++++;:;+***??????????,
...,,,,,,,,::::::;*%$$$%*******;:,;*****?????????.
.....,,,,,,::::;;*%%$$$%?+*****:,,;******????????,
,......,,,,,,::;+?%%$$$%%****??+,,;*******???????,
,,,,,,,,,,,,::;;*?%%%$$%%*++*?%?;:+*******??????*.
,,,,,,::::;;;;;+*?%%%%%??*+*????+:+********?????*,
,,,,,,:::::::;;+**???%?**++*????;:+***********??*,
,,,,,,,,,,:::;;++**?***;::;+*??*;;+********???*?*.
..,,,,,,,:::::;++++;;;;,,::;+***;;**********????*.
...,,,,::::::;+++:,,,,:,,,,:+**+:;**********????*.
..,,::::::::;++;:,,,,,,,,,,:;;::;+***********???*,
,,,,,,::;++***+:,::,,,,,,,,:::,,;************???*,
,,,,,:;+***??*+::;;;;:,,,.,,,,,:++***********???*:
,,,,:;+*??????*;:;++;;;:,::,,::;+++*********????*;
::;;;+**???????*;;+++++;:++;::;+++**********????*+
+++****?????????*++++++;+*++;;+++***********????*+
++***??????**????*++++++**+++++++*************??*+
+++**???*****?????*+++++***+++++++**********????*;
++++**********??*****+++**+++++++++*********????*+
+++++*****+++*??*;;+*+;+**++++++++++*********??**;
+++++++++++++*??*::;+++++++++++++++**+******???**;
;+++++++++++++*?*;:::::;++++++++++***********??**:
;;++++++++++;++***+;,,,:;++++++++++**************,
:;+++++++++++;++++;,,,,:;++++++++*+**************,
:;++++++++++++++;:,,,,,:;++++++++++**************,
:;++***++++++;;;;:,,,,:;++++++++++++**********??*,
:;+*****++++;;;;:,,,,,:;+++++++++++++**********?*,
::;+****++++;;;:,,.,,,:;;++++++++++++**********?*,
,::+****++++;;;,,....,:;;++++++++++**************,
,,,;****++++;;:,.....,:;+++++++++++**************%

Releases

No releases published

Packages

No packages published

Languages