Struct Image

Struct Documentation

struct sixtyfps::Image

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

Public Functions

inline Image()
inline Size size() const

Returns the size of the Image in pixels.

inline std::optional<sixtyfps::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.

Friends

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

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

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

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