pub struct Image {
pub width: u32,
pub height: u32,
pub color_space: ColorSpace,
pub stencil: bool,
pub samples: Vec<u8>,
pub alpha: Option<Vec<u8>>,
}Expand description
A decoded image.
Fields§
§width: u32Width in pixels.
height: u32Height in pixels.
color_space: ColorSpaceWhat the samples mean.
stencil: boolA stencil mask (/ImageMask true): one component, and the page is
painted with the current colour where the sample is 0.
samples: Vec<u8>width * height * color_space.components() bytes, rows top to
bottom, 8 bits per component whatever the file used, /Decode
applied. For ColorSpace::Indexed the bytes are palette indexes.
alpha: Option<Vec<u8>>An alpha channel carried inside the image data (JPEG 2000 with
/SMaskInData), width * height bytes.
Implementations§
Trait Implementations§
impl Eq for Image
impl StructuralPartialEq for Image
Auto Trait Implementations§
impl Forget for Image
impl Freeze for Imagewhere
*const ColorSpace is !null: Freeze,
PhantomData<ColorSpace>: Freeze,
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
impl Move for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnsafeUnpin for Imagewhere
*const ColorSpace is !null: UnsafeUnpin,
PhantomData<ColorSpace>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for Image
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