Skip to main content

IccFingerprint

Struct IccFingerprint 

Source
pub struct IccFingerprint {
    pub fnv1a64: u64,
    pub murmur3_32: u32,
}
Expand description

Full re-export of zenpixels core types (zero module name collisions!). Pair of normalized ICC fingerprints returned by Self::from_icc.

Combines FNV-1a64 and MurmurHash3_x86_32 (seed 3_242_157_231, explicit little-endian words on every target) over the profile with non-colorimetric metadata header fields zeroed.

Fields§

§fnv1a64: u64

64-bit FNV-1a hash of the normalized profile bytes.

§murmur3_32: u32

32-bit MurmurHash3_x86_32 (seed 3_242_157_231) of the normalized profile bytes.

Implementations§

Source§

impl IccFingerprint

Source

pub const fn new(fnv1a64: u64, murmur3_32: u32) -> IccFingerprint

Construct a fingerprint from its (fnv1a64, murmur3_32) components.

Source

pub const fn to_pair(self) -> (u64, u32)

Return the raw (fnv1a64, murmur3_32) pair.

Source

pub const fn from_icc(data: &[u8]) -> IccFingerprint

Compute the normalized fingerprint of ICC bytes.

Both components must match for identification or known-profile normalization. Murmur3 uses seed 3_242_157_231 and explicit little-endian words on every target.

Zeroes metadata-only header fields before hashing so that functionally identical profiles (same colorants + TRC) produce the same hash even if they differ in creation date, CMM, platform, creator, or profile ID.

Zeroed ranges (all non-colorimetric per ICC spec v2.0–v5/iccMAX):

  • bytes 4– 7: preferred CMM type (advisory hint)
  • bytes 24–35: creation date/time (metadata)
  • bytes 40–43: primary platform (advisory hint)
  • bytes 48–55: device manufacturer + device model (identification)
  • bytes 80–99: profile creator + profile ID (reserved in v2, MD5 in v4)

This is the fingerprint used by the committed identification tables and by zenpixels-convert’s explicit known-profile normalization. It is not a cryptographic digest, validation, or a proof of colorimetric equivalence. Bytes outside the listed header fields (including every tag) are hashed. Matching a table’s approximate color identification does not make profiles interchangeable without a pixel conversion.

Trait Implementations§

Source§

impl Clone for IccFingerprint

Source§

fn clone(&self) -> IccFingerprint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for IccFingerprint

Source§

impl Debug for IccFingerprint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for IccFingerprint

Source§

impl Hash for IccFingerprint

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for IccFingerprint

Source§

fn eq(&self, other: &IccFingerprint) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for IccFingerprint

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.