Function cosmic::widget::image

source ·
pub fn image<'a, Handle>(handle: impl Into<Handle>) -> Image<'a, Handle>
Expand description

Creates a new Image.

Images display raster graphics in different formats (PNG, JPG, etc.).

§Example

use iced::widget::image;

enum Message {
    // ...
}

fn view(state: &State) -> Element<'_, Message> {
    image("ferris.png").into()
}