im.im_color

\file \brief Color Manipulation

See Copyright Notice in im_lib.h

Members

Functions

IM_FWLAB
float IM_FWLAB(float _w)
Undocumented in source. Be warned that the author may not have intended to support it.
IM_GWLAB
float IM_GWLAB(float _w)
Undocumented in source. Be warned that the author may not have intended to support it.
imColorCMYK2RGB
void imColorCMYK2RGB(T C, T M, T Y, T K, T R, T G, T B, const(T) max)

Converts C'M'Y'K' to R'G'B' (all nonlinear). \n * This is a poor conversion that works for a simple visualization. \verbatim 0 <= CMYK <= 1 ; 0 <= RGB <= 1

imColorLab2XYZ
void imColorLab2XYZ(float L, float a, float b, float X, float Y, float Z)

Converts CIE L*a*b* (nonlinear) to CIE XYZ (linear). \n * The white point is D65. \n * 0 <= L <= 1 ; -0.5 <= ab <= +0.5 ; 0 <= XYZ <= 1 * \ingroup color

imColorLightness2Luminance
float imColorLightness2Luminance(const(float) L)

Converts Lightness (CIE L*) to Luminance (CIE Y) (all linear). \n * The white point is D65. \verbatim 0 <= Y <= 1 ; 0 <= L* <= 1

imColorLuminance2Lightness
float imColorLuminance2Lightness(const(float) Y)

Converts Luminance (CIE Y) to Lightness (CIE L*) (all linear). \n * The white point is D65. \verbatim 0 <= Y <= 1 ; 0 <= L* <= 1

imColorLuv2XYZ
void imColorLuv2XYZ(float L, float u, float v, float X, float Y, float Z)

Converts CIE L*u*v* (nonlinear) to CIE XYZ (linear). \n * The white point is D65. * 0 <= L <= 1 ; -0.5 <= uv <= +0.5 ; 0 <= XYZ <= 1 \n * \ingroup color

imColorMax
int imColorMax(int data_type)

Returns the maximum value for pre-defined color conversion purposes. \n * See \ref cci. * \ingroup color

imColorMin
int imColorMin(int data_type)

Returns the minimum value for pre-defined color conversion purposes. \n * See \ref cci. * \ingroup color

imColorQuantize
T imColorQuantize(const(float) value, const(T) min, const(T) max)

Quantize 0-1 values into min-max. \n * Value are usually integers, * but the dummy quantizer uses real values. * See also \ref math. * \ingroup color

imColorRGB2Luma
T imColorRGB2Luma(T R, T G, T B)

Converts R'G'B' to Y' (all nonlinear). \n \verbatim Y' = 0.299 *R' + 0.587 *G' + 0.114 *B' \endverbatim * \ingroup color

imColorRGB2RGBNonlinear
void imColorRGB2RGBNonlinear(float RL, float GL, float BL, float R, float G, float B)

Converts RGB (linear) to R'G'B' (nonlinear). * \ingroup color

imColorRGB2XYZ
void imColorRGB2XYZ(T R, T G, T B, T X, T Y, T Z)

Converts Rec 709 RGB to CIE XYZ (all linear). \n * ITU-R Recommendation BT.709 (D65 white point). \n \verbatim 0 <= XYZ <= 1 ; 0 <= RGB <= 1

imColorRGB2YCbCr
void imColorRGB2YCbCr(T R, T G, T B, T Y, T Cb, T Cr, const(T) zero)

Converts R'G'B' to Y'CbCr (all nonlinear). \n * ITU-R Recommendation 601-1 with no headroom/footroom. \verbatim 0 <= Y <= 1 ; -0.5 <= CbCr <= 0.5 ; 0 <= RGB <= 1

imColorReconstruct
float imColorReconstruct(const(T) value, const(T) min, const(T) max)

Reconstruct min-max values into 0-1. \n * Values are usually integers, * but the dummy reconstructor uses real values. * See also \ref math. * \ingroup color

imColorTransfer2Linear
float imColorTransfer2Linear(const(float) nonlinear_value)

Converts nonlinear values to linear values. \n * We use the sRGB transfer function. sRGB uses ITU-R 709 primaries and D65 white point. \n \verbatim 0 <= l <= 1 ; 0 <= v <= 1

imColorTransfer2Nonlinear
float imColorTransfer2Nonlinear(const(float) value)

Converts linear values to nonlinear values. \n * We use the sRGB transfer function. sRGB uses ITU-R 709 primaries and D65 white point. \n \verbatim 0 <= l <= 1 ; 0 <= v <= 1

imColorXYZ2Lab
void imColorXYZ2Lab(float X, float Y, float Z, float L, float a, float b)

Converts CIE XYZ (linear) to CIE L*a*b* (nonlinear). \n * The white point is D65. \n \verbatim 0 <= L <= 1 ; -0.5 <= ab <= +0.5 ; 0 <= XYZ <= 1

imColorXYZ2Luv
void imColorXYZ2Luv(float X, float Y, float Z, float L, float u, float v)

Converts CIE XYZ (linear) to CIE L*u*v* (nonlinear). \n * The white point is D65. \n \verbatim 0 <= L <= 1 ; -1 <= uv <= +1 ; 0 <= XYZ <= 1

imColorXYZ2RGB
void imColorXYZ2RGB(T X, T Y, T Z, T R, T G, T B)

Converts CIE XYZ to Rec 709 RGB (all linear). \n * ITU-R Recommendation BT.709 (D65 white point). \n \verbatim 0 <= XYZ <= 1 ; 0 <= RGB <= 1

imColorYCbCr2RGB
void imColorYCbCr2RGB(T Y, T Cb, T Cr, T R, T G, T B, const(T) zero, const(T) min, const(T) max)

Converts Y'CbCr to R'G'B' (all nonlinear). \n * ITU-R Recommendation 601-1 with no headroom/footroom. \verbatim 0 <= Y <= 1 ; -0.5 <= CbCr <= 0.5 ; 0 <= RGB <= 1

imColorZeroShift
float imColorZeroShift(int data_type)

Returns the zero value for YCbCr color conversion. \n * When data type is unsigned Cb and Cr are shifted to 0-max. * So before they can be used in conversion equations * Cb and Cr values must be shifted back to fix the zero position. * \ingroup color

Meta