diff options
-rw-r--r-- | main.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -33,7 +33,7 @@ const char *argp_program_version = typedef struct { bool verbose; - unsigned int threads, bpc, quality; + unsigned int threads, bpc, quality, oversample; float scale; bool transparent; } render_arguments; @@ -52,6 +52,16 @@ static error_t parse_render_opt (int key, char *arg, break; } + case 'o': { + int i = atoi (arg); + if (i < 1) { + argp_error (state, "Oversample must be >= 1"); + } else { + arguments->oversample = i; + } + break; + } + case 'q': { int i = atoi (arg); if (i < 1) { @@ -117,6 +127,7 @@ static void do_render (const render_arguments * const arguments) { genome->height *= arguments->scale; genome->width *= arguments->scale; genome->pixels_per_unit *= arguments->scale; + genome->spatial_oversample = arguments->oversample; flam3_frame f; f.genomes = genome; @@ -406,6 +417,7 @@ int main (int argc, char **argv) { {"scale", 's', "factor", 0, "Scale image dimensions by factor (1.0)" }, {"bpc", 'b', "8|16", 0, "Bits per channel of output image (8)" }, {"quality", 'q', "num", 0, "Average samples per pixel (100)" }, + {"oversample", 'o', "num", 0, "Super-/Oversample image (1)" }, { 0 }, }; const char doc[] = "vlame3-render -- a fractal flame renderer"; |