icalendar.prop.image module#
This contains the IMAGE property from RFC 7986.
- class icalendar.prop.image.Image(uri: str | None = None, b64data: str | None = None, fmttype: str | None = None, altrep: str | None = None, display: str | None = None)[source]#
Bases:
object
An image as URI or BINARY according to RFC 7986.
- Value Type:
URI or BINARY – no default. The value MUST be data with a media type of “image” or refer to such data.
- Description:
This property specifies an image for an iCalendar object or a calendar component via a URI or directly with inline data that can be used by calendar user agents when presenting the calendar data to a user. Multiple properties MAY be used to specify alternative sets of images with, for example, varying media subtypes, resolutions, or sizes. When multiple properties are present, calendar user agents SHOULD display only one of them, picking one that provides the most appropriate image quality, or display none. The “DISPLAY” parameter is used to indicate the intended display mode for the image. The “ALTREP” parameter, defined in RFC 5545, can be used to provide a “clickable” image where the URI in the parameter value can be “launched” by a click on the image in the calendar user agent.
- Parameters:
uri – The URI of the image.
b64data – The data of the image, base64 encoded.
fmttype – The format type, e.g.
"image/png"
.altrep – Link target of the image.
display – The display mode, e.g.
"BADGE"
.