Skip to content

marvin.utilities.images

base64_to_image

Converts a base64 string to a local image file.

Parameters:

Name Type Description Default
base64_str str

The base64 string representation of the image.

required
output_path Union[str, Path]

The path to the output image file. This can be a string or a Path object.

required

Returns:

Type Description
None

None

image_to_base64

Converts a local image file to a base64 string.

Parameters:

Name Type Description Default
image_path Union[str, Path]

The path to the image file. This can be a string or a Path object.

required

Returns:

Name Type Description
str str

The base64 representation of the image.