Skip to content

picharsso draw#

Generate text art from an image.

Usage#

picharsso draw [options] <path> <command> [args]

Arguments#

<path>#

Path to the image file.

Options#

-c, --colorize#

Apply image colors to output text.

Example

Consider the following image:

Instagram logo

Instagram

picharsso draw [-c] -H 32 docs/assets/images/subjects/instagram.webp gradient

Here's what it should look like:

Instagram logo in text (without color)

Instagram logo in text (with color)

-m, --mode [ansi|html]#

Format mode for output text. [default: ansi]

Formats

Refer to the Formats documentation to learn about the supported output formats.

-r, --resample [nearest|box|bilinear|hamming|bicubic|lanczos]#

Resampling filter. [default: nearest]

Example

Consider the following image:

Starry Night

Starry Night [Vincent van Gogh, 1889]

picharsso draw -c -term-h -r <resample> docs/assets/images/subjects/starry-night.webp gradient -s "█"

Here's what it should look like:

Starry Night (nearest resampling)

Starry Night (box resampling)

Starry Night (bilinear resampling)

Starry Night (hamming resampling)

Starry Night (bicubic resampling)

Starry Night (lanczos resampling)

-H, --height INTEGER#

Height of output text in characters. If 0, derives from width. [default: 0]

Lines

height is the number of lines in the text output.

Example

Consider the following image:

Zima Blue

Zima Blue [Zima]

picharsso draw -c -H 32 docs/assets/images/subjects/zima.webp gradient

Here's what it should look like:

Zima Blue (with height = 32)

-W, --width INTEGER#

Width of output text in characters. If 0, derives from height. [default: 0]

Characters per line

width is the number of characters (including whitespace) per line in the text output.

Example

Consider the following image:

Zima Blue

Zima Blue [Zima]

picharsso draw -c -W 32 docs/assets/images/subjects/zima.webp gradient

Here's what it should look like:

Zima Blue (with width = 32)

-term-h, --terminal-height#

Sets height to terminal height.

Example

Consider the following image:

Zima Blue

Zima Blue [Zima]

picharsso draw -c -term-h docs/assets/images/subjects/zima.webp gradient

Here's what it should look like:

Zima Blue (with terminal height)

Bug

When used while piping, height is set to the default terminal height, which is usually 24.

-term-w, --terminal-width#

Sets width to terminal width.

Example

Consider the following image:

Zima Blue

Zima Blue [Zima]

picharsso draw -c -term-w docs/assets/images/subjects/zima.webp gradient

Here's what it should look like:

Zima Blue (with terminal width)

Bug

When used while piping, width is set to the default terminal width, which is usually 80.

-h, --help#

Show this message and exit.

Message
Usage: picharsso draw [options] <path> <command> [args]

  Generate text art from an image.

  <path>                          Path to the image file.

Options:
  -c, --colorize                  Apply image colors to output text.
  -m, --mode [ansi|html]          Format mode for output text.  [default:
                                  ansi]

  -r, --resample [nearest|box|bilinear|hamming|bicubic|lanczos]
                                  Resampling filter.  [default: nearest]
  -H, --height INTEGER            Height of output text in characters.

                                  If 0, derives from width.  [default: 0]

  -W, --width INTEGER             Width of output text in characters.

                                  If 0, derives from height.  [default: 0]

  -term-h, --terminal-height      Sets height to terminal height.
  -term-w, --terminal-width       Sets width to terminal width.
  -h, --help                      Show this message and exit.

Commands:
  braille   Use the Braille style.
  gradient  Use the gradient style.

Subcommands#

Styles

Refer to the Styles documentation for an in-depth guide to the image processing behind Picharsso.

braille#

Use the Braille style.

gradient#

Use the gradient style.