Low level pixel format converter class. More...
#include <pixel_converter.h>
Public Member Functions | |
PixelConverter () | |
Constructs a pixel format converter. More... | |
~PixelConverter () | |
void | convert (void *output, int output_pitch, TextureFormat output_format, const void *input, int input_pitch, TextureFormat input_format, int width, int height) |
Convert some pixel data. More... | |
bool | flip_vertical () const |
Returns the flip vertical setting. More... | |
float | get_gamma () const |
Returns the gamma setting. More... | |
bool | get_input_is_ycrcb () const |
Returns the JPEG JFIF YCrCb input setting. More... | |
bool | get_output_is_ycrcb () const |
Returns the JPEG JFIF YCrCb output setting. More... | |
bool | get_premultiply_alpha () const |
Returns the premultiply alpha setting. More... | |
Vec4i | get_swizzle () const |
Returns the input channel used for each output channel. More... | |
void | set_flip_vertical (bool enable) |
Set the flip vertical setting. More... | |
void | set_gamma (float gamma) |
Set the gamma applied when converting. More... | |
void | set_input_is_ycrcb (bool enable) |
Converts from JPEG JFIF YCrCb. More... | |
void | set_output_is_ycrcb (bool enable) |
Converts to JPEG JFIF YCrCb. More... | |
void | set_premultiply_alpha (bool enable) |
Set the premultiply alpha setting. More... | |
void | set_swizzle (int red_source, int green_source, int blue_source, int alpha_source) |
Set the input channel used for each output channel. More... | |
void | set_swizzle (const Vec4i &swizzle) |
Low level pixel format converter class.
clan::PixelConverter::PixelConverter | ( | ) |
Constructs a pixel format converter.
clan::PixelConverter::~PixelConverter | ( | ) |
void clan::PixelConverter::convert | ( | void * | output, |
int | output_pitch, | ||
TextureFormat | output_format, | ||
const void * | input, | ||
int | input_pitch, | ||
TextureFormat | input_format, | ||
int | width, | ||
int | height | ||
) |
Convert some pixel data.
bool clan::PixelConverter::flip_vertical | ( | ) | const |
Returns the flip vertical setting.
float clan::PixelConverter::get_gamma | ( | ) | const |
Returns the gamma setting.
bool clan::PixelConverter::get_input_is_ycrcb | ( | ) | const |
Returns the JPEG JFIF YCrCb input setting.
bool clan::PixelConverter::get_output_is_ycrcb | ( | ) | const |
Returns the JPEG JFIF YCrCb output setting.
bool clan::PixelConverter::get_premultiply_alpha | ( | ) | const |
Returns the premultiply alpha setting.
Vec4i clan::PixelConverter::get_swizzle | ( | ) | const |
Returns the input channel used for each output channel.
void clan::PixelConverter::set_flip_vertical | ( | bool | enable | ) |
Set the flip vertical setting.
This defaults to off.
void clan::PixelConverter::set_gamma | ( | float | gamma | ) |
Set the gamma applied when converting.
This defaults to 1.0 (off).
void clan::PixelConverter::set_input_is_ycrcb | ( | bool | enable | ) |
Converts from JPEG JFIF YCrCb.
void clan::PixelConverter::set_output_is_ycrcb | ( | bool | enable | ) |
Converts to JPEG JFIF YCrCb.
void clan::PixelConverter::set_premultiply_alpha | ( | bool | enable | ) |
Set the premultiply alpha setting.
This defaults to off.
void clan::PixelConverter::set_swizzle | ( | int | red_source, |
int | green_source, | ||
int | blue_source, | ||
int | alpha_source | ||
) |
Set the input channel used for each output channel.
Values 0-3 accepted. 0 = red, 1 = green, 2 = blue, 3 = alpha.
void clan::PixelConverter::set_swizzle | ( | const Vec4i & | swizzle | ) |