00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #include "imageReader.h"
00016
00017
00018
00019
00020
00021
00022 ImageReader::
00023 ImageReader() {
00024 clear_runlines();
00025 add_runline("[opts] imagename");
00026 }
00027
00028
00029
00030
00031
00032
00033 bool ImageReader::
00034 handle_args(ProgramBase::Args &args) {
00035 if (args.empty()) {
00036 nout << "You must specify the image file to read on the command line.\n";
00037 return false;
00038 }
00039
00040 if (args.size() > 1) {
00041 nout << "Specify only one image on the command line.\n";
00042 return false;
00043 }
00044
00045 if (!_image.read(args[0])) {
00046 nout << "Unable to read image file " << args[0] << ".\n";
00047 exit(1);
00048 }
00049
00050 return true;
00051 }