Convert Image to ASCII character
Clone this prject and run the command
cargo install --path .
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
cargo run -- -i image.jpg
.............,,:+**********????????????????%%%????,
,,,,........,,,;**********???????????????%%%%%%%?,
,,,,,........,,:+******?**??????????????%%%%%%%%?,
,,,,,.........,,+**********?????????????%??%%%%%?,
,:::,,.........,;*********?????????**????%?%%%%%?,
::::::,........,:+*********???*??*+::*???%%%%%%%?,
:;;;;::,.......,:+*********?****+:,,:+??%%%%%%%%?,
:;;;;;:,.......,,;************+;:,,,;*?%%%%%%%%%?,
:;+;;;::,.....,,,:;;;++*****+;:,,,,:+??????%%%%%?,
:+++;;:,,....,,,,:,,,,::;+++:,,,,,,:*??????%%?%%?,
:;++;::,.....,,,,,,,,,,,,:::,,,,,,,;*???????%?%??,
:;;;;:,,..,,,,,,,,,,,,,,,,,,,,,::::+?????????????,
::;+;;,,,.....,,,,,:::::;::,,:,:::;*?????????????,
,,;;;:,,,....,,:::::;;;;++;:::::::+*?????????????,
,,:::,,,...,,,:::;;;++++??+;::,,::+??????????????,
,,,,,,,....,,:::::::++++??*;:,..,:+***???????????.
.,,,,,,...,,:::,,,,,;+++??*+:,,.,:;***???????????.
..,,,,,,,,,:::,,,:,,;++*???+::,.,;:+****?????????.
..,,,,,,,,,,::,,,,,:;+*?%??+::,.,;:;****?????????.
....,,,,,,,,:::,,,::+?%%??**;:,,;;:+***??????????,
.....,,,,::,:::,:::+?%%%?***++++;:;+***??????????,
...,,,,,,,,::::::;*%$$$%*******;:,;*****?????????.
.....,,,,,,::::;;*%%$$$%?+*****:,,;******????????,
,......,,,,,,::;+?%%$$$%%****??+,,;*******???????,
,,,,,,,,,,,,::;;*?%%%$$%%*++*?%?;:+*******??????*.
,,,,,,::::;;;;;+*?%%%%%??*+*????+:+********?????*,
,,,,,,:::::::;;+**???%?**++*????;:+***********??*,
,,,,,,,,,,:::;;++**?***;::;+*??*;;+********???*?*.
..,,,,,,,:::::;++++;;;;,,::;+***;;**********????*.
...,,,,::::::;+++:,,,,:,,,,:+**+:;**********????*.
..,,::::::::;++;:,,,,,,,,,,:;;::;+***********???*,
,,,,,,::;++***+:,::,,,,,,,,:::,,;************???*,
,,,,,:;+***??*+::;;;;:,,,.,,,,,:++***********???*:
,,,,:;+*??????*;:;++;;;:,::,,::;+++*********????*;
::;;;+**???????*;;+++++;:++;::;+++**********????*+
+++****?????????*++++++;+*++;;+++***********????*+
++***??????**????*++++++**+++++++*************??*+
+++**???*****?????*+++++***+++++++**********????*;
++++**********??*****+++**+++++++++*********????*+
+++++*****+++*??*;;+*+;+**++++++++++*********??**;
+++++++++++++*??*::;+++++++++++++++**+******???**;
;+++++++++++++*?*;:::::;++++++++++***********??**:
;;++++++++++;++***+;,,,:;++++++++++**************,
:;+++++++++++;++++;,,,,:;++++++++*+**************,
:;++++++++++++++;:,,,,,:;++++++++++**************,
:;++***++++++;;;;:,,,,:;++++++++++++**********??*,
:;+*****++++;;;;:,,,,,:;+++++++++++++**********?*,
::;+****++++;;;:,,.,,,:;;++++++++++++**********?*,
,::+****++++;;;,,....,:;;++++++++++**************,
,,,;****++++;;:,.....,:;+++++++++++**************%