projects
/
ctsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r614: no message
[ctsim.git]
/
tools
/
ifexport.cpp
diff --git
a/tools/ifexport.cpp
b/tools/ifexport.cpp
index 0ccd6d6921fd54d856ec1850dff395a87f53a3c7..87603323b143673c0fd248bd3fc38120e01cc5dd 100644
(file)
--- a/
tools/ifexport.cpp
+++ b/
tools/ifexport.cpp
@@
-9,7
+9,7
@@
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ifexport.cpp,v 1.
2 2000/12/17 23:00:33
kevin Exp $
+** $Id: ifexport.cpp,v 1.
3 2001/01/09 22:31:47
kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
@@
-48,7
+48,7
@@
static struct option my_options[] =
{0, 0, 0, 0}
};
{0, 0, 0, 0}
};
-static const char* g_szIdStr = "$Id: ifexport.cpp,v 1.
2 2000/12/17 23:00:33
kevin Exp $";
+static const char* g_szIdStr = "$Id: ifexport.cpp,v 1.
3 2001/01/09 22:31:47
kevin Exp $";
enum { O_AUTO_FULL, O_AUTO_STD0_1, O_AUTO_STD0_5, O_AUTO_STD1, O_AUTO_STD2, O_AUTO_STD3 };
static const char O_AUTO_FULL_STR[]="full";
enum { O_AUTO_FULL, O_AUTO_STD0_1, O_AUTO_STD0_5, O_AUTO_STD1, O_AUTO_STD2, O_AUTO_STD3 };
static const char O_AUTO_FULL_STR[]="full";
@@
-63,13
+63,11
@@
static const char O_CENTER_MEAN_STR[]="mean";
static const char O_CENTER_MODE_STR[]="mode";
static const char O_CENTER_MEDIAN_STR[]="median";
static const char O_CENTER_MODE_STR[]="mode";
static const char O_CENTER_MEDIAN_STR[]="median";
-enum { O_FORMAT_GIF, O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC, O_FORMAT_DISP };
-static const char O_FORMAT_GIF_STR[]="gif";
+enum { O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC };
static const char O_FORMAT_PNG_STR[]="png" ;
static const char O_FORMAT_PNG16_STR[]="png16" ;
static const char O_FORMAT_PGM_STR[]="pgm";
static const char O_FORMAT_PGMASC_STR[]="pgmasc";
static const char O_FORMAT_PNG_STR[]="png" ;
static const char O_FORMAT_PNG16_STR[]="png16" ;
static const char O_FORMAT_PGM_STR[]="pgm";
static const char O_FORMAT_PGMASC_STR[]="pgmasc";
-static const char O_FORMAT_DISP_STR[]="disp";
void
ifexport_usage (const char *program)
void
ifexport_usage (const char *program)
@@
-86,10
+84,6
@@
ifexport_usage (const char *program)
std::cout << " png PNG (8-bit) format\n";
std::cout << " png16 PNG (16-bit) format\n";
#endif
std::cout << " png PNG (8-bit) format\n";
std::cout << " png16 PNG (16-bit) format\n";
#endif
-#if HAVE_G2
- std::cout << " gif GIF format\n";
-#endif
- std::cout << " disp Display on screen\n";
std::cout << " --center Center of window\n";
std::cout << " median Median is center of window (default)\n";
std::cout << " mode Mode is center of window\n";
std::cout << " --center Center of window\n";
std::cout << " median Median is center of window (default)\n";
std::cout << " mode Mode is center of window\n";
@@
-222,9
+216,7
@@
ifexport_main (int argc, char *const argv[])
else if (strcmp(optarg, O_FORMAT_GIF_STR) == 0)
opt_format = O_FORMAT_GIF;
#endif
else if (strcmp(optarg, O_FORMAT_GIF_STR) == 0)
opt_format = O_FORMAT_GIF;
#endif
- else if (strcmp(optarg, O_FORMAT_DISP_STR) == 0)
- opt_format = O_FORMAT_DISP;
- else {
+ else {
sys_error (ERR_SEVERE, "Invalid format mode %s", optarg);
ifexport_usage(argv[0]);
return (1);
sys_error (ERR_SEVERE, "Invalid format mode %s", optarg);
ifexport_usage(argv[0]);
return (1);
@@
-259,22
+251,13
@@
ifexport_main (int argc, char *const argv[])
}
}
}
}
-#if HAVE_SGP
- if (optind + 1 == argc)
- opt_format = O_FORMAT_DISP; // display image if no options
-#endif
-
- if ((opt_format == O_FORMAT_DISP && optind + 1 != argc)
- || (opt_format != O_FORMAT_DISP && optind + 2 != argc)) {
+ if (optind + 2 != argc) {
ifexport_usage(argv[0]);
return (1);
}
in_file = argv[optind];
ifexport_usage(argv[0]);
return (1);
}
in_file = argv[optind];
-
- if (opt_format != O_FORMAT_DISP)
- out_file = argv[optind+1];
- else out_file = NULL;
+ out_file = argv[optind+1];
pim = new ImageFile ();
ImageFile& im = *pim;
pim = new ImageFile ();
ImageFile& im = *pim;
@@
-364,13
+347,6
@@
ifexport_main (int argc, char *const argv[])
else if (opt_format == O_FORMAT_GIF)
im.writeImageGIF (out_file, opt_scale, opt_scale, densmin, densmax);
#endif
else if (opt_format == O_FORMAT_GIF)
im.writeImageGIF (out_file, opt_scale, opt_scale, densmin, densmax);
#endif
- else if (opt_format == O_FORMAT_DISP) {
-#if HAVE_SGP
- im.displayScaling (opt_scale, densmin, densmax);
- std::cout << "Press enter to continue\n";
- cio_kb_getc();
-#endif
- }
else
{
sys_error (ERR_SEVERE, "Internal Error: Invalid format mode %d", opt_format);
else
{
sys_error (ERR_SEVERE, "Internal Error: Invalid format mode %d", opt_format);