[][src]Struct jpegxl_sys::JpegxlColorProfileSource

#[repr(C)]pub struct JpegxlColorProfileSource {
    pub icc_profile_accurate: c_int,
    pub color_encoding_valid: c_int,
    pub icc_profile_size: size_t,
}

Specifies how the color profile information of the image can be retrieved, Either through ICC profile, or through JpegxlColorEncoding.

The following scenarios are possible:

  • The ICC profile is accurate and the color encoding is invalid. Only the ICC profile may be requested.
  • the ICC profile is inaccurate and the color encoding is valid. Both can be requested, but only the color encoding correctly specifies the color, the ICC profile is an approximation that can be used when only ICC profile is supported.
  • Both are valid and accurate, any can be used equally well.

Example: for PQ or HLG color, JpegxlDecoderGetColorEncoding describes the transfer function more correctly and the ICC profile will not be accurate. On the other hand, there exist transfer functions that can only be described by an ICC profile, in that case icc_profile_accurate is JPEGXL_TRUE and color_encoding_valid is JPEGXL_FALSE.

Fields

icc_profile_accurate: c_int

If JPEGXL_TRUE, the ICC profile describes the image color encoding, once the ICC profile has been decoded. If JPEGXL_FALSE, the ICC profile is not accurate and a JpegxlDecoderGetColorEncoding must be used instead to accurately describe the color profile of the image. An ICC profile can still be requested, but it will only be an approximation.

color_encoding_valid: c_int

If JPEGXL_TRUE, JpegxlDecoderGetColorEncoding describes the image color encoding, once its information is available. If JPEGXL_FALSE, only the ICC profile can be used.

icc_profile_size: size_t

ICC profile size in bytes.

Trait Implementations

impl Clone for JpegxlColorProfileSource[src]

impl Copy for JpegxlColorProfileSource[src]

impl Debug for JpegxlColorProfileSource[src]

impl NewUninit for JpegxlColorProfileSource[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.