Skip to content

sindrets/img2braille

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Convert images to braille ascii-art.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published