Struct Image

Struct Documentation

struct Image

An image type that can be displayed by the Image element.

Public Functions

inline Image()
inline Size<unsigned int> size() const

Returns the size of the Image in pixels.

inline std::optional<slint::SharedString> path() const

Returns the path of the image on disk, if it was constructed via Image::load_from_path().

Public Static Functions

static inline Image load_from_path(const SharedString &file_path)

Load an image from an image file.


inline friend bool operator==(const Image &a, const Image &b)

Returns true if a refers to the same image as b; false otherwise.

inline friend bool operator!=(const Image &a, const Image &b)

Returns false if a refers to the same image as b; true otherwise.