pub enum PixelFormat {
Gray8,
Rgb8,
Cmyk8,
Rgba8,
Mask1,
}Expand description
How the bytes handed to crate::EditDoc::embed_image are laid out.
The oracle takes a bitmap object and reads the format back off it; here the caller states it, because what arrives is loose bytes rather than a bitmap that knows its own shape.
Variants§
Gray8
One eight-bit grey sample per pixel, /DeviceGray.
Rgb8
Three eight-bit samples per pixel, /DeviceRGB.
Cmyk8
Four eight-bit samples per pixel, /DeviceCMYK.
Rgba8
Four eight-bit samples per pixel; the fourth becomes a /DeviceGray
/SMask and the first three the image’s own /DeviceRGB samples.
Mask1
One bit per pixel, rows padded to a byte, written as an /ImageMask.
A set bit paints, which is the sense /Decode [1 0] gives a stencil
mask; see crate::EditDoc::embed_image.
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more