Panda3D
imageFilter.cxx
1 // Filename: imageFilter.cxx
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 #include "imageFilter.h"
16 
17 ////////////////////////////////////////////////////////////////////
18 // Function: ImageFilter::Constructor
19 // Access: Public
20 // Description:
21 ////////////////////////////////////////////////////////////////////
22 ImageFilter::
23 ImageFilter(bool allow_last_param) :
24  ImageWriter(allow_last_param)
25 {
26  clear_runlines();
27  if (_allow_last_param) {
28  add_runline("[opts] inputimage outputimage");
29  }
30  add_runline("[opts] -o outputimage inputimage");
31 }
32 
33 ////////////////////////////////////////////////////////////////////
34 // Function: ImageFilter::handle_args
35 // Access: Protected, Virtual
36 // Description: Does something with the additional arguments on the
37 // command line (after all the -options have been
38 // parsed). Returns true if the arguments are good,
39 // false otherwise.
40 ////////////////////////////////////////////////////////////////////
41 bool ImageFilter::
42 handle_args(ProgramBase::Args &args) {
43  if (!check_last_arg(args, 1)) {
44  return false;
45  }
46 
47  return ImageReader::handle_args(args);
48 }
This is the base class for a program that generates an image file output, but doesn't read any for in...
Definition: imageWriter.h:29