euporie.core.convert.formats.png

Contain functions which convert data to png format.

Functions

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

Convert base64 encoded data to bytes.

commands_exist(*cmds)

Verify a list of external commands exist on the system.

have_modules(*modules)

Verify a list of python modules are importable.

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

Convert image data to PNG bytes using imagemagick.

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

Render LaTeX as a png image using dvipng.

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

Render LaTeX as a png image using :py:module:`matplotlib`.

pil_to_png_py_pil(data[, cols, rows, fg, ...])

Convert a pillow image to sixels teimpy.

register(from_, to[, filter_, weight])

Add a converter to the centralized format conversion system.

svg_to_png_py_cairosvg(data[, width, ...])

Convert SVG to PNG using cairosvg.

Classes

partial

partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.

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

Render LaTeX as a png image using dvipng.

Borrowed from IPython.

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

Render LaTeX as a png image using :py:module:`matplotlib`.

Borrowed from IPython.

async euporie.core.convert.formats.png.pil_to_png_py_pil(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 = '') bytes

Convert a pillow image to sixels teimpy.

async euporie.core.convert.formats.png.svg_to_png_py_cairosvg(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 = '') str

Convert SVG to PNG using cairosvg.