Skip to main content

A package which can convert videos, images, and gifs to ascii art!

Project description

to-ascii

Converts videos, images, and gifs into ascii art!

[Example] [Example 2]

  • Works on most common image types
  • Works on most common video types
  • Works on gifs

Installation

Via pip:

python3 -m pip install to-ascii

Example Usage

Video / GIF:

from toascii import Video

v = Video('my_file.mp4', resize=.1, verbose=True)
converted = v.convert()  # convert the frames into ascii
converted.view()  # play the converted frames in the console

Image:

from toascii import Image

img = Image('my_image.png', resize=.1, verbose=True)  # load the image
img.convert()  # convert the image to ascii
img.view()  # view the final asciified image

Documentation

toascii.Video(filename='video.mp4', *, scale=1, w_stretch=1, gradient=Union[int, str], **max_workers=60, verbose=False) Note: only filename can be a positional argument, the rest are kwargs.

  • filename the name of the file/video which is to be opened and processed
  • scale the amount/1 which the video dimensions are multiplied by
  • w_stretch the amount that the width dimension is multiplied by
  • gradient either an integer from the preset gradients, or a custom gradient Example: '#$a=+-., '
  • verbose whether or not to show extra information

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

to-ascii-2.0.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

to_ascii-2.0.0-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

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