From: Tony Cook Date: Tue, 15 Jul 2014 12:50:52 +0000 (+1000) Subject: [rt #97086] initialize the blue entry in each palette entry X-Git-Tag: v0.99_02~6 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/ce2d9ae20898bb026e5d8131928247ba2e4a5b97 [rt #97086] initialize the blue entry in each palette entry and fill up to the top of the range in luminosity --- diff --git a/Mandelbrot/Mandelbrot.pm b/Mandelbrot/Mandelbrot.pm index 4b99c4ee..2480f62d 100644 --- a/Mandelbrot/Mandelbrot.pm +++ b/Mandelbrot/Mandelbrot.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.03"; + $VERSION = "0.04"; require XSLoader; XSLoader::load('Imager::Filter::Mandelbrot', $VERSION); diff --git a/Mandelbrot/mandel.c b/Mandelbrot/mandel.c index ee236669..e3de9d93 100644 --- a/Mandelbrot/mandel.c +++ b/Mandelbrot/mandel.c @@ -44,14 +44,14 @@ mandelbrot(i_img *im, double minx, double miny, double maxx, double maxy, int ma i_color icl[256]; srand(12235); for(i=1;i<256; i++) { - icl[i].rgb.r = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); - icl[i].rgb.g = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); - icl[i].rgb.g = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.r = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.g = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.b = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); } icl[0].rgb.r = 0; icl[0].rgb.g = 0; - icl[0].rgb.g = 0; + icl[0].rgb.b = 0; if (maxx <= minx) maxx = minx + 1.0; diff --git a/dynfilt/mandelbrot.c b/dynfilt/mandelbrot.c index 9eba8bab..a323d31a 100644 --- a/dynfilt/mandelbrot.c +++ b/dynfilt/mandelbrot.c @@ -50,14 +50,14 @@ void mandlebrot(void *INP) { i_color icl[256]; srand(12235); for(i=1;i<256; i++) { - icl[i].rgb.r = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); - icl[i].rgb.g = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); - icl[i].rgb.g = 100+(int) (155.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.r = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.g = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); + icl[i].rgb.b = 100+(int) (156.0*rand()/(RAND_MAX+1.0)); } icl[0].rgb.r = 0; icl[0].rgb.g = 0; - icl[0].rgb.g = 0; + icl[0].rgb.b = 0;