Skip to main content

ProfileHeader

Struct ProfileHeader 

Source
pub struct ProfileHeader {
    pub size: u32,
    pub preferred_cmm: u32,
    pub version: ProfileVersion,
    pub device_class: DeviceClass,
    pub data_color_space: ColorSpace,
    pub pcs: ColorSpace,
    pub rendering_intent: RenderingIntent,
    pub creator: u32,
    pub profile_id: [u8; 16],
}
Expand description

The fixed 128-byte header that opens every ICC profile (ICC.1:2022 §7.2).

The header records the profile’s size, the device/connection color spaces it relates, the profile version, the default rendering intent, and an MD5 identifier. Only the most load-bearing fields are modelled here; the reserved and date/platform fields are added in the implementation phase.

Fields§

§size: u32

Total profile size in bytes (size field).

§preferred_cmm: u32

Preferred CMM signature (e.g. 'appl', 'lcms'), or zero.

§version: ProfileVersion

Profile format version (the major.minor.bugfix of the spec it conforms to).

§device_class: DeviceClass

What kind of device or transform the profile describes.

§data_color_space: ColorSpace

The device color space the profile’s data side uses (the A side).

§pcs: ColorSpace

The profile connection space (the B side) — always XYZ or Lab.

§rendering_intent: RenderingIntent

The default rendering intent.

§creator: u32

Profile creator signature, or zero.

§profile_id: [u8; 16]

The 16-byte profile ID (an MD5 of the profile with certain fields zeroed), or all-zero if unset.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.