Commit 877cc29d authored by Povilas Kanapickas's avatar Povilas Kanapickas

scanimage: Raise an error if --format option is an unknown format

parent 5dbd51d1
......@@ -2093,8 +2093,23 @@ main (int argc, char **argv)
exit(1);
#endif
}
else
output_format = OUTPUT_PNM;
else if (strcmp (optarg, "pnm") == 0)
{
output_format = OUTPUT_PNM;
}
else
{
fprintf(stderr, "Unknown output image format '%s'.\n", optarg);
fprintf(stderr, "Supported formats: pnm, tiff");
#ifdef HAVE_LIBPNG
fprintf(stderr, ", png");
#endif
#ifdef HAVE_LIBJPEG
fprintf(stderr, ", jpeg");
#endif
fprintf(stderr, ".\n");
exit(1);
}
break;
case OPTION_MD5:
accept_only_md5_auth = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment