From f1e18b157c28d68ef67dcf7e617226824df1c323 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Fri, 13 Feb 2015 13:30:34 +0100 Subject: Drop support for jpeg/netpbm output --- flam3-animate.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) (limited to 'flam3-animate.c') diff --git a/flam3-animate.c b/flam3-animate.c index 267064c..eb9eb50 100644 --- a/flam3-animate.c +++ b/flam3-animate.c @@ -32,7 +32,7 @@ int main(int argc, char **argv) { int write_genome = argi("write_genome",0); double qs = argf("qs", 1.0); double ss = argf("ss", 1.0); - char *format = getenv("format"); + const char *format = "png"; int verbose = argi("verbose", 1); int transparency = argi("transparency", 0); int bits = argi("bits", 33); @@ -96,15 +96,6 @@ int main(int argc, char **argv) { first_frame = last_frame = frame_time; } - if (NULL == format) format = "png"; - if (strcmp(format, "jpg") && - strcmp(format, "ppm") && - strcmp(format, "png")) { - fprintf(stderr, "format must be either jpg, ppm, or png, not %s.\n", format); - exit(1); - } - - if (pixel_aspect <= 0.0) { fprintf(stderr, "pixel aspect ratio must be positive, not %g.\n", pixel_aspect); @@ -277,22 +268,7 @@ int main(int argc, char **argv) { sprintf(rtime_string,"%d",stats.render_seconds); fpc.rtime = rtime_string; - if (!strcmp(format, "png")) { - - write_png(fp, image, cps[0].width, cps[0].height, &fpc, f.bytes_per_channel); - - } else if (!strcmp(format, "jpg")) { - - write_jpeg(fp, image, cps[0].width, cps[0].height, &fpc); - - } else { - int size = 3 * cps[0].width * cps[0].height; - fprintf(fp, "P6\n"); - fprintf(fp, "%d %d\n255\n", cps[0].width, cps[0].height); - if (size != fwrite(image, 1, size, fp)) { - perror(fname); - } - } + write_png(fp, image, cps[0].width, cps[0].height, &fpc, f.bytes_per_channel); /* Free string */ free(fpc.genome); -- cgit v1.2.3