Panda3D
|
00001 // Filename: imageTrans.h 00002 // Created by: drose (19Jun00) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef IMAGETRANS_H 00016 #define IMAGETRANS_H 00017 00018 #include "pandatoolbase.h" 00019 00020 #include "imageFilter.h" 00021 00022 //////////////////////////////////////////////////////////////////// 00023 // Class : ImageTrans 00024 // Description : A program to read an image file and write an 00025 // equivalent image file, possibly performing some minor 00026 // operations along the way. 00027 //////////////////////////////////////////////////////////////////// 00028 class ImageTrans : public ImageFilter { 00029 public: 00030 ImageTrans(); 00031 00032 void run(); 00033 00034 private: 00035 static bool dispatch_channels(const string &opt, const string &arg, void *var); 00036 void extract_alpha(); 00037 00038 enum Channels { 00039 C_default, 00040 C_l = 1, 00041 C_la = 2, 00042 C_rgb = 3, 00043 C_rgba = 4, 00044 C_r, 00045 C_g, 00046 C_b, 00047 C_a 00048 }; 00049 00050 Channels _channels; 00051 LColor _color_scale; 00052 bool _has_color_scale; 00053 }; 00054 00055 #endif 00056