Skip to content

Hexworks/beryl

Repository files navigation

beryl

Beryl is a pixel image to ASCII art converter.

Usage

val converter = Converter(
        File("path/to/your/image.jpg").inputStream(),
        LightnessApproximator(CharScale.BASE9),
        FontSize(8, 14))

print(converter.toAscii())

The code above can convert this image

To this ASCII art:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+,.....,;;;;;+%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,.....................,;+*#@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@#...........................;#@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@%.,...........................+#@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@*,,.............................*@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@#;,,...... .. ......   ...........;@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@#,,,.... .  ..    ...      .........#@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@;.,......   .    ...     ...........#@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@+,+;;,,..... .     ..   ...... .. ....%@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@#,+*+;,,,,,....     ...........    ....;@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@%+%%*+;,,,,,,............         .....;@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@*##%++,,,,,,,................. .......;#@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@#@@@@@@@%@#*+,,,,,,,.............,,,,,,,##*+*#@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@##@@@@@#@%+;,,,,,,....................%@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@%%#@@@##*;,,,,......................,@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@%*%%#@%*;,,,,,.....................+@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@%*%%%+*;,,,.......................%@@@@###@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@#%*%%%;,,.......................,#%%%%@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%###%;,......................,+**#@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@##@@@+.....................,+**%@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@#**@@@*;....,............,,+%#@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@#**%**%*+;,,,,.....,;*%#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@%*********;++;+++++#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##%#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