Now, gif-for-cli still uses a predefined constant . ,\'-:;!" ^/+? *&8#$@% to match the brightness and generate the image, like all similar tools do. This approach does not make effective use of all the visible characters in the ASCII character set, and some uneven symbols like ^ and , would give the output image a "broken" feel.
Perhaps we can introduce a kind of "oversampling" method: since the input is a bitmap, we could also divide the glyph of each character into πΒ² pieces (say 4 or 9 pieces), and compare in the scaled original image for an equally sized area. By using an optimized π-d tree (π = πΒ²), the single most accurate character can be found instantly for each πΒ² pixels. This would be a major improvement for gif-for-cli.
I have written an example implementing this idea for reference (strear/saam), but its code is in C++. Do the maintainers and the pull request people have any good ideas on how to merge this implementation in?
Now, gif-for-cli still uses a predefined constant
. ,\'-:;!" ^/+? *&8#$@%
to match the brightness and generate the image, like all similar tools do. This approach does not make effective use of all the visible characters in the ASCII character set, and some uneven symbols like^
and,
would give the output image a "broken" feel.Perhaps we can introduce a kind of "oversampling" method: since the input is a bitmap, we could also divide the glyph of each character into πΒ² pieces (say 4 or 9 pieces), and compare in the scaled original image for an equally sized area. By using an optimized π-d tree (π = πΒ²), the single most accurate character can be found instantly for each πΒ² pixels. This would be a major improvement for gif-for-cli.
Original: http://9front.org/img/9iknowthis01.png
I have written an example implementing this idea for reference (strear/saam), but its code is in C++. Do the maintainers and the pull request people have any good ideas on how to merge this implementation in?