diff options
author | June McEnroe <programble@gmail.com> | 2018-02-20 18:30:34 -0500 |
---|---|---|
committer | June McEnroe <programble@gmail.com> | 2018-02-20 18:30:34 -0500 |
commit | 4a9dc0f45e950d6aae49a3613698f8088d9e141f (patch) | |
tree | 51a88caf3cf147db67e648fda12f4cab287dd303 | |
parent | Reduce bit depth in pngo (diff) | |
download | src-4a9dc0f45e950d6aae49a3613698f8088d9e141f.tar.gz src-4a9dc0f45e950d6aae49a3613698f8088d9e141f.zip |
Take multiple inputs to pngo
-rw-r--r-- | bin/pngo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/pngo.c b/bin/pngo.c index 607df8f8..f19c468d 100644 --- a/bin/pngo.c +++ b/bin/pngo.c @@ -670,11 +670,11 @@ int main(int argc, char *argv[]) { } } - if (optind < argc) { - if (output || stdio) { - optimize(argv[optind], output); - } else { - optimize(argv[optind], argv[optind]); + if (argc - optind == 1 && (output || stdio)) { + optimize(argv[optind], output); + } else if (optind < argc) { + for (int i = optind; i < argc; ++i) { + optimize(argv[i], argv[i]); } } else { optimize(NULL, output); |