summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-02-15 19:47:09 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-05-02 21:36:45 +0200
commit215dcd3d466303b39f8912602be039a7a3aefe5c (patch)
treeec7bbc2b809ca35d3efc721c801772fbf3dcce90
parent716eacfc7c2301fa20fdc71d473d4def8f790adb (diff)
downloadpucket-215dcd3d466303b39f8912602be039a7a3aefe5c.tar.gz
pucket-215dcd3d466303b39f8912602be039a7a3aefe5c.tar.bz2
pucket-215dcd3d466303b39f8912602be039a7a3aefe5c.zip
render: Add oversample argument
-rw-r--r--main.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/main.c b/main.c
index 72c147b..ec70e49 100644
--- a/main.c
+++ b/main.c
@@ -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";