diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-06-22 08:06:52 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-06-22 08:06:52 -0500 |
commit | e2fc6fcd524bbd3762ab57155bd515ce690adf51 (patch) | |
tree | dd0f3fd2d6ac5ea92a0c8b7606362a30e8cc04ee /src/main.c | |
parent | 290aa13ddd8d05bde86f14a82cd76c18b4b8f082 (diff) |
doc: help message and README added
Diffstat (limited to 'src/main.c')
-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(); } |