**
** 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
-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_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";
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 << " --format Output format\n";
std::cout << " pgm PGM (portable graymap) format (default)\n";
std::cout << " pgmasc PGM (portable graymap) ASCII format\n";
while (1)
{
int c = getopt_long (argc, argv, "", my_options, NULL);
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_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_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_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
else if (opt_format == O_FORMAT_RAW)
im.writeImageRaw (out_file, opt_scale, opt_scale);
else