pub trait IconDataExt {
    // Required methods
    fn to_image(&self) -> Result<RgbaImage, String>;
    fn to_png_bytes(&self) -> Result<Vec<u8>, String>;
}
Expand description

Helpers for working with IconData.

Required Methods§

source

fn to_image(&self) -> Result<RgbaImage, String>

Convert into image::RgbaImage

§Errors

If width*height != 4 * rgba.len(), or if the image is too big.

source

fn to_png_bytes(&self) -> Result<Vec<u8>, String>

Encode as PNG.

§Errors

The image is invalid, or the PNG encoder failed.

Implementations on Foreign Types§

source§

impl IconDataExt for IconData

Implementors§