Panda3D
imageTrans.h
1 // Filename: imageTrans.h
2 // Created by: drose (19Jun00)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef IMAGETRANS_H
16 #define IMAGETRANS_H
17 
18 #include "pandatoolbase.h"
19 
20 #include "imageFilter.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : ImageTrans
24 // Description : A program to read an image file and write an
25 // equivalent image file, possibly performing some minor
26 // operations along the way.
27 ////////////////////////////////////////////////////////////////////
28 class ImageTrans : public ImageFilter {
29 public:
30  ImageTrans();
31 
32  void run();
33 
34 private:
35  static bool dispatch_channels(const string &opt, const string &arg, void *var);
36  void extract_alpha();
37 
38  enum Channels {
39  C_default,
40  C_l = 1,
41  C_la = 2,
42  C_rgb = 3,
43  C_rgba = 4,
44  C_r,
45  C_g,
46  C_b,
47  C_a
48  };
49 
50  Channels _channels;
51  LColor _color_scale;
52  bool _has_color_scale;
53  bool _flip, _mirror, _cw, _ccw;
54 };
55 
56 #endif
57 
A program to read an image file and write an equivalent image file, possibly performing some minor op...
Definition: imageTrans.h:28
This is the base class for a program that reads an image file, operates on it, and writes another ima...
Definition: imageFilter.h:29
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111