Module termimage::ops [] [src]

Main functions doing actual work.

Use guess_format() to get teh image format from a path, then read the image using load_image(), resize it to terminal size with resize_image() and display it with write_[no_]ansi().

Functions

guess_format

Guess the image format from its extension or magic.

image_resized_size

Get the image size to downscale to, given its size, the terminal's size and whether to preserve its aspect.

load_image

Load an image from the specified file as the specified format.

resize_image

Resize the specified image to the specified size.

write_ansi

Display the specified image in the default console using ANSI escape codes.

write_ansi_truecolor

Display the specified image in the default console using ANSI 24-bit escape colour codes.

write_no_ansi

Display the specified image in the default console using WinAPI.