pub struct ImageData {
pub width: u32,
pub height: u32,
pub format: ImageFormat,
pub color_space: ColorSpace,
pub bits_per_component: u8,
pub data: Vec<u8>,
pub smask_data: Option<Vec<u8>>,
}Expand description
Parsed image data ready for embedding into a PDF.
Fields§
§width: u32Image width in pixels.
height: u32Image height in pixels.
format: ImageFormatEncoding format of the source image.
color_space: ColorSpacePDF color space for the pixel data.
bits_per_component: u8Number of bits per color component (typically 8).
data: Vec<u8>Raw pixel data (RGB/Gray) or raw JPEG bytes.
smask_data: Option<Vec<u8>>Separate alpha channel (grayscale), if present.
Auto Trait Implementations§
impl Freeze for ImageData
impl RefUnwindSafe for ImageData
impl Send for ImageData
impl Sync for ImageData
impl Unpin for ImageData
impl UnsafeUnpin for ImageData
impl UnwindSafe for ImageData
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