diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fractal_render.c | 3 | ||||
| -rw-r--r-- | src/renderers.c | 5 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/fractal_render.c b/src/fractal_render.c index 721d3f2..fe25f12 100644 --- a/src/fractal_render.c +++ b/src/fractal_render.c @@ -21,8 +21,7 @@ void print_help(){ " -r, --renderer <renderer> the renderer to use, defaults to the text renderer\n" " renderers: txt, png, gif (TODO, with additional features)\n" " -d, --delay <delay> the delay between animation frames in 1/100 s\n" - " -o, --output <output file> the file to output the result of rendering, if not given defaults to output.<EXT>\n" - " where <EXT> is the renderer used\n" + " -o, --output <output file> the file to output the result of rendering, if not given defaults to fractal.out\n" " -v, --verbose verbose output\n" " -h, --help prints this help and exits\n" ); diff --git a/src/renderers.c b/src/renderers.c index 2955fb2..372d7a2 100644 --- a/src/renderers.c +++ b/src/renderers.c @@ -51,10 +51,11 @@ gdImagePtr converter(const grid_t* grid){ gdImagePtr img = gdImageCreate(width, height); int colors[256]; for(size_t i = 0; i < 255; i++){ - colors[i] = gdImageColorAllocate(img, 0, i, i/2); + colors[i] = gdImageColorAllocate(img, 0, 255-i, (255-i)/2); } colors[255] = gdImageColorAllocate(img, 0, 0, 0); + for(size_t y = 0; y < height; y++){ for(size_t x = 0; x < width; x++){ byte iteration = data[y * width + x]; @@ -82,7 +83,7 @@ void render_gif(FILE* output, const renderer_params* params){ gdImagePtr imgs[size]; imgs[0] = converter(grids[0]); - gdImageGifAnimBegin(imgs[0], output, 1, -1); + gdImageGifAnimBegin(imgs[0], output, 1, 0); gdImageGifAnimAdd(imgs[0], output, 0, 0, 0, delay, 1, NULL); for(size_t i = 1; i < size; i++){ |
