diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 30 |
1 files changed, 29 insertions, 1 deletions
@@ -15,10 +15,36 @@ static void usage(void); void usage(void) { - fprintf(stderr, "Usage: dsco [INPUT] -f [edge|blur] [-o OUTPUT]\n"); + fprintf(stderr, "Usage: dsco [INPUT] -f [edge|blur|sharpen] [-o OUTPUT]\n"); exit(1); } +void +help(void) +{ + fprintf(stdout, + "Usage:\n" + " dsco [INPUT] -f [edge|blur|sharpen] [-o OUTPUT]\n" + "\n" + "Options:\n" + " -o output file [default: /dev/stdout] \n" + " -f filter to use\n" + "\n" + " edge: -1 -1 -1\n" + " -1 8 -1\n" + " -1 -1 -1\n" + "\n" + " sharpen: 0 -1 0\n" + " -1 5 -1\n" + " 0 -1 0\n" + "\n" + " blur: 1 2 1\n" + " 1/16 2 4 2\n" + " 1 2 1\n" + ); + exit(0); +} + Image image_convolution(Image input, float kernel[9]) { @@ -138,6 +164,8 @@ int main(int argc, char *argv[]) case 0: in_file = cli_arg; break; + case 'h': + help(); default: usage(); } |