pub struct ImageXObject {
    pub width: Px,
    pub height: Px,
    pub color_space: ColorSpace,
    pub bits_per_component: ColorBits,
    pub interpolate: bool,
    pub image_data: Vec<u8>,
    pub image_filter: Option<ImageFilter>,
    pub clipping_bbox: Option<CurTransMat>,
}

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

Creates a new ImageXObject

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts this type into the (usually inferred) input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Does nothing but move self, equivalent to drop.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.