Enum usvg::tree::ImageData [] [src]

pub enum ImageData {
    Path(PathBuf),
    Raw(Vec<u8>, ImageDataKind),
}

A raster image container.

Variants

Path to the image.

Preprocessor checks that file exists, but because it can be removed later, there is no guarantee that this path is valid.

An image raw data.

It's not a decoded image data, but the data that was decoded from base64. So you still need a PNG and a JPEG decoding library.

Trait Implementations

Auto Trait Implementations

impl Send for ImageData

impl Sync for ImageData