00001 // Filename: imageWriter.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 IMAGEWRITER_H 00016 #define IMAGEWRITER_H 00017 00018 #include "pandatoolbase.h" 00019 #include "imageBase.h" 00020 #include "withOutputFile.h" 00021 00022 #include "filename.h" 00023 00024 //////////////////////////////////////////////////////////////////// 00025 // Class : ImageWriter 00026 // Description : This is the base class for a program that generates 00027 // an image file output, but doesn't read any for input. 00028 //////////////////////////////////////////////////////////////////// 00029 class ImageWriter : virtual public ImageBase, public WithOutputFile { 00030 public: 00031 ImageWriter(bool allow_last_param); 00032 00033 INLINE void write_image(); 00034 void write_image(const PNMImage &image); 00035 00036 protected: 00037 virtual bool handle_args(Args &args); 00038 }; 00039 00040 #include "imageWriter.I" 00041 00042 #endif 00043 00044