funcicon_data_uri#

icon_data_uri(
data: bytes,
content_type: str = 'image/png',
) → str#

Encode an image as the data URI that launcher profiles use for icons.

Parameters:
  • data (bytes) – The image file’s contents.

  • content_type (str) – The image’s media type.

Returns:

The data URI, ready for the icon argument of Launcher.add_profile.

Return type:

str