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]
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]
DisplayC: PixelColor + Into<Rgb888>,
Updates the image from a SimulatorDisplay
.
impl<C: OutputImageColor> OutputImage<C>
[src]
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: Clone> Clone for OutputImage<C>
[src]fn clone(&self) -> OutputImage<C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: Eq> Eq for OutputImage<C>
[src]
impl<C: Eq> Eq for OutputImage<C>
[src]impl<C> OriginDimensions for OutputImage<C>
[src]
impl<C> OriginDimensions for OutputImage<C>
[src]impl<C: PartialEq> PartialEq<OutputImage<C>> for OutputImage<C>
[src]
impl<C: PartialEq> PartialEq<OutputImage<C>> for OutputImage<C>
[src]fn eq(&self, other: &OutputImage<C>) -> bool
[src]
fn ne(&self, other: &OutputImage<C>) -> bool
[src]
impl<C> StructuralEq for OutputImage<C>
[src]
impl<C> StructuralEq for OutputImage<C>
[src]impl<C> StructuralPartialEq 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> RefUnwindSafe for OutputImage<C> where
C: RefUnwindSafe,
impl<C> Send for OutputImage<C> where
C: Send,
impl<C> Send for OutputImage<C> where
C: Send,
impl<C> Sync for OutputImage<C> where
C: Sync,
impl<C> Sync for OutputImage<C> where
C: Sync,
impl<C> Unpin for OutputImage<C> where
C: Unpin,
impl<C> Unpin for OutputImage<C> where
C: Unpin,
impl<C> UnwindSafe for OutputImage<C> where
C: UnwindSafe,
impl<C> UnwindSafe for OutputImage<C> where
C: UnwindSafe,