[−][src]Struct printpdf::types::plugins::graphics::xobject::ImageXObject
Fields
width: Px
Width of the image (original width, not scaled width)
height: Px
Height of the image (original height, not scaled height)
color_space: ColorSpace
Color space (Greyscale, RGB, CMYK)
bits_per_component: ColorBits
Bits per color component (1, 2, 4, 8, 16) - 1 for black/white, 8 Greyscale / RGB, etc. If using a JPXDecode filter (for JPEG images), this can be inferred from the image data
interpolate: bool
Should the image be interpolated when scaled?
image_data: Vec<u8>
The actual data from the image
image_filter: Option<ImageFilter>
Decompression filter for image_data
, if None
assumes uncompressed raw pixels in the expected color format.
clipping_bbox: Option<CurTransMat>
Required bounds to clip the image, in unit space
Default value: Identity matrix ([1 0 0 1 0 0]
) - used when value is None
Implementations
impl<'a> ImageXObject
[src]
pub fn new(
width: Px,
height: Px,
color_space: ColorSpace,
bits: ColorBits,
interpolate: bool,
image_filter: Option<ImageFilter>,
bbox: Option<CurTransMat>,
data: Vec<u8>
) -> Self
[src]
width: Px,
height: Px,
color_space: ColorSpace,
bits: ColorBits,
interpolate: bool,
image_filter: Option<ImageFilter>,
bbox: Option<CurTransMat>,
data: Vec<u8>
) -> Self
Creates a new ImageXObject
pub fn try_from<T: ImageDecoder<'a>>(image: T) -> Result<Self, ImageError>
[src]
pub fn from_dynamic_image(image: &DynamicImage) -> Self
[src]
Trait Implementations
impl Clone for ImageXObject
[src]
pub fn clone(&self) -> ImageXObject
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ImageXObject
[src]
impl From<ImageXObject> for Image
[src]
pub fn from(image: ImageXObject) -> Self
[src]
impl Into<Stream> for ImageXObject
[src]
Auto Trait Implementations
impl RefUnwindSafe for ImageXObject
[src]
impl Send for ImageXObject
[src]
impl Sync for ImageXObject
[src]
impl Unpin for ImageXObject
[src]
impl UnwindSafe for ImageXObject
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,