[][src]Struct resvg::Image

pub struct Image { /* fields omitted */ }

A raster image that contains rendering results.

Unpremultiplied RGBA color type is used.

Implementations

impl Image[src]

pub fn width(&self) -> u32[src]

Returns the image width.

Newer zero.

pub fn height(&self) -> u32[src]

Returns the image height.

Newer zero.

pub fn size(&self) -> ScreenSize[src]

Returns the image size.

pub fn data(&self) -> &[u8][src]

Returns the image content as u8 slice.

pub fn take(self) -> Vec<u8>[src]

Returns the underlying data.

pub fn save_png<P: AsRef<Path>>(&self, path: P) -> Result<(), EncodingError>[src]

Save the image as PNG at a provided path.

Trait Implementations

impl Clone for Image[src]

Auto Trait Implementations

impl RefUnwindSafe for Image

impl Send for Image

impl Sync for Image

impl Unpin for Image

impl UnwindSafe for Image

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,