Skip to content

Filco306/img-to-chars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img-to-chars

Convert an img to a character image!

An example can be found in the output folder, where this image was converted to text.

Install

Do:

pip install -r requirements.txt

Run

To run an image, do:

python3 index.py --file_path=<FILE_PATH> --output_file_path=<OUTPUT_FILE_PATH>

where:

  • file_path is the path to the image to convert to a .txt-file.
  • output_file_path is the path to the output .txt-file.

If your image is too granular, you can reduce the granularity through the --size_reduction argument. If you want to reduce the number of pixels in half, set it to 2 etc.

Some additional notes

This is not fully tested yet! I have tried on .jpg- and .png-files, and it seems to work okay on those file types. If you try to use it and it does not work, please submit an issue so I can improve it!

About

Convert an img to a character image!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages