Panda3D
|
This program can apply a 4x4 color transform to all of the colors in the pixels of a series of images. More...
#include "imageTransformColors.h"
Public Member Functions | |
void | run () |
Protected Member Functions | |
Filename | get_output_filename (const Filename &source_filename) const |
Returns the output filename of the egg file with the given input filename. | |
virtual bool | handle_args (Args &args) |
Does something with the additional arguments on the command line (after all the -options have been parsed). | |
void | process_image (PNMImage &image) |
Processes a single image in-place. | |
Static Protected Member Functions | |
static bool | dispatch_add (const string &opt, const string &arg, void *var) |
Accepts a componentwise add. | |
static bool | dispatch_mat3 (const string &opt, const string &arg, void *var) |
Takes a series of 9 numbers as a 3x3 matrix. | |
static bool | dispatch_mat4 (const string &opt, const string &arg, void *var) |
Takes a series of 16 numbers as a 4x4 matrix. | |
static bool | dispatch_range (const string &opt, const string &arg, void *var) |
Takes a min,max dynamic range. | |
static bool | dispatch_scale (const string &opt, const string &arg, void *var) |
Accepts a componentwise scale. |
This program can apply a 4x4 color transform to all of the colors in the pixels of a series of images.
Definition at line 31 of file imageTransformColors.h.
bool ImageTransformColors::dispatch_add | ( | const string & | opt, |
const string & | arg, | ||
void * | var | ||
) | [static, protected] |
Accepts a componentwise add.
Definition at line 285 of file imageTransformColors.cxx.
References LMatrix4d::translate_mat().
bool ImageTransformColors::dispatch_mat3 | ( | const string & | opt, |
const string & | arg, | ||
void * | var | ||
) | [static, protected] |
Takes a series of 9 numbers as a 3x3 matrix.
Definition at line 184 of file imageTransformColors.cxx.
bool ImageTransformColors::dispatch_mat4 | ( | const string & | opt, |
const string & | arg, | ||
void * | var | ||
) | [static, protected] |
Takes a series of 16 numbers as a 4x4 matrix.
Definition at line 139 of file imageTransformColors.cxx.
bool ImageTransformColors::dispatch_range | ( | const string & | opt, |
const string & | arg, | ||
void * | var | ||
) | [static, protected] |
Takes a min,max dynamic range.
Definition at line 222 of file imageTransformColors.cxx.
References LMatrix4d::scale_mat(), and LMatrix4d::translate_mat().
bool ImageTransformColors::dispatch_scale | ( | const string & | opt, |
const string & | arg, | ||
void * | var | ||
) | [static, protected] |
Accepts a componentwise scale.
Definition at line 253 of file imageTransformColors.cxx.
References LMatrix4d::scale_mat().
Filename ImageTransformColors::get_output_filename | ( | const Filename & | source_filename | ) | const [protected] |
Returns the output filename of the egg file with the given input filename.
This is based on the user's choice of -inplace, -o, or -d.
Definition at line 374 of file imageTransformColors.cxx.
bool ImageTransformColors::handle_args | ( | ProgramBase::Args & | args | ) | [protected, virtual] |
Does something with the additional arguments on the command line (after all the -options have been parsed).
Returns true if the arguments are good, false otherwise.
Reimplemented from ProgramBase.
Definition at line 320 of file imageTransformColors.cxx.
void ImageTransformColors::process_image | ( | PNMImage & | image | ) | [protected] |
Processes a single image in-place.
Definition at line 475 of file imageTransformColors.cxx.
References PNMImageHeader::get_x_size(), PNMImage::get_xel(), PNMImageHeader::get_y_size(), PNMImage::set_xel(), and LMatrix4d::xform_point().