X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fifexport.cpp;h=245d34c24c931834791b9428ca98c671b68b28bc;hp=87603323b143673c0fd248bd3fc38120e01cc5dd;hb=8a7697ce57b56cdc43698cd1241ad98d49f9b5ac;hpb=36c820a392f2e9e023d373aaf46e8bfb6018bdd4 diff --git a/tools/ifexport.cpp b/tools/ifexport.cpp index 8760332..245d34c 100644 --- 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 ** -** $Id: ifexport.cpp,v 1.3 2001/01/09 22:31:47 kevin Exp $ +** $Id$ ** ** 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} }; -static const char* g_szIdStr = "$Id: ifexport.cpp,v 1.3 2001/01/09 22:31:47 kevin Exp $"; +static const char* g_szIdStr = "$Id$"; 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,11 +63,12 @@ static const char O_CENTER_MEAN_STR[]="mean"; static const char O_CENTER_MODE_STR[]="mode"; static const char O_CENTER_MEDIAN_STR[]="median"; -enum { O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC }; +enum { O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC, O_FORMAT_RAW }; 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_RAW_STR[]="raw"; void ifexport_usage (const char *program) @@ -212,6 +213,8 @@ ifexport_main (int argc, char *const argv[]) else if (strcmp(optarg, O_FORMAT_PNG16_STR) == 0) opt_format = O_FORMAT_PNG16; #endif + else if (strcmp(optarg, O_FORMAT_RAW_STR) == 0) + opt_format = O_FORMAT_RAW; #if HAVE_GIF else if (strcmp(optarg, O_FORMAT_GIF_STR) == 0) opt_format = O_FORMAT_GIF; @@ -347,6 +350,8 @@ 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_RAW) + im.writeImageRaw (out_file, opt_scale, opt_scale); else { sys_error (ERR_SEVERE, "Internal Error: Invalid format mode %d", opt_format);