]> git.imager.perl.org - imager.git/commitdiff
[rt #97086] initialize the blue entry in each palette entry
authorTony Cook <tony@develop-help.com>
Tue, 15 Jul 2014 12:50:52 +0000 (22:50 +1000)
committerTony Cook <tony@develop-help.com>
Tue, 15 Jul 2014 12:50:52 +0000 (22:50 +1000)
and fill up to the top of the range in luminosity

Mandelbrot/Mandelbrot.pm
Mandelbrot/mandel.c
dynfilt/mandelbrot.c

index 4b99c4ee7aa6b10e73bab033f91a0d7c46b365b3..2480f62d4fecf40e36c8fbc85433df6e1c3ba79c 100644 (file)
@@ -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);
index ee23666923398ffd54ad5d679d27bd006ead8725..e3de9d9360f3d828db6bb31c5c6469393287a38d 100644 (file)
@@ -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;
index 9eba8bab67bf1b5716a31a706095566de8f75c7c..a323d31a5d5ba3508ab0de8ea06bf58049454f54 100644 (file)
@@ -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;