Skip to content

Gio.BytesIcon

class — extends GObject.Object, Icon, LoadableIcon

GBytesIcon specifies an image held in memory in a common format (usually PNG) to be used as icon.

Constructors

new

@classmethod
def new(cls, bytes: bytes) -> BytesIcon

Creates a new icon for a bytes.

This cannot fail, but loading and interpreting the bytes may fail later on (for example, if LoadableIcon.load is called) if the image is invalid.

Parameters:

Methods

get_bytes

def get_bytes(self) -> bytes

Gets the GLib.Bytes associated with the given icon.

Properties

bytes

bytes: bytes  # read/write

The bytes containing the icon.