gimp r24617 - in branches/gimp-2-4: . plug-ins/common plug-ins/script-fu/scripts



Author: neo
Date: Tue Jan 15 12:27:34 2008
New Revision: 24617
URL: http://svn.gnome.org/viewvc/gimp?rev=24617&view=rev

Log:
2008-01-15  Sven Neumann  <sven gimp org>

	Merged from trunk:

	* plug-ins/common/bumpmap.c
	* plug-ins/script-fu/scripts/swirltile.scm: applied patch from
	Ulf-D. Ehlert that catches a potential division by zero in the
	Bumpmap plug-in and adjusts the range of the Depth parameter in
	the Swirl-Tile script (bug #509608).


Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/plug-ins/common/bumpmap.c
   branches/gimp-2-4/plug-ins/script-fu/scripts/swirltile.scm

Modified: branches/gimp-2-4/plug-ins/common/bumpmap.c
==============================================================================
--- branches/gimp-2-4/plug-ins/common/bumpmap.c	(original)
+++ branches/gimp-2-4/plug-ins/common/bumpmap.c	Tue Jan 15 12:27:34 2008
@@ -350,7 +350,6 @@
           bmvals.azimuth    = param[4].data.d_float;
           bmvals.elevation  = param[5].data.d_float;
           bmvals.depth      = param[6].data.d_int32;
-          bmvals.depth      = param[6].data.d_int32;
           bmvals.xofs       = param[7].data.d_int32;
           bmvals.yofs       = param[8].data.d_int32;
           bmvals.waterlevel = param[9].data.d_int32;
@@ -557,7 +556,8 @@
   lz         = sin (elevation) * 255.0;
 
   /* Calculate constant Z component of surface normal */
-  nz           = (6 * 255) / bmvals.depth;
+  /*              (depth may be 0 if non-interactive) */
+  nz           = (6 * 255) / MAX (bmvals.depth, 1);
   params->nz2  = nz * nz;
   params->nzlz = nz * lz;
 

Modified: branches/gimp-2-4/plug-ins/script-fu/scripts/swirltile.scm
==============================================================================
--- branches/gimp-2-4/plug-ins/script-fu/scripts/swirltile.scm	(original)
+++ branches/gimp-2-4/plug-ins/script-fu/scripts/swirltile.scm	Tue Jan 15 12:27:34 2008
@@ -54,7 +54,7 @@
   "Adrian Likins"
   "1997"
   ""
-  SF-ADJUSTMENT _"Depth"           '(10 0 64 1 1 0 0)
+  SF-ADJUSTMENT _"Depth"           '(10 1 64 1 1 0 0)
   SF-ADJUSTMENT _"Azimuth"          '(135 0 360 1 10 0 0)
   SF-ADJUSTMENT _"Elevation"        '(45 0 90 1 10 0 0)
   SF-ADJUSTMENT _"Blur radius"      '(3 0 128 1 10 0 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]