Skip to main content

To convert any image or text into braille art

Project description

imagetobrailleart

A python library to convert image or text into braille art.

Convert any image or text into braille. I have used openCV, PIL and braillegraph by Chris bouchard but i have slightly upgraded his library.

Installation

This package is hosted on PyPI, so installation should be as simple as

% pip install imagetobrailleart

Note that this package requires at least Python 3.3, so if your default Python installation is still Python 2, make sure you use pip3.

openCV is necessary for this library. If it is not installed then please install it.

%pip install opencv-python

I am using 4.5.3.56 version.

Pillow is also necessary for this library. If it is not installed then please install it.

%pip install pillow

I am using 8.3.1 version.

Again, use python3 if necessary.

Usage

You can either use imagetobraille or texttobraille Import imagetobrailleart to start using it.

imagetobraille("location_of_image", size = 100, inverse = 0)

100 is the minimum we recommend and to inverse the image use 1 and if you don't want ot inverse it then use 0 or left it blank. Example to print face of a girl:

>>> import imagetobrailleart as itb
>>> a = itb.imagetobraille("C:\\Users\\yash\\Desktop\\face2.jpg") 
>>> print(a)

GIRL braille art

texttobraille("font_location","text", size = 100, inverse = 0)

To inverse the image use 1 and if you don't want ot inverse it then use 0 or left it blank. Example to print HEY:

>>> import imagetobrailleart as itb
>>> a = itb.texttoimage("arial.tff","HEY", 100, 0)
>>> print(a)

HEY braille art

License

MIT

Free Code, Hell Yeah!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imagetobrailleart-0.0.6.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imagetobrailleart-0.0.6-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file imagetobrailleart-0.0.6.tar.gz.

File metadata

  • Download URL: imagetobrailleart-0.0.6.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for imagetobrailleart-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e508ac1fda0e3f64088d7fe0be436f8c965d620c5486c0fb13f551f0a836cf02
MD5 aa1ab7a8f425561f04ee1cc90cc18504
BLAKE2b-256 716fab235d876bb48fba7a3985262e5e3569452ce2432546098f734aa66ce2c5

See more details on using hashes here.

File details

Details for the file imagetobrailleart-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: imagetobrailleart-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

File hashes

Hashes for imagetobrailleart-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 170246a040537ff0af8db29f058a5bcbf1e31a0b18be96654aa2042ebf2b8f25
MD5 ed5883b0617be8072bcf0963b688dc51
BLAKE2b-256 e5398de9db98fbae5009ff70320f696d4d56bc5d6eaf7eb5fb97c3d1e109cc5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page