gimp r24616 - in trunk: . plug-ins/common plug-ins/script-fu/scripts



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

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

	* 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:
   trunk/ChangeLog
   trunk/plug-ins/common/bumpmap.c
   trunk/plug-ins/script-fu/scripts/swirltile.scm

Modified: trunk/plug-ins/common/bumpmap.c
==============================================================================
--- trunk/plug-ins/common/bumpmap.c	(original)
+++ trunk/plug-ins/common/bumpmap.c	Tue Jan 15 12:26:03 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: trunk/plug-ins/script-fu/scripts/swirltile.scm
==============================================================================
--- trunk/plug-ins/script-fu/scripts/swirltile.scm	(original)
+++ trunk/plug-ins/script-fu/scripts/swirltile.scm	Tue Jan 15 12:26:03 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]