]> granicus.if.org Git - imagemagick/commitdiff
Remove spurious break
authorCristy <urban-warrior@imagemagick.org>
Sat, 27 Feb 2016 18:51:38 +0000 (13:51 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 27 Feb 2016 18:51:38 +0000 (13:51 -0500)
MagickCore/fx.c

index 67e7d8bdfdc0068c3ed81202ca863e40cadf862e..6929adfaf824460effc4169d13c85efb95074fd8 100644 (file)
@@ -5892,7 +5892,7 @@ MagickExport Image *WaveletDenoiseImage(const Image *image,
         }
       for (x=0; x < (ssize_t) image->columns; x++)
       {
-        wavelet_pixels[i]=(float) p[channel]; break;
+        wavelet_pixels[i]=(float) p[channel];
         i++;
         p+=GetPixelChannels(image);
       }
@@ -6053,6 +6053,9 @@ MagickExport Image *WaveletDenoiseImage(const Image *image,
       register ssize_t
         x;
 
+      ssize_t
+        offset;
+
       q=GetCacheViewAuthenticPixels(noise_view,0,y,noise_image->columns,1,
         exception);
       if (q == (Quantum *) NULL)
@@ -6060,13 +6063,15 @@ MagickExport Image *WaveletDenoiseImage(const Image *image,
           status=MagickFalse;
           break;
         }
+      offset=GetPixelChannelOffset(noise_image,GetPixelChannelChannel(image,
+        channel));
       for (x=0; x < (ssize_t) image->columns; x++)
       {
         float
           pixel;
 
         pixel=wavelet_pixels[i]+wavelet_pixels[low_pass+i];
-        q[channel]=ClampToQuantum(pixel);
+        q[offset]=ClampToQuantum(pixel);
         i++;
         q+=GetPixelChannels(noise_image);
       }