euporie.core.convert.formats.pil

Contain functions which convert data to PIL format.

Functions

have_modules(*modules)

Verify a list of python modules are importable.

png_to_pil_py(datum[, cols, rows, fg, bg, ...])

Convert PNG to a pillow image using PIL.

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

Add a converter to the centralized format conversion system.

set_background(image[, bg])

Remove the alpha channel from an image and set the background colour.

async euporie.core.convert.formats.pil.png_to_pil_py(datum: Datum, cols: int | None = None, rows: int | None = None, fg: str | None = None, bg: str | None = None, extend: bool = True) PilImage

Convert PNG to a pillow image using PIL.

euporie.core.convert.formats.pil.set_background(image: PilImage, bg: str | None = None) PilImage

Remove the alpha channel from an image and set the background colour.