Panda3D
Loading...
Searching...
No Matches
imageTransformColors.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file imageTransformColors.h
10 * @author drose
11 * @date 2009-03-25
12 */
13
14#ifndef IMAGETRANSFORMCOLORS_H
15#define IMAGETRANSFORMCOLORS_H
16
17#include "pandatoolbase.h"
18#include "programBase.h"
19#include "pvector.h"
20#include "filename.h"
21#include "luse.h"
22
23class PNMImage;
24
25/**
26 * This program can apply a 4x4 color transform to all of the colors in the
27 * pixels of a series of images.
28 */
30public:
32
33 void run();
34
35protected:
36 static bool dispatch_mat4(const std::string &opt, const std::string &arg, void *var);
37 static bool dispatch_mat3(const std::string &opt, const std::string &arg, void *var);
38 static bool dispatch_range(const std::string &opt, const std::string &arg, void *var);
39 static bool dispatch_scale(const std::string &opt, const std::string &arg, void *var);
40 static bool dispatch_add(const std::string &opt, const std::string &arg, void *var);
41
42 virtual bool handle_args(Args &args);
43 Filename get_output_filename(const Filename &source_filename) const;
44
45 void process_image(PNMImage &image);
46
47private:
48 bool _hls;
49 LMatrix4d _mat;
50
51 bool _got_output_filename;
52 Filename _output_filename;
53 bool _got_output_dirname;
54 Filename _output_dirname;
55 bool _inplace;
56
58 Filenames _filenames;
59};
60
62
63#endif
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
This program can apply a 4x4 color transform to all of the colors in the pixels of a series of images...
The name of this class derives from the fact that we originally implemented it as a layer on top of t...
Definition pnmImage.h:58
This is intended to be the base class for most general-purpose utility programs in the PANDATOOL tree...
Definition programBase.h:34
This is our own Panda specialization on the default STL vector.
Definition pvector.h:42
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.