Function canvas::canvas_data::write_image

source ยท
fn write_image(
    draw_target: &mut dyn GenericDrawTarget,
    image_data: Vec<u8>,
    image_size: Size2D<f64>,
    dest_rect: Rect<f64>,
    smoothing_enabled: bool,
    premultiply: bool,
    draw_options: &DrawOptions,
)
Expand description

It writes an image to the destination target draw_target: the destination target where the image_data will be copied image_data: Pixel information of the image to be written. It takes RGBA8 image_size: The size of the image to be written dest_rect: Area of the destination target where the pixels will be copied smoothing_enabled: It determines if smoothing is applied to the image result premultiply: Determines whenever the image data should be premultiplied or not