]> granicus.if.org Git - imagemagick/commitdiff
Fix compiler exception
authorCristy <urban-warrior@imagemagick.org>
Sun, 21 Feb 2016 18:17:36 +0000 (13:17 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sun, 21 Feb 2016 18:17:36 +0000 (13:17 -0500)
PerlMagick/Magick.xs
PerlMagick/quantum/quantum.xs.in

index 30ea5f72d9800b245611d0e13a0be8e0e9a57780..6d3b01177f28d2a405a72b6ab1cbcbd7f72e5104 100644 (file)
@@ -11328,12 +11328,14 @@ Mogrify(ref,...)
         case 145:  /* WaveletDenoise */
         {
           if (attribute_flag[0] == 0)
-            argument_list[0].string_reference="50%";
+            argument_list[0].string_reference="5%";
           if (attribute_flag[2] != 0)
             channel=(ChannelType) argument_list[2].integer_reference;
+          flags=ParseGeometry(argument_list[0].string_reference,&geometry_info);
+          if ((flags & PercentValue) != 0)
+            geometry_info.rho*=(double) (QuantumRange/100.0);
           channel_mask=SetImageChannelMask(image,channel);
-          image=WaveletDenoiseImage(image,argument_list[0].string_reference,
-            exception);
+          image=WaveletDenoiseImage(image,geometry_info.rho,exception);
           if (image != (Image *) NULL)
             (void) SetImageChannelMask(image,channel_mask);
           break;
index f9a65af4870d718796b35a268ec52e022a615333..661ee62f85f9f53e7246f4ca598b1723802b0248 100644 (file)
@@ -11328,12 +11328,14 @@ Mogrify(ref,...)
         case 145:  /* WaveletDenoise */
         {
           if (attribute_flag[0] == 0)
-            argument_list[0].string_reference="50%";
+            argument_list[0].string_reference="5%";
           if (attribute_flag[2] != 0)
             channel=(ChannelType) argument_list[2].integer_reference;
+          flags=ParseGeometry(argument_list[0].string_reference,&geometry_info);
+          if ((flags & PercentValue) != 0)
+            geometry_info.rho*=(double) (QuantumRange/100.0);
           channel_mask=SetImageChannelMask(image,channel);
-          image=WaveletDenoiseImage(image,argument_list[0].string_reference,
-            exception);
+          image=WaveletDenoiseImage(image,geometry_info.rho,exception);
           if (image != (Image *) NULL)
             (void) SetImageChannelMask(image,channel_mask);
           break;