Image๏ƒ

Functionality relating to reading and writing images.

Functions:

open_image(source)

Open Image object from a given URL or file path

get_image_bytes(image)

Extracts bytes from a given Image file.

musify.file.image.open_image(source)๏ƒ

Open Image object from a given URL or file path

Returns:

Image โ€“ The loaded Image.Image

Raises:
  • ImageLoadError โ€“ If the image cannot be loaded.

  • ModuleImportError โ€“ If required modules are not installed.

musify.file.image.get_image_bytes(image)๏ƒ

Extracts bytes from a given Image file.

Raises:

ModuleImportError โ€“ If required modules are not installed.

Return type:

bytes