Struct lcms2_sys::ffi::PixelFormat[][src]

#[repr(C)]
pub struct PixelFormat(pub u32);
Expand description

Format of pixel is defined by one cmsUInt32Number, using bit fields as follows

                          2                1          0
                     3 2 10987 6 5 4 3 2 1 098 7654 321
                     A O TTTTT U Y F P X S EEE CCCC BBB

       A: Floating point -- With this flag we can differentiate 16 bits as float and as int
       O: Optimized -- previous optimization already returns the final 8-bit value
       T: Pixeltype
       F: Flavor  0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)
       P: Planar? 0=Chunky, 1=Planar
       X: swap 16 bps endianness?
       S: Do swap? ie, BGR, KYMC
       E: Extra samples
       C: Channels (Samples per pixel)
       B: bytes per sample
       Y: Swap first - changes ABGR to BGRA and KCMY to CMYK

Tuple Fields

0: u32

Implementations

A: Floating point – With this flag we can differentiate 16 bits as float and as int

O: Optimized – previous optimization already returns the final 8-bit value

T: Color space (PT_*)

Y: Swap first - changes ABGR to BGRA and KCMY to CMYK

F: Flavor 0=MinIsBlack(Chocolate) 1=MinIsWhite(Vanilla)

P: Planar? 0=Chunky, 1=Planar

X: swap 16 bps endianness?

S: Do swap? ie, BGR, KYMC

E: Extra samples

C: Channels (Samples per pixel)

B: bytes per sample

size of pixel

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.