euporie.core.convert.formats.common

Contain functions which can be used to convert data to multiple formats.

Functions

base64_to_bytes_py(data[, width, height, ...])

Convert base64 encoded data to bytes.

call_subproc(data, cmd[, use_tempfile, suffix])

Call the command as a subprocess and return it's output as bytes.

chafa_convert_cmd(output_format, data[, ...])

Convert image data to ANSI text using chafa.

chafa_convert_py(output_format, data[, ...])

Convert image data to ANSI text using ::chafa.py.

get_app()

Get the current active (running) Application.

imagemagick_convert(output_format, data[, ...])

Convert image data to PNG bytes using imagemagick.

async euporie.core.convert.formats.common.base64_to_bytes_py(data: str | bytes, width: int | None = None, height: int | None = None, fg: str | None = None, bg: str | None = None, path: Path | None = None, initial_format: str = '') bytes

Convert base64 encoded data to bytes.

async euporie.core.convert.formats.common.chafa_convert_cmd(output_format: str, data: str | bytes, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, path: Path | None = None, initial_format: str = '') str | bytes

Convert image data to ANSI text using chafa.

async euporie.core.convert.formats.common.chafa_convert_py(output_format: Literal['symbols', 'sixels', 'kitty', 'iterm2'], data: PilImage, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, path: Path | None = None, initial_format: str = '') str | bytes

Convert image data to ANSI text using ::chafa.py.

async euporie.core.convert.formats.common.imagemagick_convert(output_format: str, data: str | bytes, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, path: Path | None = None, initial_format: str = '') str | bytes

Convert image data to PNG bytes using imagemagick.