Panda3D
Loading...
Searching...
No Matches
imageReader.cxx
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 imageReader.cxx
10 * @author drose
11 * @date 2000-06-19
12 */
13
14#include "imageReader.h"
15
16/**
17 *
18 */
19ImageReader::
20ImageReader() {
21 clear_runlines();
22 add_runline("[opts] imagename");
23}
24
25/**
26 *
27 */
28bool ImageReader::
29handle_args(ProgramBase::Args &args) {
30 if (args.empty()) {
31 nout << "You must specify the image file to read on the command line.\n";
32 return false;
33 }
34
35 if (args.size() > 1) {
36 nout << "Specify only one image on the command line.\n";
37 return false;
38 }
39
40 if (!_image.read(args[0])) {
41 nout << "Unable to read image file " << args[0] << ".\n";
42 exit(1);
43 }
44
45 return true;
46}
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.