Expand description

Main functions doing actual work.

Use guess_format() to get the image format from a path, then read the image using load_image() to the size given by image_resized_size(), resize it to terminal size with resize_image() and display it with write_[no_]ansi[_truecolor](), or display it yourself with approximations from create_colourtable().

Functions

Create a line-major table of (upper, lower) colour approximation indices given the supported colours therefor.

Guess the image format from its extension or magic.

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

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

Resize the specified image to the specified size.

Display the specified image approximating it to the specified colours in the default console using ANSI escape codes.

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

Display the specified image in the default console using WinAPI.