gamma.h File Reference

Utilities to map colors between gamma spaces. More...

+ Include dependency graph for gamma.h:

Go to the source code of this file.

Functions

GF_API GfVec3f GfApplyGamma (const GfVec3f &v, double gamma)
 Return a new vector with each component of v raised to the power gamma. More...
 
GF_API GfVec3d GfApplyGamma (const GfVec3d &v, double gamma)
 Return a new vector with each component of v raised to the power gamma. More...
 
GF_API GfVec3h GfApplyGamma (const GfVec3h &v, double gamma)
 
GF_API GfVec4f GfApplyGamma (const GfVec4f &v, double gamma)
 Return a new vector with the first three components of v raised to the power gamma and the fourth component unchanged. More...
 
GF_API GfVec4d GfApplyGamma (const GfVec4d &v, double gamma)
 Return a new vector with the first three components of v raised to the power gamma and the fourth component unchanged. More...
 
GF_API GfVec4h GfApplyGamma (const GfVec4h &v, double gamma)
 
GF_API float GfApplyGamma (const float &v, double gamma)
 Return a new float raised to the power gamma. More...
 
GF_API unsigned char GfApplyGamma (const unsigned char &v, double gamma)
 Return a new char raised to the power gamma. More...
 
GF_API double GfGetDisplayGamma ()
 Return the system display gamma. More...
 
GF_API GfVec3f GfConvertLinearToDisplay (const GfVec3f &v)
 Given a vec, v, representing an energy-linear RGB(A) color, return a vec of the same type converted to the system's display gamma. More...
 
GF_API GfVec3d GfConvertLinearToDisplay (const GfVec3d &v)
 
GF_API GfVec3h GfConvertLinearToDisplay (const GfVec3h &v)
 
GF_API GfVec4f GfConvertLinearToDisplay (const GfVec4f &v)
 
GF_API GfVec4d GfConvertLinearToDisplay (const GfVec4d &v)
 
GF_API GfVec4h GfConvertLinearToDisplay (const GfVec4h &v)
 
GF_API float GfConvertLinearToDisplay (const float &v)
 
GF_API unsigned char GfConvertLinearToDisplay (const unsigned char &v)
 
GF_API GfVec3f GfConvertDisplayToLinear (const GfVec3f &v)
 Given a vec, v, representing an RGB(A) color in the system's display gamma space, return an energy-linear vec of the same type. More...
 
GF_API GfVec3d GfConvertDisplayToLinear (const GfVec3d &v)
 
GF_API GfVec3h GfConvertDisplayToLinear (const GfVec3h &v)
 
GF_API GfVec4f GfConvertDisplayToLinear (const GfVec4f &v)
 
GF_API GfVec4d GfConvertDisplayToLinear (const GfVec4d &v)
 
GF_API GfVec4h GfConvertDisplayToLinear (const GfVec4h &v)
 
GF_API float GfConvertDisplayToLinear (const float &v)
 
GF_API unsigned char GfConvertDisplayToLinear (const unsigned char &v)
 

Detailed Description

Utilities to map colors between gamma spaces.

Definition in file gamma.h.

Function Documentation

◆ GfApplyGamma() [1/8]

GF_API GfVec3f GfApplyGamma ( const GfVec3f v,
double  gamma 
)

Return a new vector with each component of v raised to the power gamma.

◆ GfApplyGamma() [2/8]

GF_API GfVec3d GfApplyGamma ( const GfVec3d v,
double  gamma 
)

Return a new vector with each component of v raised to the power gamma.

◆ GfApplyGamma() [3/8]

GF_API GfVec3h GfApplyGamma ( const GfVec3h v,
double  gamma 
)

◆ GfApplyGamma() [4/8]

GF_API GfVec4f GfApplyGamma ( const GfVec4f v,
double  gamma 
)

Return a new vector with the first three components of v raised to the power gamma and the fourth component unchanged.

◆ GfApplyGamma() [5/8]

GF_API GfVec4d GfApplyGamma ( const GfVec4d v,
double  gamma 
)

Return a new vector with the first three components of v raised to the power gamma and the fourth component unchanged.

◆ GfApplyGamma() [6/8]

GF_API GfVec4h GfApplyGamma ( const GfVec4h v,
double  gamma 
)

◆ GfApplyGamma() [7/8]

GF_API float GfApplyGamma ( const float &  v,
double  gamma 
)

Return a new float raised to the power gamma.

◆ GfApplyGamma() [8/8]

GF_API unsigned char GfApplyGamma ( const unsigned char &  v,
double  gamma 
)

Return a new char raised to the power gamma.

◆ GfConvertDisplayToLinear()

GF_API GfVec3f GfConvertDisplayToLinear ( const GfVec3f v)

Given a vec, v, representing an RGB(A) color in the system's display gamma space, return an energy-linear vec of the same type.

◆ GfConvertLinearToDisplay()

GF_API GfVec3f GfConvertLinearToDisplay ( const GfVec3f v)

Given a vec, v, representing an energy-linear RGB(A) color, return a vec of the same type converted to the system's display gamma.

◆ GfGetDisplayGamma()

GF_API double GfGetDisplayGamma ( )

Return the system display gamma.