Enum ColorSpace
#[repr(u8)]
pub enum ColorSpace
Image color space.
Note: the color space is purely informative. Although it is saved to the file header, it does not affect encoding/decoding in any way.
Variants
-
Srgb = 0 sRGB with linear alpha
-
Linear = 1 All channels are linear
Implementations
impl ColorSpace
const fn is_srgb(self) -> boolReturns true if the color space is sRGB with linear alpha.
const fn is_linear(self) -> boolReturns true is all channels are linear.
const fn as_u8(self) -> u8Converts to an integer (0 if sRGB, 1 if all linear).
Trait Implementations
impl Clone for ColorSpace
fn clone(&self) -> Self
impl Copy for ColorSpace
impl Debug for ColorSpace
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for ColorSpace
fn default() -> Self
impl Eq for ColorSpace
impl Hash for ColorSpace
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for ColorSpace
fn cmp(&self, other: &Self) -> Ordering
impl PartialEq for ColorSpace
fn eq(&self, other: &Self) -> bool
impl PartialOrd for ColorSpace
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl StructuralPartialEq for ColorSpace
impl TryFrom<u8> for ColorSpace
type Error = Error;fn try_from(colorspace: u8) -> Result<Self>