Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.27 KB

README.md

File metadata and controls

43 lines (30 loc) · 1.27 KB

img2braille

Convert images to braille ascii-art. Best results are achieved with images that have clear distinct shapes and outlines.

Usage

Usage: img2braille [OPTIONS] IMAGE_FILE

If either one of width or height is set, the other is calculated based on the
aspect ratio of the image. If no dimensions are specified, a default width of
80 is applied. If both dimensions are specified, aspect ratio is not preserved.

  -c int
        Contrast. A positive or negative integer.
  -h int
        Height in number of characters. (default -1)
  -i    Invert the output.
  -t int
        Luminance threshold. (default 85)
  -w int
        Width in number of characters. (default -1)

If you define the env variable DEBUG=1 before you run the program, it will output up to two files depending on your options: contrast.png and lum.png. These files make it easier to understand exactly how the applied contrast affects the luminance of the image. The luminance is used to determine which dots are present in the braille characters.

Examples

Example-1

Example-2

Example-3

License

This work is licensed under the GNU General Public License v3.0 only