# synfig::Gamma Class Reference

This class performs color correction on Color classes. More...

`#include <gamma.h>`

List of all members.

## Public Member Functions

| Gamma (float x=1)
void | set_gamma (float x)
void | set_gamma_r (float x)
void | set_gamma_g (float x)
void | set_gamma_b (float x)
void | set_black_level (float x)
void | set_red_blue_level (float x)
void | set_all (float r, float g, float b, float black, float red_blue=1.0f)
float | get_gamma () const
float | get_gamma_r () const
float | get_gamma_g () const
float | get_gamma_b () const
float | get_black_level () const
float | get_red_blue_level () const
void | refresh_gamma_r ()
void | refresh_gamma_g ()
void | refresh_gamma_b ()
const unsigned char & | r_U16_to_U8 (int i) const
const unsigned char & | g_U16_to_U8 (int i) const
const unsigned char & | b_U16_to_U8 (int i) const
const unsigned char & | r_F32_to_U8 (float x) const
const unsigned char & | g_F32_to_U8 (float x) const
const unsigned char & | b_F32_to_U8 (float x) const
unsigned short | r_F32_to_U16 (float x) const
unsigned short | g_F32_to_U16 (float x) const
unsigned short | b_F32_to_U16 (float x) const
const float & | r_U8_to_F32 (int i) const
const float & | g_U8_to_F32 (int i) const
const float & | b_U8_to_F32 (int i) const
float | r_F32_to_F32 (float x) const
float | g_F32_to_F32 (float x) const
float | b_F32_to_F32 (float x) const

## Detailed Description

This class performs color correction on Color classes.

Todo:
  This is a non-functional stub.

## Constructor & Destructor Documentation

synfig::Gamma::Gamma | ( | float | x = `1` | ) | `[inline]`

References set_gamma().

## Member Function Documentation

void Gamma::set_gamma | ( | float | x | ) |

References f.

Referenced by exr_trgt::exr_trgt(), Gamma(), and synfig::Layer_ColorCorrect::set_param().

void Gamma::set_gamma_r | ( | float | x | ) |

References refresh_gamma_r().

void Gamma::set_gamma_g | ( | float | x | ) |

References refresh_gamma_g().

void Gamma::set_gamma_b | ( | float | x | ) |

References refresh_gamma_b().

void Gamma::set_black_level | ( | float | x | ) |

References refresh_gamma_b(), refresh_gamma_g(), and refresh_gamma_r().

void Gamma::set_red_blue_level | ( | float | x | ) |

References refresh_gamma_b(), refresh_gamma_g(), and refresh_gamma_r().

void Gamma::set_all | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | black,
|  | float | red_blue = `1.0f` |
| ) |  |  |

References refresh_gamma_b(), refresh_gamma_g(), and refresh_gamma_r().

float synfig::Gamma::get_gamma | ( |  | ) | const`[inline]`

Referenced by synfig::Layer_ColorCorrect::get_param().

float synfig::Gamma::get_gamma_r | ( |  | ) | const`[inline]`

float synfig::Gamma::get_gamma_g | ( |  | ) | const`[inline]`

float synfig::Gamma::get_gamma_b | ( |  | ) | const`[inline]`

float synfig::Gamma::get_black_level | ( |  | ) | const`[inline]`

float synfig::Gamma::get_red_blue_level | ( |  | ) | const`[inline]`

void Gamma::refresh_gamma_r | ( |  | ) |

References f.

Referenced by set_all(), set_black_level(), set_gamma_r(), and set_red_blue_level().

void Gamma::refresh_gamma_g | ( |  | ) |

References f.

Referenced by set_all(), set_black_level(), set_gamma_g(), and set_red_blue_level().

void Gamma::refresh_gamma_b | ( |  | ) |

References f.

Referenced by set_all(), set_black_level(), set_gamma_b(), and set_red_blue_level().

const unsigned char& synfig::Gamma::r_U16_to_U8 | ( | int | i | ) | const`[inline]`

const unsigned char& synfig::Gamma::g_U16_to_U8 | ( | int | i | ) | const`[inline]`

const unsigned char& synfig::Gamma::b_U16_to_U8 | ( | int | i | ) | const`[inline]`

const unsigned char& synfig::Gamma::r_F32_to_U8 | ( | float | x | ) | const`[inline]`

References f.

Referenced by synfig::Color2PixelFormat().

const unsigned char& synfig::Gamma::g_F32_to_U8 | ( | float | x | ) | const`[inline]`

References f.

Referenced by synfig::Color2PixelFormat().

const unsigned char& synfig::Gamma::b_F32_to_U8 | ( | float | x | ) | const`[inline]`

References f.

Referenced by synfig::Color2PixelFormat().

unsigned short synfig::Gamma::r_F32_to_U16 | ( | float | x | ) | const`[inline]`

References f.

unsigned short synfig::Gamma::g_F32_to_U16 | ( | float | x | ) | const`[inline]`

References f.

unsigned short synfig::Gamma::b_F32_to_U16 | ( | float | x | ) | const`[inline]`

References f.

const float& synfig::Gamma::r_U8_to_F32 | ( | int | i | ) | const`[inline]`

Referenced by ppm_mptr::get_frame(), imagemagick_mptr::get_frame(), bmp_mptr::get_frame(), and png_mptr::png_mptr().

const float& synfig::Gamma::g_U8_to_F32 | ( | int | i | ) | const`[inline]`

Referenced by ppm_mptr::get_frame(), imagemagick_mptr::get_frame(), bmp_mptr::get_frame(), jpeg_mptr::jpeg_mptr(), and png_mptr::png_mptr().

const float& synfig::Gamma::b_U8_to_F32 | ( | int | i | ) | const`[inline]`

Referenced by ppm_mptr::get_frame(), imagemagick_mptr::get_frame(), bmp_mptr::get_frame(), and png_mptr::png_mptr().

float synfig::Gamma::r_F32_to_F32 | ( | float | x | ) | const`[inline]`

float synfig::Gamma::g_F32_to_F32 | ( | float | x | ) | const`[inline]`

float synfig::Gamma::b_F32_to_F32 | ( | float | x | ) | const`[inline]`

The documentation for this class was generated from the following files:

- gamma.h
- gamma.cpp