+ * commandline help
+ */
+static void print_help(const char *app)
+{
+ printf("Colorize version %s\n\n",
+#include "../version.h"
+ );
+ printf("Usage: %s [options] [<image file>]\n", app);
+ printf(" Run colorize editor optionally with given image file.\n");
+ printf("\nOptions:\n");
+ printf(" -h --help This help\n");
+ printf(" -O --output-prefix <path>/<prefix> Store rendered image using this prefix instead of \"colorized_\"\n");
+}
+
+/*
+ * command line options
+ */
+static int handle_options(int argc, char **argv)
+{
+ int skip_args = 0;
+
+ while (1) {
+ int option_index = 0, c;
+ static struct option long_options[] = {
+ {"help", 0, 0, 'h'},
+ {"output-prefix", 1, 0, 'O'},
+ {0, 0, 0, 0},
+ };
+
+ c = getopt_long(argc, argv, "hO:", long_options, &option_index);
+
+ if (c == -1)
+ break;
+
+ switch (c) {
+ case 'h':
+ print_help(argv[0]);
+ exit(0);
+ case 'O':
+ strcpy(output_prefix, optarg);
+ skip_args += 2;
+ break;
+ default:
+ break;
+ }
+ }
+
+ return skip_args;
+}
+
+/*