Use ANSI to print an image
php ansize.php <filename> <width> <height>
One day, I wandered around GitHub, and I found an interesting project named ansize, but it was written in go language, so I want to use PHP to archive it.
-
How to print colorful text in ANSI?
https://stackoverflow.com/questions/4842424/list-sof-ansi-color-escape-sequences
-
How to convert RGB value to an available for ansi?
https://stackoverflow.com/questions/15682537/ansi-color-specific-rgb-sequence-bash
php ansize.php ./example/wechat_avatar.jpeg 100 50
DONE, I'M HUNGRY.