** Date Started: April 2000
**
** This is part of the CTSim program
-** Copyright (C) 1983-2009 Kevin Rosenberg
+** Copyright (C) 1983-2010 Kevin Rosenberg
**
** 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
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, O_FORMAT_RAW };
+enum { O_FORMAT_PNG, O_FORMAT_PNG16, O_FORMAT_PGM, O_FORMAT_PGMASC, O_FORMAT_RAW, O_FORMAT_TEXT };
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_TEXT_STR[]="text";
static const char O_FORMAT_RAW_STR[]="raw";
void
std::cout << " --format Output format\n";
std::cout << " pgm PGM (portable graymap) format (default)\n";
std::cout << " pgmasc PGM (portable graymap) ASCII format\n";
+ std::cout << " text Text format\n";
+ std::cout << " raw Raw format\n";
#ifdef HAVE_PNG
std::cout << " png PNG (8-bit) format\n";
std::cout << " png16 PNG (16-bit) format\n";
int opt_center = O_CENTER_MEDIAN;
int opt_format = O_FORMAT_PGM;
int opt_labels = 0;
-
+ UNUSED(opt_verbose);
+ UNUSED(opt_debug);
+
while (1)
{
int c = getopt_long (argc, argv, "", my_options, NULL);
else if (strcmp(optarg, O_FORMAT_PNG16_STR) == 0)
opt_format = O_FORMAT_PNG16;
#endif
+ else if (strcmp(optarg, O_FORMAT_TEXT_STR) == 0)
+ opt_format = O_FORMAT_TEXT;
else if (strcmp(optarg, O_FORMAT_RAW_STR) == 0)
opt_format = O_FORMAT_RAW;
#if HAVE_GIF
else if (opt_format == O_FORMAT_GIF)
im.writeImageGIF (out_file, opt_scale, opt_scale, densmin, densmax);
#endif
+ else if (opt_format == O_FORMAT_TEXT)
+ im.writeImageText (out_file);
else if (opt_format == O_FORMAT_RAW)
im.writeImageRaw (out_file, opt_scale, opt_scale);
else