From b358966b64ccf5b25a8e5f92e0e2c15901454652 Mon Sep 17 00:00:00 2001 From: Erik Reckase Date: Sun, 21 Nov 2010 02:05:12 +0000 Subject: 16 bpc PNG images were not being written properly when strips were being used. while png_set_swap() is supposed to tell the system to reverse the order of the bits when writing the file, I was unable to get this to work, so I resorted to a brute-force reversal of the bits - but then forgot to put the bits BACK. This is not a problem for single strips, but with multiple strips things get very confused. png_set_swap would make this a non-issue. git-svn-id: https://flam3.googlecode.com/svn/trunk@88 77852712-ef1d-11de-8684-7d64432d61a3 --- src/flam3-animate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/flam3-animate.c') diff --git a/src/flam3-animate.c b/src/flam3-animate.c index 7f00676..402e3ee 100644 --- a/src/flam3-animate.c +++ b/src/flam3-animate.c @@ -213,9 +213,9 @@ int main(int argc, char **argv) { f.bytes_per_channel = 1; - image = (void *) malloc((size_t)channels * + image = (void *) calloc((size_t)channels * (size_t)cps[0].width * - (size_t)cps[0].height * f.bytes_per_channel); + (size_t)cps[0].height * f.bytes_per_channel, sizeof(char)); if (dtime < 1) { fprintf(stderr, "dtime must be positive, not %d.\n", dtime); -- cgit v1.2.3