123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include <stdio.h>
- #include <unistd.h>
- #include <libnet.h>
- #include "util.h"
- #include "postprocess.h"
- int
- main(int argc, char *argv[])
- {
- int opt;
- int verbose = 0;
- int quality = 90;
- char *input_path;
- char *output_path;
- while ((opt = getopt(argc, argv, "vq:")) != -1) {
- switch (opt) {
- case 'v':
- verbose = 1;
- break;
- case 'q':
- quality = atoi(optarg);
- break;
- case 'i':
- printf("input: %s\n", argv[optind]);
- input_path = argv[optind];
- break;
- case 'o':
- printf("output: %s\n", argv[optind]);
- output_path = argv[optind];
- break;
- case '?':
- printf("WTF\n");
- break;
- }
- }
- input_path = argv[optind];
- output_path = argv[optind + 1];
- postprocess_setup();
- postprocess_single(input_path, output_path, quality, verbose);
- return 0;
- }
|