cosmic::iced::window::icon

Function from_file_data

source
pub fn from_file_data(
    data: &[u8],
    explicit_format: Option<ImageFormat>,
) -> Result<Icon, Error>
Expand description

Creates an icon from the content of an image file.

This content can be included in your application at compile-time, e.g. using the include_bytes! macro. You can pass an explicit file format. Otherwise, the file format will be guessed at runtime.