imageio
Classes:
-
Media–A dataclass representing some media.
-
MediaSerializer–Serializer for ImageIO Arrays.
Attributes:
-
media_serializer–MediaSerializer with default settings.
media_serializer
module-attribute
media_serializer = MediaSerializer()
MediaSerializer with default settings.
Media
A dataclass representing some media.
Attributes:
MediaSerializer
Bases: Serializer[Media, '_MediaSerializerConfig']
Serializer for ImageIO Arrays.
Parameters:
-
(mimetypesMimeTypes, default:_DEFAULT_MIMETYPES) –The MIME types to use for guessing the content type and encoding.
Methods:
-
deserialize_config–Deserialize the configuration from a JSON string.
-
deserialize_data–Deserialize the given array.
-
serialize_config–Serialize the configuration to a JSON string.
-
serialize_data–Serialize the given array.
Attributes:
-
content_types(tuple[str, ...]) –The content types that the serializer uses.
content_types
class-attribute
instance-attribute
The content types that the serializer uses.
Used to get serializers by content type in the registry.
deserialize_config
deserialize_config(config: str) -> C
Deserialize the configuration from a JSON string.
deserialize_data
deserialize_data(
content: SerializedData[_MediaSerializerConfig],
) -> Media
Deserialize the given array.
serialize_data
serialize_data(
media: Media,
) -> SerializedData[_MediaSerializerConfig]
Serialize the given array.