Struct embedded_graphics_simulator::OutputImage[][src]

pub struct OutputImage<C> { /* fields omitted */ }

Output image.

An output image is the result of applying OutputSettings to a SimulatorDisplay. It can be used to save a simulator display to a PNG file.

Implementations

impl<C> OutputImage<C> where
    C: PixelColor + From<Rgb888> + ToBytes,
    <C as ToBytes>::Bytes: AsRef<[u8]>, 
[src]

pub fn update<DisplayC>(&mut self, display: &SimulatorDisplay<DisplayC>) where
    DisplayC: PixelColor + Into<Rgb888>, 
[src]

Updates the image from a SimulatorDisplay.

impl<C: OutputImageColor> OutputImage<C>[src]

pub fn save_png<PATH: AsRef<Path>>(&self, path: PATH) -> ImageResult<()>[src]

Saves the image content to a PNG file.

pub fn to_base64_png(&self) -> String[src]

Returns the image as a base64 encoded PNG.

pub fn as_image_buffer(&self) -> ImageBuffer<C::ImageColor, &[u8]>[src]

Returns the output image as an image crate ImageBuffer.

Trait Implementations

impl<C: Clone> Clone for OutputImage<C>[src]

impl<C: Debug> Debug for OutputImage<C>[src]

impl<C: Eq> Eq for OutputImage<C>[src]

impl<C> OriginDimensions for OutputImage<C>[src]

impl<C: PartialEq> PartialEq<OutputImage<C>> for OutputImage<C>[src]

impl<C> StructuralEq for OutputImage<C>[src]

impl<C> StructuralPartialEq for OutputImage<C>[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for OutputImage<C> where
    C: RefUnwindSafe

impl<C> Send for OutputImage<C> where
    C: Send

impl<C> Sync for OutputImage<C> where
    C: Sync

impl<C> Unpin for OutputImage<C> where
    C: Unpin

impl<C> UnwindSafe for OutputImage<C> where
    C: UnwindSafe

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> Dimensions for T where
    T: OriginDimensions, 

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

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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.