Skip to main content

Module image

Module image 

Source

Structs§

ImageData
The image data, including the image format and the raw image data.

Enums§

ImageFormat
The format of an image, used to determine how to decode the image data.
ImageSource
The source of an image, which can be a local file path, a remote URL, a data URI, or a CID.

Functions§

parse_source
Takes an image source string and determines the type of source it is, returning an ImageSource enum.
resolve_image
Takes an image source string and a map of MIME types to image data and attempts to resolve the image source to an ImageData struct.
source_dimensions
Returns the dimensions of the image source if it can be determined, otherwise returns None.