Panda3D
imageWriter.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 imageWriter.h
10  * @author drose
11  * @date 2000-06-19
12  */
13 
14 #ifndef IMAGEWRITER_H
15 #define IMAGEWRITER_H
16 
17 #include "pandatoolbase.h"
18 #include "imageBase.h"
19 #include "withOutputFile.h"
20 
21 #include "filename.h"
22 
23 /**
24  * This is the base class for a program that generates an image file output,
25  * but doesn't read any for input.
26  */
27 class ImageWriter : virtual public ImageBase, public WithOutputFile {
28 public:
29  ImageWriter(bool allow_last_param);
30 
31  INLINE void write_image();
32  void write_image(const PNMImage &image);
33 
34 protected:
35  virtual bool handle_args(Args &args);
36 };
37 
38 #include "imageWriter.I"
39 
40 #endif
imageWriter.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
WithOutputFile
This is the bare functionality (intended to be inherited from along with ProgramBase or some derivati...
Definition: withOutputFile.h:29
ImageWriter
This is the base class for a program that generates an image file output, but doesn't read any for in...
Definition: imageWriter.h:27
filename.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PNMImage
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
pdeque< std::string >
ImageBase
This specialization of ProgramBase is intended for programs that read and/or write a single image fil...
Definition: imageBase.h:31
ImageWriter::ImageWriter
ImageWriter(bool allow_last_param)
Image-writing type programs *must* specify their output file using -o.
Definition: imageWriter.cxx:20
ImageWriter::write_image
void write_image()
Writes the generated to the user's specified output filename.
Definition: imageWriter.I:18
pandatoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
imageBase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
withOutputFile.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.