]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Mon, 5 Dec 2011 20:02:07 +0000 (20:02 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Mon, 5 Dec 2011 20:02:07 +0000 (20:02 +0000)
35 files changed:
Magick++/lib/Image.cpp
MagickCore/attribute.c
MagickCore/cache-view.c
MagickCore/cache.c
MagickCore/compare.c
MagickCore/composite-private.h
MagickCore/decorate.c
MagickCore/display.c
MagickCore/distort.c
MagickCore/effect.c
MagickCore/enhance.c
MagickCore/fx.c
MagickCore/histogram.c
MagickCore/image.c
MagickCore/magick-config.h
MagickCore/magick-type.h
MagickCore/montage.c
MagickCore/pixel-accessor.h
MagickCore/pixel.c
MagickCore/pixel.h
MagickCore/resize.c
MagickCore/shear.c
MagickCore/signature.c
MagickCore/statistic.c
MagickCore/stream.c
MagickCore/threshold.c
MagickCore/version.h
MagickWand/compare.c
MagickWand/composite.c
MagickWand/mogrify.c
PerlMagick/Magick.xs
PerlMagick/demo/demo.pl
coders/msl.c
coders/png.c
coders/ps3.c

index ef44e139c18ec90be3d6eafc7e11e70dee8502c9..5ad5150ed5d9d0358903646e250211884f297249 100644 (file)
@@ -347,7 +347,7 @@ void Magick::Image::addNoiseChannel( const ChannelType channel_,
     AddNoiseImage ( image(),
                            noiseType_, 1.0,
                            &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -501,7 +501,7 @@ void Magick::Image::blurChannel( const ChannelType channel_,
   ChannelType channel_mask = SetPixelChannelMask( image(), channel_ );
   MagickCore::Image* newImage =
     BlurImage( image(), radius_, sigma_, image()->bias, &exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -531,7 +531,7 @@ void Magick::Image::channel ( const ChannelType channel_ )
   SeparateImage ( image(), &exceptionInfo );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
 }
 
 // Set or obtain modulus channel depth
@@ -1192,7 +1192,7 @@ void Magick::Image::fx ( const std::string expression,
   ChannelType channel_mask = SetPixelChannelMask( image(), channel );
   MagickCore::Image* newImage =
     FxImage ( image(), expression.c_str(), &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -1249,7 +1249,7 @@ void Magick::Image::gaussianBlurChannel ( const ChannelType channel_,
   ChannelType channel_mask = SetPixelChannelMask( image(), channel_ );
   MagickCore::Image* newImage =
     GaussianBlurImage( image(), width_, sigma_, image()->bias, &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -1367,7 +1367,7 @@ void Magick::Image::matteFloodfill ( const Color &target_ ,
   GetExceptionInfo( &exceptionInfo );
   FloodfillPaintImage ( image(), options()->drawInfo(), &target, x_, y_,
     method_ == FloodfillMethod ? MagickFalse : MagickTrue, &exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
 }
@@ -1594,7 +1594,7 @@ void Magick::Image::quantumOperator ( const ChannelType channel_,
   GetExceptionInfo( &exceptionInfo );
   ChannelType channel_mask = SetPixelChannelMask( image(), channel_ );
   EvaluateImage( image(), operator_, rvalue_, &exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
 }
@@ -1617,7 +1617,7 @@ void Magick::Image::quantumOperator ( const ssize_t x_,const ssize_t y_,
     &exceptionInfo );
   ChannelType channel_mask = SetPixelChannelMask( image(), channel_);
   EvaluateImage( crop_image, operator_, rvalue_, &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   (void) CompositeImage( image(), image()->matte != MagickFalse ?
     OverCompositeOp : CopyCompositeOp, crop_image, geometry.x, geometry.y,
     &exceptionInfo );
@@ -1665,7 +1665,7 @@ void Magick::Image::randomThresholdChannel( const Geometry &thresholds_,
   (void) RandomThresholdImage( image(),
                                       static_cast<std::string>(thresholds_).c_str(),
                                       &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   throwImageException();
   (void) DestroyExceptionInfo( &exceptionInfo );
 }
@@ -1982,7 +1982,7 @@ void Magick::Image::sharpenChannel ( const ChannelType channel_,
                          sigma_,
                   image()->bias,
                          &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -2056,7 +2056,7 @@ void Magick::Image::sparseColor ( const ChannelType channel,
   ChannelType channel_mask = SetPixelChannelMask( image(), channel );
   MagickCore::Image* newImage = SparseColorImage ( image(), method,
     number_arguments, arguments, &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -2275,7 +2275,7 @@ void Magick::Image::unsharpmaskChannel ( const ChannelType channel_,
                              amount_,
                              threshold_,
                              &exceptionInfo );
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
   replaceImage( newImage );
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
@@ -3784,7 +3784,7 @@ void Magick::Image::statistics ( ImageStatistics *statistics )
     &statistics->red.standard_deviation,&exceptionInfo);
   (void) GetImageKurtosis( image(),&statistics->red.kurtosis,
     &statistics->red.skewness,&exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
 
   channel_mask = SetPixelChannelMask( image(), GreenChannel);
   (void) GetImageRange( image(),&minimum,&maximum,&exceptionInfo);
@@ -3794,7 +3794,7 @@ void Magick::Image::statistics ( ImageStatistics *statistics )
     &statistics->green.standard_deviation,&exceptionInfo);
   (void) GetImageKurtosis( image(),&statistics->green.kurtosis,
     &statistics->green.skewness,&exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
 
   channel_mask = SetPixelChannelMask( image(), GreenChannel);
   (void) GetImageRange( image(),&minimum,&maximum,&exceptionInfo);
@@ -3804,7 +3804,7 @@ void Magick::Image::statistics ( ImageStatistics *statistics )
     &statistics->blue.standard_deviation,&exceptionInfo);
   (void) GetImageKurtosis( image(),&statistics->blue.kurtosis,
     &statistics->blue.skewness,&exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
 
   channel_mask = SetPixelChannelMask( image(), AlphaChannel);
   (void) GetImageRange( image(),&minimum,&maximum,&exceptionInfo);
@@ -3814,7 +3814,7 @@ void Magick::Image::statistics ( ImageStatistics *statistics )
     &statistics->alpha.standard_deviation,&exceptionInfo);
   (void) GetImageKurtosis( image(),&statistics->alpha.kurtosis,
     &statistics->alpha.skewness,&exceptionInfo);
-  (void) SetPixelChannelMap( image(), channel_mask );
+  (void) SetPixelChannelMapMask( image(), channel_mask );
 
   throwException( exceptionInfo );
   (void) DestroyExceptionInfo( &exceptionInfo );
index fc2771af8bac0239f5cb98a4695da45a673950cc..3880cc1c51f444f203429f78c4f651d373bd4fcf 100644 (file)
@@ -380,7 +380,7 @@ MagickExport size_t GetImageDepth(const Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         while (current_depth[id] < MAGICKCORE_QUANTUM_DEPTH)
@@ -857,7 +857,7 @@ MagickExport MagickBooleanType SetImageDepth(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=ScaleAnyToQuantum(ScaleQuantumToAny(q[i],range),range);
index 56364bd57cd7bb69d37adf71709d23b6dc5525c9..f61d0896be0a1e62a6e01367661dabf1cd9dd065 100644 (file)
@@ -654,7 +654,7 @@ MagickExport MagickBooleanType GetOneCacheViewAuthenticPixel(
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(cache_view->image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(cache_view->image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
@@ -725,7 +725,7 @@ MagickExport MagickBooleanType GetOneCacheViewVirtualPixel(
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(cache_view->image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(cache_view->image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
@@ -799,7 +799,7 @@ MagickExport MagickBooleanType GetOneCacheViewVirtualMethodPixel(
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(cache_view->image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(cache_view->image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
index 0647326775796cc1c87c7e2eb30741fde7e7ac79..cfd0f404e13270e1bf9b0116d183a6d9b06d9c4e 100644 (file)
@@ -2156,7 +2156,7 @@ MagickExport MagickBooleanType GetOneAuthenticPixel(Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=q[i];
   }
   return(MagickTrue);
@@ -2231,7 +2231,7 @@ static MagickBooleanType GetOneAuthenticPixelFromCache(Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=q[i];
   }
   return(MagickTrue);
@@ -2372,7 +2372,7 @@ MagickExport MagickBooleanType GetOneVirtualPixel(const Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
@@ -2451,7 +2451,7 @@ static MagickBooleanType GetOneVirtualPixelFromCache(const Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
index e380b1ed68c911229f4ce4cc90fcc66609c069d9..5909207bcff74a0a90928263b07347076bbd6c33 100644 (file)
@@ -231,8 +231,8 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -365,8 +365,8 @@ static MagickBooleanType GetAbsoluteDistortion(const Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -409,7 +409,7 @@ static size_t GetImageChannels(const Image *image)
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if ((traits & UpdatePixelTrait) != 0)
       channels++;
   }
@@ -479,8 +479,8 @@ static MagickBooleanType GetFuzzDistortion(const Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -574,8 +574,8 @@ static MagickBooleanType GetMeanAbsoluteDistortion(const Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -666,8 +666,8 @@ static MagickBooleanType GetMeanErrorPerPixel(Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -758,8 +758,8 @@ static MagickBooleanType GetMeanSquaredDistortion(const Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -863,8 +863,8 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion(
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -903,7 +903,7 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion(
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     gamma=image_statistics[i].standard_deviation*
       reconstruct_statistics[channel].standard_deviation;
     gamma=1.0/(fabs((double) gamma) <= MagickEpsilon ? 1.0 : gamma);
@@ -982,8 +982,8 @@ static MagickBooleanType GetPeakAbsoluteDistortion(const Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -1390,8 +1390,8 @@ MagickExport MagickBooleanType IsImagesEqual(Image *image,
           reconstruct_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         reconstruct_traits=GetPixelChannelMapTraits(reconstruct_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (reconstruct_traits == UndefinedPixelTrait))
@@ -1584,8 +1584,8 @@ MagickExport Image *SimilarityImage(Image *image,const Image *reference,
           similarity_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         similarity_traits=GetPixelChannelMapTraits(similarity_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (similarity_traits == UndefinedPixelTrait))
index 57715edcbda990a383b8b2617500e91cf4fca003..7a9851fa33d707105e443daa2c4bc7821700d07d 100644 (file)
@@ -70,8 +70,8 @@ static inline void CompositePixelOver(const Image *image,const PixelInfo *p,
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
+    channel=GetPixelChannelMapChannel(image,i);
     if (traits == UndefinedPixelTrait)
       continue;
     switch (channel)
index 0514d40400d70df5d9958ce7719e6dd78bc54818..dca8921fd996835ee65d3a4a9d2219337fda243e 100644 (file)
@@ -705,7 +705,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             HighlightFactor+(MagickRealType) foreground*(QuantumRange-
@@ -717,7 +717,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             AccentuateFactor+(MagickRealType) foreground*(QuantumRange-
@@ -729,7 +729,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             ShadowFactor+(MagickRealType) background*(QuantumRange-
@@ -776,7 +776,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             HighlightFactor+(MagickRealType) foreground*(QuantumRange-
@@ -790,7 +790,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             ShadowFactor+(MagickRealType) background*(QuantumRange-
@@ -837,7 +837,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             HighlightFactor+(MagickRealType) foreground*(QuantumRange-
@@ -849,7 +849,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             TroughFactor+(MagickRealType) background*(QuantumRange-
@@ -861,7 +861,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
     {
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(QuantumScale*((MagickRealType) q[i]*
             ShadowFactor+(MagickRealType) background*(QuantumRange-
index 3e3a71ec6fb8459e56e72ca766784c7ed900eaff..ec0724400d0d23617728fda9c5bc32d2d63d9b46 100644 (file)
@@ -10187,7 +10187,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
             (void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t)
               x_offset,(ssize_t) y_offset,method == FloodfillMethod ?
               MagickFalse : MagickTrue,exception);
-            (void) SetPixelChannelMap(*image,channel_mask);
+            (void) SetPixelChannelMapMask(*image,channel_mask);
             draw_info=DestroyDrawInfo(draw_info);
             break;
           }
index 3817cfb6cd59baf28a7e53bc292f0b37efa7e174..6f5b164e02890e124924ec3621982e069a1b62b2 100644 (file)
@@ -1534,7 +1534,7 @@ MagickExport Image *DistortResizeImage(const Image *image,
       */
       channel_mask=SetPixelChannelMask(tmp_image,AlphaChannel);
       (void) SeparateImage(tmp_image,exception);
-      SetPixelChannelMap(tmp_image,channel_mask);
+      SetPixelChannelMapMask(tmp_image,channel_mask);
       (void) SetImageAlphaChannel(tmp_image,OpaqueAlphaChannel,exception);
       resize_alpha=DistortImage(tmp_image,AffineDistortion,12,distort_args,
         MagickTrue,exception),
index 7394e75dbb9581437006c5693077f55154cb9709..d759f309efb67c917838aa848df9c7c6c0a1ac9d 100644 (file)
@@ -371,8 +371,8 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -693,8 +693,8 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         sharp_traits=GetPixelChannelMapTraits(sharp_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (sharp_traits == UndefinedPixelTrait))
@@ -994,8 +994,8 @@ MagickExport Image *BlurImage(const Image *image,const double radius,
         register ssize_t
           u;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -1115,8 +1115,8 @@ MagickExport Image *BlurImage(const Image *image,const double radius,
         register ssize_t
           u;
 
-        traits=GetPixelChannelMapTraits(blur_image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(blur_image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(blur_image,i);
+        channel=GetPixelChannelMapChannel(blur_image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -1359,8 +1359,8 @@ MagickExport Image *ConvolveImage(const Image *image,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         convolve_traits=GetPixelChannelMapTraits(convolve_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (convolve_traits == UndefinedPixelTrait))
@@ -1652,8 +1652,8 @@ MagickExport Image *DespeckleImage(const Image *image,ExceptionInfo *exception)
 
     if (status == MagickFalse)
       continue;
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
+    channel=GetPixelChannelMapChannel(image,i);
     despeckle_traits=GetPixelChannelMapTraits(despeckle_image,channel);
     if ((traits == UndefinedPixelTrait) ||
         (despeckle_traits == UndefinedPixelTrait))
@@ -2216,8 +2216,8 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -3007,8 +3007,8 @@ MagickExport Image *RadialBlurImage(const Image *image,const double angle,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -3290,8 +3290,8 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         blur_traits=GetPixelChannelMapTraits(blur_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (blur_traits == UndefinedPixelTrait))
@@ -3558,8 +3558,8 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray,
           shade_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         shade_traits=GetPixelChannelMapTraits(shade_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (shade_traits == UndefinedPixelTrait))
@@ -4435,8 +4435,8 @@ MagickExport Image *StatisticImage(const Image *image,const StatisticType type,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         statistic_traits=GetPixelChannelMapTraits(statistic_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (statistic_traits == UndefinedPixelTrait))
@@ -4661,8 +4661,8 @@ MagickExport Image *UnsharpMaskImage(const Image *image,const double radius,
           traits,
           unsharp_traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         unsharp_traits=GetPixelChannelMapTraits(unsharp_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (unsharp_traits == UndefinedPixelTrait))
index 68ef84396e99e1e9fe626947c655ab0da4b53d4d..9a00a21b1adc6ec4dd34ad5efbda93396b02394f 100644 (file)
@@ -137,7 +137,7 @@ MagickExport MagickBooleanType AutoGammaImage(Image *image,
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if ((traits & UpdatePixelTrait) == 0)
       continue;
     channel_mask=SetPixelChannelMask(image,(ChannelType) (1 << i));
@@ -384,8 +384,8 @@ MagickExport MagickBooleanType ClutImage(Image *image,const Image *clut_image,
           clut_traits,
           traits;
 
-        clut_traits=GetPixelChannelMapTraits(clut_image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(clut_image,(PixelChannel) i);
+        clut_traits=GetPixelChannelMapTraits(clut_image,i);
+        channel=GetPixelChannelMapChannel(clut_image,i);
         traits=GetPixelChannelMapTraits(clut_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (clut_traits == UndefinedPixelTrait) ||
@@ -1222,7 +1222,7 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (((traits & UpdatePixelTrait) != 0) && (black[i] != white[i]))
           q[i]=ClampToQuantum(stretch_map[GetPixelChannels(image)*
             ScaleQuantumToMap(q[i])+i]);
@@ -1387,8 +1387,8 @@ MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception)
         register const Quantum
           *restrict r;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         enhance_traits=GetPixelChannelMapTraits(enhance_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (enhance_traits == UndefinedPixelTrait))
@@ -1676,7 +1676,7 @@ MagickExport MagickBooleanType EqualizeImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (((traits & UpdatePixelTrait) != 0) && (black[i] != white[i]))
           q[i]=ClampToQuantum(equalize_map[GetPixelChannels(image)*
             ScaleQuantumToMap(q[i])+i]);
@@ -1840,7 +1840,7 @@ MagickExport MagickBooleanType GammaImage(Image *image,const double gamma,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(gamma_map[ScaleQuantumToMap(q[i])]);
       }
@@ -2196,7 +2196,7 @@ MagickExport MagickBooleanType LevelImage(Image *image,const double black_point,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits == UndefinedPixelTrait) ||
             ((traits & UpdatePixelTrait) == 0))
           continue;
@@ -2353,7 +2353,7 @@ MagickExport MagickBooleanType LevelizeImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=LevelizeValue(q[i]);
       }
@@ -3032,7 +3032,7 @@ MagickExport MagickBooleanType NegateImage(Image *image,
             PixelTrait
               traits;
 
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
             if ((traits & UpdatePixelTrait) != 0)
               q[i]=QuantumRange-q[i];
           }
@@ -3090,7 +3090,7 @@ MagickExport MagickBooleanType NegateImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=QuantumRange-q[i];
       }
@@ -3312,7 +3312,7 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=ClampToQuantum(sigmoidal_map[ScaleQuantumToMap(q[i])]);
       }
index 967aec088d68e4c5c86d0917324b92705de9542b..5d0f4cab45bc94f681992a08233c6669c8cf25e5 100644 (file)
@@ -344,8 +344,8 @@ MagickExport Image *AddNoiseImage(const Image *image,const NoiseType noise_type,
           noise_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         noise_traits=GetPixelChannelMapTraits(noise_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (noise_traits == UndefinedPixelTrait))
@@ -761,8 +761,8 @@ MagickExport Image *ColorizeImage(const Image *image,const char *blend,
           colorize_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         colorize_traits=GetPixelChannelMapTraits(colorize_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (colorize_traits == UndefinedPixelTrait))
@@ -3106,8 +3106,8 @@ MagickExport Image *FxImage(const Image *image,const char *expression,
           fx_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         fx_traits=GetPixelChannelMapTraits(fx_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (fx_traits == UndefinedPixelTrait))
@@ -3706,8 +3706,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view,
         return(MagickTrue);
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma);
@@ -3729,8 +3729,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view,
             return(MagickTrue);
           for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-            channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
+            channel=GetPixelChannelMapChannel(image,i);
             if (traits == UndefinedPixelTrait)
               continue;
             q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma);
@@ -3756,8 +3756,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view,
             return(MagickTrue);
           for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-            channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
+            channel=GetPixelChannelMapChannel(image,i);
             if (traits == UndefinedPixelTrait)
               continue;
             q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma);
@@ -3780,8 +3780,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view,
             return(MagickTrue);
           for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-            channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
+            channel=GetPixelChannelMapChannel(image,i);
             if (traits == UndefinedPixelTrait)
               continue;
             q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma);
@@ -3806,8 +3806,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view,
         return(MagickTrue);
       for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
       {
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma);
@@ -4271,7 +4271,7 @@ MagickExport Image *ShadowImage(const Image *image,const double opacity,
   (void) SetImageBackgroundColor(border_image,exception);
   channel_mask=SetPixelChannelMask(border_image,AlphaChannel);
   shadow_image=BlurImage(border_image,0.0,sigma,image->bias,exception);
-  (void) SetPixelChannelMap(border_image,channel_mask);
+  (void) SetPixelChannelMapMask(border_image,channel_mask);
   border_image=DestroyImage(border_image);
   if (shadow_image == (Image *) NULL)
     return((Image *) NULL);
@@ -4395,7 +4395,7 @@ MagickExport Image *SketchImage(const Image *image,const double radius,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(random_image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(random_image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=ClampToQuantum(QuantumRange*value);
@@ -4551,7 +4551,7 @@ MagickExport MagickBooleanType SolarizeImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits == UndefinedPixelTrait) ||
             ((traits & CopyPixelTrait) != 0))
           continue;
index 269c13d47d222407a8d75245817977189cab532f..60f0ec41ced273ba2b8de6b5b0f2254db9f99a20 100644 (file)
@@ -1017,7 +1017,7 @@ MagickExport MagickBooleanType MinMaxStretchImage(Image *image,
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if ((traits & UpdatePixelTrait) == 0)
       continue;
     channel_mask=SetPixelChannelMask(image,(ChannelType) (1 << i));
index 69317a8fdbc3291801368d948a18212a1a5e2779..fe8e52ac7585b23a2c6397ec10fa4cf3a99888a4 100644 (file)
@@ -556,8 +556,8 @@ MagickExport Image *AppendImages(const Image *images,
             append_traits,
             traits;
 
-          traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-          channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+          traits=GetPixelChannelMapTraits(image,i);
+          channel=GetPixelChannelMapChannel(image,i);
           append_traits=GetPixelChannelMapTraits(append_image,channel);
           if ((traits == UndefinedPixelTrait) ||
               (append_traits == UndefinedPixelTrait))
@@ -1114,8 +1114,8 @@ MagickExport Image *CombineImages(const Image *image,ExceptionInfo *exception)
 
       if (next == (Image *) NULL)
         continue;
-      traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-      channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+      traits=GetPixelChannelMapTraits(image,i);
+      channel=GetPixelChannelMapChannel(image,i);
       combine_traits=GetPixelChannelMapTraits(combine_image,channel);
       if ((traits == UndefinedPixelTrait) ||
           (combine_traits == UndefinedPixelTrait))
@@ -1835,7 +1835,7 @@ MagickExport MagickBooleanType IsHighDynamicRangeImage(const Image *image,
         MagickRealType
           pixel;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         pixel=(MagickRealType) p[i];
@@ -2276,7 +2276,7 @@ MagickExport MagickBooleanType SeparateImage(Image *image,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if ((traits & UpdatePixelTrait) != 0)
@@ -2353,7 +2353,7 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception)
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if (traits == UndefinedPixelTrait)
       continue;
     if ((traits & UpdatePixelTrait) != 0)
@@ -2364,7 +2364,7 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception)
             channel_mask=SetPixelChannelMask(separate_image,
               (ChannelType) (1 << i));
             (void) SeparateImage(separate_image,exception);
-            (void) SetPixelChannelMap(separate_image,channel_mask);
+            (void) SetPixelChannelMapMask(separate_image,channel_mask);
             AppendImageToList(&images,separate_image);
           }
       }
@@ -2438,8 +2438,7 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image,
       /*
         Set transparent pixels to background color.
       */
-      if (image->matte == MagickFalse)
-        break;
+      image->matte=MagickTrue;
       if (SetImageStorageClass(image,DirectClass,exception) == MagickFalse)
         break;
       background=image->background_color;
@@ -2517,22 +2516,17 @@ MagickExport MagickBooleanType SetImageAlphaChannel(Image *image,
     case OpaqueAlphaChannel:
     {
       status=SetImageAlpha(image,OpaqueAlpha,exception);
-      image->matte=MagickTrue;
       break;
     }
     case TransparentAlphaChannel:
     {
       status=SetImageAlpha(image,TransparentAlpha,exception);
-      image->matte=MagickTrue;
       break;
     }
     case SetAlphaChannel:
     {
       if (image->matte == MagickFalse)
-        {
-          status=SetImageAlpha(image,OpaqueAlpha,exception);
-          image->matte=MagickTrue;
-        }
+        status=SetImageAlpha(image,OpaqueAlpha,exception);
       break;
     }
     case UndefinedAlphaChannel:
@@ -3345,7 +3339,7 @@ MagickExport MagickBooleanType SetImageAlpha(Image *image,const Quantum alpha,
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
   assert(image->signature == MagickSignature);
-  image->matte=alpha != OpaqueAlpha ? MagickTrue : MagickFalse;
+  image->matte=MagickTrue;
   status=MagickTrue;
   image_view=AcquireCacheView(image);
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index f140ac3d2e23d30030605d12ef471144c4baeb8e..d2c0c095e8adc2cebb5279cbe7bd22772950a1ef 100644 (file)
@@ -12,7 +12,9 @@
 /* #undef AUTOTRACE_DELEGATE */
 
 /* Define if coders and filters are to be built as modules. */
-/* #undef BUILD_MODULES */
+#ifndef MAGICKCORE_BUILD_MODULES
+#define MAGICKCORE_BUILD_MODULES 1
+#endif
 
 /* Define if you have the bzip2 library */
 #ifndef MAGICKCORE_BZLIB_DELEGATE
@@ -75,7 +77,9 @@
 #endif
 
 /* Define if you have FFTW library */
-/* #undef FFTW_DELEGATE */
+#ifndef MAGICKCORE_FFTW_DELEGATE
+#define MAGICKCORE_FFTW_DELEGATE 1
+#endif
 
 /* Location of filter modules */
 #ifndef MAGICKCORE_FILTER_PATH
 #endif
 
 /* Define to 1 if you have the <CL/cl.h> header file. */
-/* #undef HAVE_CL_CL_H */
+#ifndef MAGICKCORE_HAVE_CL_CL_H
+#define MAGICKCORE_HAVE_CL_CL_H 1
+#endif
 
 /* Define to 1 if you have the <complex.h> header file. */
 #ifndef MAGICKCORE_HAVE_COMPLEX_H
 #endif
 
 /* Define if you have the <lcms2.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS2_H
-#define MAGICKCORE_HAVE_LCMS2_H 1
-#endif
+/* #undef HAVE_LCMS2_H */
 
 /* Define if you have the <lcms2/lcms2.h> header file. */
 /* #undef HAVE_LCMS2_LCMS2_H */
 
 /* Define if you have the <lcms.h> header file. */
-/* #undef HAVE_LCMS_H */
+#ifndef MAGICKCORE_HAVE_LCMS_H
+#define MAGICKCORE_HAVE_LCMS_H 1
+#endif
 
 /* Define if you have the <lcms/lcms.h> header file. */
 /* #undef HAVE_LCMS_LCMS_H */
 #endif
 
 /* Define if you have JBIG library */
-/* #undef JBIG_DELEGATE */
+#ifndef MAGICKCORE_JBIG_DELEGATE
+#define MAGICKCORE_JBIG_DELEGATE 1
+#endif
 
 /* Define if you have JPEG version 2 "Jasper" library */
 #ifndef MAGICKCORE_JP2_DELEGATE
 #endif
 
 /* Define if you have LQR library */
-/* #undef LQR_DELEGATE */
+#ifndef MAGICKCORE_LQR_DELEGATE
+#define MAGICKCORE_LQR_DELEGATE 1
+#endif
 
 /* Define if using libltdl to support dynamically loadable modules */
 #ifndef MAGICKCORE_LTDL_DELEGATE
 
 /* Define to the system default library search path. */
 #ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib/llvm:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib64/tracker-0.12:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/opt/intel/lib/intel64:/usr/lib64/llvm:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/nvidia:/usr/lib64/octave/3.4.3:/usr/lib64/qt-3.3/lib:/usr/lib64/tracker-0.12:/usr/lib64/xulrunner-2"
 #endif
 
 /* The archive extension */
 /* #undef NO_MINUS_C_MINUS_O */
 
 /* Define if you have OPENEXR library */
-/* #undef OPENEXR_DELEGATE */
+#ifndef MAGICKCORE_OPENEXR_DELEGATE
+#define MAGICKCORE_OPENEXR_DELEGATE 1
+#endif
 
 /* Name of package */
 #ifndef MAGICKCORE_PACKAGE
 #endif
 
 /* Define if you have RSVG library */
-/* #undef RSVG_DELEGATE */
+#ifndef MAGICKCORE_RSVG_DELEGATE
+#define MAGICKCORE_RSVG_DELEGATE 1
+#endif
 
 /* Define to the type of arg 1 for `select'. */
 #ifndef MAGICKCORE_SELECT_TYPE_ARG1
 #endif
 
 /* Define if you have WEBP library */
-/* #undef WEBP_DELEGATE */
+#ifndef MAGICKCORE_WEBP_DELEGATE
+#define MAGICKCORE_WEBP_DELEGATE 1
+#endif
 
 /* Define to use the Windows GDI32 library */
 /* #undef WINGDI32_DELEGATE */
 /* #undef WITH_DMALLOC */
 
 /* Define if you have WMF library */
-/* #undef WMF_DELEGATE */
+#ifndef MAGICKCORE_WMF_DELEGATE
+#define MAGICKCORE_WMF_DELEGATE 1
+#endif
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
 /* #undef _MINIX */
 
 /* Define this for the OpenCL Accelerator */
-/* #undef _OPENCL */
+#ifndef MAGICKCORE__OPENCL
+#define MAGICKCORE__OPENCL 1
+#endif
 
 /* Define to 2 if the system does not provide POSIX.1 features except with
    this defined. */
index eb9ad8c6af32b53ff3cea95bac9e56cd13af098a..0a70fb8c58c2dfebd28115cc81de15c6a0419853 100644 (file)
@@ -142,19 +142,21 @@ typedef enum
   MagentaChannel = 0x0002,
   BlueChannel = 0x0004,
   YellowChannel = 0x0004,
-  AlphaChannel = 0x0008,
-  OpacityChannel = 0x0008,
-  BlackChannel = 0x0010,
+  BlackChannel = 0x0008,
+  AlphaChannel = 0x0010,
+  OpacityChannel = 0x0010,
   IndexChannel = 0x0020,
+  MaskChannel = 0x0040,
+  MetaChannel = 0x0080,
   CompositeChannels = 0x002F,
   AllChannels = 0x7ffffff,
   /*
     Special purpose channel types.
   */
-  TrueAlphaChannel = 0x0040, /* extract actual alpha channel from opacity */
-  RGBChannels = 0x0080,      /* set alpha from grayscale mask in RGB */
-  GrayChannels = 0x0080,
-  SyncChannels = 0x0100,     /* channels should be modified equally */
+  TrueAlphaChannel = 0x0100, /* extract actual alpha channel from opacity */
+  RGBChannels = 0x0200,      /* set alpha from grayscale mask in RGB */
+  GrayChannels = 0x0400,
+  SyncChannels = 0x1000,     /* channels should be modified equally */
   DefaultChannels = ((AllChannels | SyncChannels) &~ AlphaChannel)
 } ChannelType;
 
index ea522c00abfce7e05df7db93d11cc159064cd307..368595e0fc427ca7b03af1d01ba366eb635794fb 100644 (file)
@@ -63,6 +63,7 @@
 #include "MagickCore/monitor-private.h"
 #include "MagickCore/montage.h"
 #include "MagickCore/option.h"
+#include "MagickCore/pixel.h"
 #include "MagickCore/quantize.h"
 #include "MagickCore/property.h"
 #include "MagickCore/resize.h"
@@ -759,9 +760,9 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
           if ((montage_info->frame != (char *) NULL) &&
               (image->compose == DstOutCompositeOp))
             {
-              SetPixelChannelMap(image,AlphaChannel);
+              SetPixelChannelMapMask(image,AlphaChannel);
               (void) NegateImage(image,MagickFalse,exception);
-              SetPixelChannelMap(image,DefaultChannels);
+              SetPixelChannelMapMask(image,DefaultChannels);
             }
         }
       /*
index e4c0203171d66bcd53f0edfa0a936681c58ecadd..52e32bee143e02a5e7d59bcb778e12e537203d92 100644 (file)
@@ -34,7 +34,7 @@ static inline Quantum GetPixelAlpha(const Image *restrict image,
 {
   if (image->channel_map[AlphaPixelChannel].traits == UndefinedPixelTrait)
     return(OpaqueAlpha);
-  return(pixel[image->channel_map[AlphaPixelChannel].channel]);
+  return(pixel[image->channel_map[AlphaPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelAlphaTraits(const Image *restrict image)
@@ -47,7 +47,7 @@ static inline Quantum GetPixelBlack(const Image *restrict image,
 {
   if (image->channel_map[BlackPixelChannel].traits == UndefinedPixelTrait)
     return(0);
-  return(pixel[image->channel_map[BlackPixelChannel].channel]);
+  return(pixel[image->channel_map[BlackPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelBlackTraits(const Image *restrict image)
@@ -58,7 +58,7 @@ static inline PixelTrait GetPixelBlackTraits(const Image *restrict image)
 static inline Quantum GetPixelBlue(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[BluePixelChannel].channel]);
+  return(pixel[image->channel_map[BluePixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelBlueTraits(const Image *restrict image)
@@ -69,7 +69,7 @@ static inline PixelTrait GetPixelBlueTraits(const Image *restrict image)
 static inline Quantum GetPixelCb(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[CbPixelChannel].channel]);
+  return(pixel[image->channel_map[CbPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelCbTraits(const Image *restrict image)
@@ -82,19 +82,19 @@ static inline Quantum GetPixelChannel(const Image *restrict image,
 {
   if (image->channel_map[channel].traits == UndefinedPixelTrait)
     return(0);
-  return(pixel[image->channel_map[channel].channel]);
+  return(pixel[image->channel_map[channel].offset]);
 }
 
 static inline PixelChannel GetPixelChannelMapChannel(
-  const Image *restrict image,const PixelChannel channel)
+  const Image *restrict image,const int offset)
 {
-  return(image->channel_map[channel].channel);
+  return(image->channel_map[offset].channel);
 }
 
 static inline PixelTrait GetPixelChannelMapTraits(const Image *restrict image,
-  const PixelChannel channel)
+  const int offset)
 {
-  return(image->channel_map[channel].traits);
+  return(image->channel_map[image->channel_map[offset].channel].traits);
 }
 
 static inline size_t GetPixelChannels(const Image *restrict image)
@@ -105,7 +105,7 @@ static inline size_t GetPixelChannels(const Image *restrict image)
 static inline Quantum GetPixelCr(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[CrPixelChannel].channel]);
+  return(pixel[image->channel_map[CrPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelCrTraits(const Image *restrict image)
@@ -116,7 +116,7 @@ static inline PixelTrait GetPixelCrTraits(const Image *restrict image)
 static inline Quantum GetPixelCyan(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[CyanPixelChannel].channel]);
+  return(pixel[image->channel_map[CyanPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelCyanTraits(const Image *restrict image)
@@ -127,7 +127,7 @@ static inline PixelTrait GetPixelCyanTraits(const Image *restrict image)
 static inline Quantum GetPixelGray(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[GrayPixelChannel].channel]);
+  return(pixel[image->channel_map[GrayPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelGrayTraits(const Image *restrict image)
@@ -138,7 +138,7 @@ static inline PixelTrait GetPixelGrayTraits(const Image *restrict image)
 static inline Quantum GetPixelGreen(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[GreenPixelChannel].channel]);
+  return(pixel[image->channel_map[GreenPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelGreenTraits(const Image *restrict image)
@@ -151,7 +151,7 @@ static inline Quantum GetPixelIndex(const Image *restrict image,
 {
   if (image->channel_map[IndexPixelChannel].traits == UndefinedPixelTrait)
     return(0);
-  return(pixel[image->channel_map[IndexPixelChannel].channel]);
+  return(pixel[image->channel_map[IndexPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelIndexTraits(const Image *restrict image)
@@ -190,7 +190,7 @@ static inline Quantum GetPixelInfoLuminance(
 static inline Quantum GetPixelMagenta(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[MagentaPixelChannel].channel]);
+  return(pixel[image->channel_map[MagentaPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelMagentaTraits(const Image *restrict image)
@@ -211,7 +211,7 @@ static inline size_t GetPixelMetacontentExtent(const Image *restrict image)
 static inline Quantum GetPixelRed(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[RedPixelChannel].channel]);
+  return(pixel[image->channel_map[RedPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelRedTraits(const Image *restrict image)
@@ -223,23 +223,23 @@ static inline void GetPixelInfoPixel(const Image *restrict image,
   const Quantum *restrict pixel,PixelInfo *restrict pixel_info)
 {
   pixel_info->red=(MagickRealType)
-    pixel[image->channel_map[RedPixelChannel].channel];
+    pixel[image->channel_map[RedPixelChannel].offset];
   pixel_info->green=(MagickRealType)
-    pixel[image->channel_map[GreenPixelChannel].channel];
+    pixel[image->channel_map[GreenPixelChannel].offset];
   pixel_info->blue=(MagickRealType)
-    pixel[image->channel_map[BluePixelChannel].channel];
+    pixel[image->channel_map[BluePixelChannel].offset];
   pixel_info->black=0;
   if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait)
     pixel_info->black=(MagickRealType)
-      pixel[image->channel_map[BlackPixelChannel].channel];
+      pixel[image->channel_map[BlackPixelChannel].offset];
   pixel_info->alpha=OpaqueAlpha;
   if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait)
     pixel_info->alpha=(MagickRealType)
-      pixel[image->channel_map[AlphaPixelChannel].channel];
+      pixel[image->channel_map[AlphaPixelChannel].offset];
   pixel_info->index=0;
   if (image->channel_map[IndexPixelChannel].traits != UndefinedPixelTrait)
     pixel_info->index=(MagickRealType)
-      pixel[image->channel_map[IndexPixelChannel].channel];
+      pixel[image->channel_map[IndexPixelChannel].offset];
 }
 
 static inline PixelTrait GetPixelTraits(const Image *restrict image,
@@ -251,7 +251,7 @@ static inline PixelTrait GetPixelTraits(const Image *restrict image,
 static inline Quantum GetPixelY(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[YPixelChannel].channel]);
+  return(pixel[image->channel_map[YPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelYTraits(const Image *restrict image)
@@ -262,7 +262,7 @@ static inline PixelTrait GetPixelYTraits(const Image *restrict image)
 static inline Quantum GetPixelYellow(const Image *restrict image,
   const Quantum *restrict pixel)
 {
-  return(pixel[image->channel_map[YellowPixelChannel].channel]);
+  return(pixel[image->channel_map[YellowPixelChannel].offset]);
 }
 
 static inline PixelTrait GetPixelYellowTraits(const Image *restrict image)
@@ -273,9 +273,9 @@ static inline PixelTrait GetPixelYellowTraits(const Image *restrict image)
 static inline MagickBooleanType IsPixelEquivalent(const Image *restrict image,
   const Quantum *restrict p,const PixelInfo *restrict q)
 {
-  if (((double) p[image->channel_map[RedPixelChannel].channel] == q->red) &&
-      ((double) p[image->channel_map[GreenPixelChannel].channel] == q->green) &&
-      ((double) p[image->channel_map[BluePixelChannel].channel] == q->blue))
+  if (((double) p[image->channel_map[RedPixelChannel].offset] == q->red) &&
+      ((double) p[image->channel_map[GreenPixelChannel].offset] == q->green) &&
+      ((double) p[image->channel_map[BluePixelChannel].offset] == q->blue))
     return(MagickTrue);
   return(MagickFalse);
 }
@@ -284,10 +284,10 @@ static inline MagickBooleanType IsPixelGray(const Image *restrict image,
   const Quantum *restrict pixel)
 {
 #if !defined(MAGICKCORE_HDRI_SUPPORT)
-  if ((pixel[image->channel_map[RedPixelChannel].channel] ==
-       pixel[image->channel_map[GreenPixelChannel].channel]) &&
-      (pixel[image->channel_map[GreenPixelChannel].channel] ==
-       pixel[image->channel_map[BluePixelChannel].channel]))
+  if ((pixel[image->channel_map[RedPixelChannel].offset] ==
+       pixel[image->channel_map[GreenPixelChannel].offset]) &&
+      (pixel[image->channel_map[GreenPixelChannel].offset] ==
+       pixel[image->channel_map[BluePixelChannel].offset]))
     return(MagickTrue);
 #else
   {
@@ -295,10 +295,10 @@ static inline MagickBooleanType IsPixelGray(const Image *restrict image,
       alpha,
       beta;
 
-    alpha=pixel[image->channel_map[RedPixelChannel].channel]-(double)
-      pixel[image->channel_map[GreenPixelChannel].channel];
-    beta=pixel[image->channel_map[GreenPixelChannel].channel]-(double)
-      pixel[image->channel_map[BluePixelChannel].channel];
+    alpha=pixel[image->channel_map[RedPixelChannel].offset]-(double)
+      pixel[image->channel_map[GreenPixelChannel].offset];
+    beta=pixel[image->channel_map[GreenPixelChannel].offset]-(double)
+      pixel[image->channel_map[BluePixelChannel].offset];
     if ((fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
       return(MagickTrue);
   }
@@ -337,12 +337,12 @@ static inline MagickBooleanType IsPixelMonochrome(const Image *restrict image,
   const Quantum *restrict pixel)
 {
 #if !defined(MAGICKCORE_HDRI_SUPPORT)
-  if (((pixel[image->channel_map[RedPixelChannel].channel] == 0) ||
-      (pixel[image->channel_map[RedPixelChannel].channel] == (Quantum) QuantumRange)) &&
-      (pixel[image->channel_map[RedPixelChannel].channel] ==
-       pixel[image->channel_map[GreenPixelChannel].channel]) &&
-      (pixel[image->channel_map[GreenPixelChannel].channel] ==
-       pixel[image->channel_map[BluePixelChannel].channel]))
+  if (((pixel[image->channel_map[RedPixelChannel].offset] == 0) ||
+      (pixel[image->channel_map[RedPixelChannel].offset] == (Quantum) QuantumRange)) &&
+      (pixel[image->channel_map[RedPixelChannel].offset] ==
+       pixel[image->channel_map[GreenPixelChannel].offset]) &&
+      (pixel[image->channel_map[GreenPixelChannel].offset] ==
+       pixel[image->channel_map[BluePixelChannel].offset]))
     return(MagickTrue);
 #else
   {
@@ -350,14 +350,12 @@ static inline MagickBooleanType IsPixelMonochrome(const Image *restrict image,
       alpha,
       beta;
 
-    alpha=pixel[image->channel_map[RedPixelChannel].channel]-(double)
-      pixel[image->channel_map[GreenPixelChannel].channel];
-    beta=pixel[image->channel_map[GreenPixelChannel].channel]-(double)
-      pixel[image->channel_map[BluePixelChannel].channel];
-    if (((fabs(pixel[image->channel_map[RedPixelChannel].channel]) <=
-            MagickEpsilon) ||
-         (fabs(pixel[image->channel_map[RedPixelChannel].channel]-
-            QuantumRange) <= MagickEpsilon)) &&
+    alpha=pixel[image->channel_map[RedPixelChannel].offset]-(double)
+      pixel[image->channel_map[GreenPixelChannel].offset];
+    beta=pixel[image->channel_map[GreenPixelChannel].offset]-(double)
+      pixel[image->channel_map[BluePixelChannel].offset];
+    if (((fabs(pixel[image->channel_map[RedPixelChannel].offset]) <= MagickEpsilon) ||
+         (fabs(pixel[image->channel_map[RedPixelChannel].offset]-QuantumRange) <= MagickEpsilon)) &&
         (fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
       return(MagickTrue);
     }
@@ -416,7 +414,7 @@ static inline void SetPixelAlpha(const Image *restrict image,
   const Quantum alpha,Quantum *restrict pixel)
 {
   if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait)
-    pixel[image->channel_map[AlphaPixelChannel].channel]=alpha;
+    pixel[image->channel_map[AlphaPixelChannel].offset]=alpha;
 }
 
 static inline void SetPixelAlphaTraits(Image *image,const PixelTrait traits)
@@ -428,7 +426,7 @@ static inline void SetPixelBlack(const Image *restrict image,
   const Quantum black,Quantum *restrict pixel)
 {
   if (image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait)
-    pixel[image->channel_map[BlackPixelChannel].channel]=black;
+    pixel[image->channel_map[BlackPixelChannel].offset]=black;
 }
 
 static inline void SetPixelBlackTraits(Image *image,const PixelTrait traits)
@@ -439,7 +437,7 @@ static inline void SetPixelBlackTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelBlue(const Image *restrict image,const Quantum blue,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[BluePixelChannel].channel]=blue;
+  pixel[image->channel_map[BluePixelChannel].offset]=blue;
 }
 
 static inline void SetPixelBlueTraits(Image *image,const PixelTrait traits)
@@ -450,7 +448,7 @@ static inline void SetPixelBlueTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelCb(const Image *restrict image,const Quantum cb,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[CbPixelChannel].channel]=cb;
+  pixel[image->channel_map[CbPixelChannel].offset]=cb;
 }
 
 static inline void SetPixelCbTraits(Image *image,const PixelTrait traits)
@@ -462,13 +460,22 @@ static inline void SetPixelChannel(const Image *restrict image,
   const PixelChannel channel,const Quantum quantum,Quantum *restrict pixel)
 {
   if (image->channel_map[channel].traits != UndefinedPixelTrait)
-    pixel[image->channel_map[channel].channel]=quantum;
+    pixel[image->channel_map[channel].offset]=quantum;
 }
 
 static inline void SetPixelChannelMapChannel(const Image *restrict image,
-  const PixelChannel channel,const PixelChannel channels)
+  const PixelChannel channel,const int offset)
+{
+  image->channel_map[offset].channel=channel;
+  image->channel_map[channel].offset=offset;
+}
+
+static inline void SetPixelChannelMap(const Image *restrict image,
+  const PixelChannel channel,const PixelTrait traits,const int offset)
 {
-  image->channel_map[channel].channel=channels;
+  image->channel_map[offset].channel=channel;
+  image->channel_map[channel].offset=offset;
+  image->channel_map[channel].traits=traits;
 }
 
 static inline void SetPixelChannels(Image *image,const size_t number_channels)
@@ -491,7 +498,7 @@ static inline void SetPixelChannelMapTraits(Image *image,
 static inline void SetPixelCr(const Image *restrict image,const Quantum cr,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[CrPixelChannel].channel]=cr;
+  pixel[image->channel_map[CrPixelChannel].offset]=cr;
 }
 
 static inline void SetPixelCrTraits(Image *image,const PixelTrait traits)
@@ -502,13 +509,13 @@ static inline void SetPixelCrTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelCyan(const Image *restrict image,const Quantum cyan,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[CyanPixelChannel].channel]=cyan;
+  pixel[image->channel_map[CyanPixelChannel].offset]=cyan;
 }
 
 static inline void SetPixelGray(const Image *restrict image,const Quantum gray,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[GrayPixelChannel].channel]=gray;
+  pixel[image->channel_map[GrayPixelChannel].offset]=gray;
 }
 
 static inline void SetPixelGrayTraits(Image *image,const PixelTrait traits)
@@ -519,7 +526,7 @@ static inline void SetPixelGrayTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelGreen(const Image *restrict image,
   const Quantum green,Quantum *restrict pixel)
 {
-  pixel[image->channel_map[GreenPixelChannel].channel]=green;
+  pixel[image->channel_map[GreenPixelChannel].offset]=green;
 }
 
 static inline void SetPixelGreenTraits(Image *image,const PixelTrait traits)
@@ -531,7 +538,7 @@ static inline void SetPixelIndex(const Image *restrict image,
   const Quantum index,Quantum *restrict pixel)
 {
   if (image->channel_map[IndexPixelChannel].traits != UndefinedPixelTrait)
-    pixel[image->channel_map[IndexPixelChannel].channel]=index;
+    pixel[image->channel_map[IndexPixelChannel].offset]=index;
 }
 
 static inline void SetPixelIndexTraits(Image *image,const PixelTrait traits)
@@ -559,19 +566,19 @@ static inline void SetPixelInfo(const Image *restrict image,
 static inline void SetPixelInfoPixel(const Image *restrict image,
   const PixelInfo *restrict pixel_info,Quantum *restrict pixel)
 {
-  pixel[image->channel_map[RedPixelChannel].channel]=
+  pixel[image->channel_map[RedPixelChannel].offset]=
     ClampToQuantum(pixel_info->red);
-  pixel[image->channel_map[GreenPixelChannel].channel]=
+  pixel[image->channel_map[GreenPixelChannel].offset]=
     ClampToQuantum(pixel_info->green);
-  pixel[image->channel_map[BluePixelChannel].channel]=
+  pixel[image->channel_map[BluePixelChannel].offset]=
     ClampToQuantum(pixel_info->blue);
   if ((image->channel_map[BlackPixelChannel].traits != UndefinedPixelTrait) &&
       (image->colorspace == CMYKColorspace) &&
       (pixel_info->colorspace == CMYKColorspace))
-    pixel[image->channel_map[BlackPixelChannel].channel]=
+    pixel[image->channel_map[BlackPixelChannel].offset]=
       ClampToQuantum(pixel_info->black);
   if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait)
-    pixel[image->channel_map[AlphaPixelChannel].channel]=
+    pixel[image->channel_map[AlphaPixelChannel].offset]=
       pixel_info->matte == MagickFalse ? OpaqueAlpha :
       ClampToQuantum(pixel_info->alpha);
 }
@@ -579,7 +586,7 @@ static inline void SetPixelInfoPixel(const Image *restrict image,
 static inline void SetPixelMagenta(const Image *restrict image,
   const Quantum magenta,Quantum *restrict pixel)
 {
-  pixel[image->channel_map[MagentaPixelChannel].channel]=magenta;
+  pixel[image->channel_map[MagentaPixelChannel].offset]=magenta;
 }
 
 static inline void SetPixelMagentaTraits(Image *image,const PixelTrait traits)
@@ -601,7 +608,7 @@ static inline void SetPixelMetacontentExtent(Image *image,const size_t extent)
 static inline void SetPixelRed(const Image *restrict image,const Quantum red,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[RedPixelChannel].channel]=red;
+  pixel[image->channel_map[RedPixelChannel].offset]=red;
 }
 
 static inline void SetPixelRedTraits(Image *image,const PixelTrait traits)
@@ -612,7 +619,7 @@ static inline void SetPixelRedTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelYellow(const Image *restrict image,
   const Quantum yellow,Quantum *restrict pixel)
 {
-  pixel[image->channel_map[YellowPixelChannel].channel]=yellow;
+  pixel[image->channel_map[YellowPixelChannel].offset]=yellow;
 }
 
 static inline void SetPixelYellowTraits(Image *image,const PixelTrait traits)
@@ -623,7 +630,7 @@ static inline void SetPixelYellowTraits(Image *image,const PixelTrait traits)
 static inline void SetPixelY(const Image *restrict image,const Quantum y,
   Quantum *restrict pixel)
 {
-  pixel[image->channel_map[YPixelChannel].channel]=y;
+  pixel[image->channel_map[YPixelChannel].offset]=y;
 }
 
 static inline void SetPixelYTraits(Image *image,const PixelTrait traits)
@@ -635,29 +642,29 @@ static inline Quantum GetPixelIntensity(const Image *restrict image,
   const Quantum *restrict pixel)
 {
 #if !defined(MAGICKCORE_HDRI_SUPPORT)
-  if ((pixel[image->channel_map[RedPixelChannel].channel] ==
-       pixel[image->channel_map[GreenPixelChannel].channel]) &&
-      (pixel[image->channel_map[GreenPixelChannel].channel] ==
-       pixel[image->channel_map[BluePixelChannel].channel]))
-    return(pixel[image->channel_map[RedPixelChannel].channel]);
-  return((Quantum) (0.299*pixel[image->channel_map[RedPixelChannel].channel]+
-    0.587*pixel[image->channel_map[GreenPixelChannel].channel]+0.114*
-    pixel[image->channel_map[BluePixelChannel].channel]+0.5));
+  if ((pixel[image->channel_map[RedPixelChannel].offset] ==
+       pixel[image->channel_map[GreenPixelChannel].offset]) &&
+      (pixel[image->channel_map[GreenPixelChannel].offset] ==
+       pixel[image->channel_map[BluePixelChannel].offset]))
+    return(pixel[image->channel_map[RedPixelChannel].offset]);
+  return((Quantum) (0.299*pixel[image->channel_map[RedPixelChannel].offset]+
+    0.587*pixel[image->channel_map[GreenPixelChannel].offset]+0.114*
+    pixel[image->channel_map[BluePixelChannel].offset]+0.5));
 #else
   {
     double
       alpha,
       beta;
 
-    alpha=pixel[image->channel_map[RedPixelChannel].channel]-(double)
-      pixel[image->channel_map[GreenPixelChannel].channel];
-    beta=pixel[image->channel_map[GreenPixelChannel].channel]-(double)
-      pixel[image->channel_map[BluePixelChannel].channel];
+    alpha=pixel[image->channel_map[RedPixelChannel].offset]-(double)
+      pixel[image->channel_map[GreenPixelChannel].offset];
+    beta=pixel[image->channel_map[GreenPixelChannel].offset]-(double)
+      pixel[image->channel_map[BluePixelChannel].offset];
     if ((fabs(alpha) <= MagickEpsilon) && (fabs(beta) <= MagickEpsilon))
-      return(pixel[image->channel_map[RedPixelChannel].channel]);
-    return((Quantum) (0.299*pixel[image->channel_map[RedPixelChannel].channel]+
-      0.587*pixel[image->channel_map[GreenPixelChannel].channel]+0.114*
-      pixel[image->channel_map[BluePixelChannel].channel]));
+      return(pixel[image->channel_map[RedPixelChannel].offset]);
+    return((Quantum) (0.299*pixel[image->channel_map[RedPixelChannel].offset]+
+      0.587*pixel[image->channel_map[GreenPixelChannel].offset]+0.114*
+      pixel[image->channel_map[BluePixelChannel].offset]));
   }
 #endif
 }
@@ -666,13 +673,13 @@ static inline Quantum GetPixelLuminance(const Image *restrict image,
   const Quantum *restrict pixel)
 {
 #if !defined(MAGICKCORE_HDRI_SUPPORT)
-  return((Quantum) (0.21267*pixel[image->channel_map[RedPixelChannel].channel]+
-    0.71516*pixel[image->channel_map[GreenPixelChannel].channel]+0.07217*
-    pixel[image->channel_map[BluePixelChannel].channel]+0.5));
+  return((Quantum) (0.21267*pixel[image->channel_map[RedPixelChannel].offset]+
+    0.71516*pixel[image->channel_map[GreenPixelChannel].offset]+0.07217*
+    pixel[image->channel_map[BluePixelChannel].offset]+0.5));
 #else
-  return((Quantum) (0.21267*pixel[image->channel_map[RedPixelChannel].channel]+
-    0.71516*pixel[image->channel_map[GreenPixelChannel].channel]+0.07217*
-    pixel[image->channel_map[BluePixelChannel].channel]));
+  return((Quantum) (0.21267*pixel[image->channel_map[RedPixelChannel].offset]+
+    0.71516*pixel[image->channel_map[GreenPixelChannel].offset]+0.07217*
+    pixel[image->channel_map[BluePixelChannel].offset]));
 #endif
 }
 
index 11de725ea78224ac52545853c6550975bae52bb0..bbd736208b4d8f9b58f6cfe11f0959e60beab448 100644 (file)
@@ -68,9 +68,6 @@
 #include "MagickCore/transform.h"
 #include "MagickCore/utility.h"
 \f
-/*
-  Define declarations.
-*/
 #define LogPixelChannels(image) \
 { \
   register ssize_t \
@@ -86,7 +83,7 @@
     const char \
       *channel; \
  \
-    switch (image->channel_map[i].channel) \
+    switch (GetPixelChannelMapChannel(image,i)) \
     { \
       case RedPixelChannel: \
       { \
           channel="index"; \
         break; \
       } \
+      case IndexPixelChannel: \
+      { \
+        channel="index"; \
+        break; \
+      } \
       case AlphaPixelChannel: \
       { \
         channel="alpha"; \
         channel="mask"; \
         break; \
       } \
-      default: \
+      case MetaPixelChannel: \
       { \
-        channel="undefined"; \
+        channel="meta"; \
+        break; \
       } \
+      default: \
+        channel="undefined"; \
     } \
     *traits='\0'; \
-    if ((image->channel_map[i].traits & UpdatePixelTrait) != 0) \
+    if ((GetPixelChannelMapTraits(image,i) & UpdatePixelTrait) != 0) \
       (void) ConcatenateMagickString(traits,"update,",MaxTextExtent); \
-    if ((image->channel_map[i].traits & BlendPixelTrait) != 0) \
+    if ((GetPixelChannelMapTraits(image,i) & BlendPixelTrait) != 0) \
       (void) ConcatenateMagickString(traits,"blend,",MaxTextExtent); \
-    if ((image->channel_map[i].traits & CopyPixelTrait) != 0) \
+    if ((GetPixelChannelMapTraits(image,i) & CopyPixelTrait) != 0) \
       (void) ConcatenateMagickString(traits,"copy,",MaxTextExtent); \
     if (*traits == '\0') \
       (void) ConcatenateMagickString(traits,"undefined,",MaxTextExtent); \
@@ -3640,9 +3645,11 @@ MagickExport MagickBooleanType ImportImagePixels(Image *image,
 %    o image: the image.
 %
 */
-
-MagickExport void PendInitializePixelChannelMap(Image *image)
+MagickExport void InitializePixelChannelMap(Image *image)
 {
+  PixelTrait
+    trait;
+
   register ssize_t
     i;
 
@@ -3651,100 +3658,34 @@ MagickExport void PendInitializePixelChannelMap(Image *image)
 
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
-  for (i=0; i < (ssize_t) MaxPixelChannels; i++)
-  {
-    SetPixelChannelMapChannel(image,(PixelChannel) i,(PixelChannel) 0);
-    SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait);
-  }
+  (void) ResetMagickMemory(image->channel_map,0,MaxPixelChannels*
+    sizeof(*image->channel_map));
+  trait=UpdatePixelTrait;
+  if (image->matte != MagickFalse)
+    trait|=BlendPixelTrait;
   n=0;
-  SetPixelChannelMapChannel(image,RedPixelChannel,(PixelChannel) n++);
-  SetPixelChannelMapTraits(image,RedPixelChannel,(PixelTrait)
-    (UpdatePixelTrait | BlendPixelTrait));
-  SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelChannel) n++);
-  SetPixelChannelMapTraits(image,GreenPixelChannel,(PixelTrait)
-    (UpdatePixelTrait | BlendPixelTrait));
-  SetPixelChannelMapChannel(image,BluePixelChannel,(PixelChannel) n++);
-  SetPixelChannelMapTraits(image,BluePixelChannel,(PixelTrait)
-    (UpdatePixelTrait | BlendPixelTrait));
+  SetPixelChannelMap(image,RedPixelChannel,trait,n++);
+  SetPixelChannelMap(image,GreenPixelChannel,trait,n++);
+  SetPixelChannelMap(image,BluePixelChannel,trait,n++);
+if (0)
   if (image->colorspace == GRAYColorspace)
     {
       n=0;
-      SetPixelChannelMapChannel(image,RedPixelChannel,(PixelChannel) n);
-      SetPixelChannelMapChannel(image,GreenPixelChannel,(PixelChannel) n);
-      SetPixelChannelMapChannel(image,BluePixelChannel,(PixelChannel) n++);
+      SetPixelChannelMap(image,RedPixelChannel,trait,n);
+      SetPixelChannelMap(image,GreenPixelChannel,trait,n);
+      SetPixelChannelMap(image,BluePixelChannel,trait,n++);
     }
   if (image->colorspace == CMYKColorspace)
-    {
-      SetPixelChannelMapChannel(image,BlackPixelChannel,(PixelChannel) n++);
-      SetPixelChannelMapTraits(image,BlackPixelChannel,(PixelTrait)
-        (UpdatePixelTrait | BlendPixelTrait));
-    }
-  if (image->storage_class == PseudoClass)
-    {
-      SetPixelChannelMapChannel(image,IndexPixelChannel,(PixelChannel) n++);
-      SetPixelChannelMapTraits(image,IndexPixelChannel,CopyPixelTrait);
-    }
+    SetPixelChannelMap(image,BlackPixelChannel,trait,n++);
   if (image->matte != MagickFalse)
-    {
-      SetPixelChannelMapChannel(image,AlphaPixelChannel,(PixelChannel) n++);
-      SetPixelChannelMapTraits(image,AlphaPixelChannel,CopyPixelTrait);
-    }
-  n+=image->number_meta_channels;
-  for ( ; i < (ssize_t) n; i++)
-    SetPixelChannelMapTraits(image,(PixelChannel) i,CopyPixelTrait);
-  image->number_channels=n;
-  if (image->debug != MagickFalse)
-    LogPixelChannels(image);
-  (void) SetPixelChannelMask(image,image->channel_mask);
-}
-
-MagickExport void InitializePixelChannelMap(Image *image)
-{
-  PixelChannel
-    alpha_channel;
-
-  register ssize_t
-    i;
-
-  assert(image != (Image *) NULL);
-  assert(image->signature == MagickSignature);
-  for (i=0; i < (ssize_t) MaxPixelChannels; i++)
-  {
-    SetPixelChannelMapChannel(image,(PixelChannel) i,(PixelChannel) i);
-    SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait);
-  }
-  image->number_channels=4;
-  if (0 && image->colorspace == GRAYColorspace)
-    image->number_channels=2;
-  if (image->colorspace == CMYKColorspace)
-    image->number_channels++;
+    SetPixelChannelMap(image,AlphaPixelChannel,CopyPixelTrait,n++);
   if (image->storage_class == PseudoClass)
-    image->number_channels++;
-  for (i=0; i < (ssize_t) image->number_channels; i++)
-    SetPixelChannelMapTraits(image,(PixelChannel) i,(PixelTrait)
-      UpdatePixelTrait);
-  alpha_channel=GetPixelChannelMapChannel(image,AlphaPixelChannel);
-  if (image->matte == MagickFalse)
-    SetPixelChannelMapTraits(image,AlphaPixelChannel,CopyPixelTrait);
-  else
-    for (i=0; i < (ssize_t) image->number_channels; i++)
-      if ((PixelChannel) i != alpha_channel)
-        SetPixelChannelMapTraits(image,(PixelChannel) i,(PixelTrait)
-          (UpdatePixelTrait | BlendPixelTrait));
-  if (0 && image->colorspace == GRAYColorspace)
-    {
-      image->number_channels=2;
-      SetPixelChannelMapChannel(image,GreenPixelChannel,RedPixelChannel);
-      SetPixelChannelMapChannel(image,BluePixelChannel,RedPixelChannel);
-    }
-  if (image->storage_class == PseudoClass)
-    {
-      SetPixelChannelMapChannel(image,IndexPixelChannel,IndexPixelChannel);
-      SetPixelChannelMapTraits(image,IndexPixelChannel,CopyPixelTrait);
-    }
-  image->number_channels+=image->number_meta_channels;
-  for ( ; i < (ssize_t) image->number_channels; i++)
-    SetPixelChannelMapTraits(image,(PixelChannel) i,CopyPixelTrait);
+    SetPixelChannelMap(image,IndexPixelChannel,CopyPixelTrait,n++);
+  assert((n+image->number_meta_channels) < MaxPixelChannels);
+  for (i=0; i < (ssize_t) image->number_meta_channels; i++)
+    SetPixelChannelMap(image,(PixelChannel) MetaPixelChannel+i,CopyPixelTrait,
+      n++);
+  image->number_channels=n;
   if (image->debug != MagickFalse)
     LogPixelChannels(image);
   (void) SetPixelChannelMask(image,image->channel_mask);
@@ -4275,8 +4216,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4323,8 +4264,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4377,8 +4318,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
           delta,
           epsilon;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4432,8 +4373,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         RectangleInfo
           geometry;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4474,8 +4415,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         }
       for (i=0; i < (ssize_t) GetPixelChannels(source); i++)
       {
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4495,8 +4436,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
         }
       for (i=0; i < (ssize_t) GetPixelChannels(source); i++)
       {
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4519,8 +4460,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
           delta,
           luminance;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -4639,8 +4580,8 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source,
           k,
           n;
 
-        traits=GetPixelChannelMapTraits(source,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(source,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(source,i);
+        channel=GetPixelChannelMapChannel(source,i);
         destination_traits=GetPixelChannelMapTraits(destination,channel);
         if ((traits == UndefinedPixelTrait) ||
             (destination_traits == UndefinedPixelTrait))
@@ -5437,18 +5378,18 @@ MagickExport MagickBooleanType IsFuzzyEquivalencePixelInfo(const PixelInfo *p,
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%   S e t P i x e l C h a n n e l M a p                                       %
+%   S e t P i x e l C h a n n e l M a p M a s k                               %
 %                                                                             %
 %                                                                             %
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  SetPixelChannelMap() sets the pixel channel map from the specified channel
-%  mask.
+%  SetPixelChannelMapMask() sets the pixel channel map from the specified
+%  channel mask.
 %
-%  The format of the SetPixelChannelMap method is:
+%  The format of the SetPixelChannelMapMask method is:
 %
-%      void SetPixelChannelMap(Image *image,const ChannelType channel_mask)
+%      void SetPixelChannelMapMask(Image *image,const ChannelType channel_mask)
 %
 %  A description of each parameter follows:
 %
@@ -5457,7 +5398,7 @@ MagickExport MagickBooleanType IsFuzzyEquivalencePixelInfo(const PixelInfo *p,
 %    o mask: the channel mask.
 %
 */
-MagickExport void SetPixelChannelMap(Image *image,
+MagickExport void SetPixelChannelMapMask(Image *image,
   const ChannelType channel_mask)
 {
 #define GetChannelBit(mask,bit)  (((size_t) (mask) >> (size_t) (bit)) & 0x01)
@@ -5467,12 +5408,16 @@ MagickExport void SetPixelChannelMap(Image *image,
 
   image->channel_mask=channel_mask;
   for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
-    SetPixelChannelMapTraits(image,(PixelChannel) i,
-      GetChannelBit(channel_mask,i) == 0 ? CopyPixelTrait :
+  {
+    PixelChannel
+      channel;
+
+    channel=GetPixelChannelMapChannel(image,i);
+    SetPixelChannelMapTraits(image,channel,
+      GetChannelBit(channel_mask,channel) == 0 ? CopyPixelTrait :
       image->matte == MagickFalse ? UpdatePixelTrait : (PixelTrait)
       (UpdatePixelTrait | BlendPixelTrait));
-  for ( ; i < MaxPixelChannels; i++)
-    SetPixelChannelMapTraits(image,(PixelChannel) i,UndefinedPixelTrait);
+  }
   if (image->storage_class == PseudoClass)
     SetPixelChannelMapTraits(image,IndexPixelChannel,CopyPixelTrait);
   if (image->debug != MagickFalse)
@@ -5513,6 +5458,6 @@ MagickExport ChannelType SetPixelChannelMask(Image *image,
 
   mask=image->channel_mask;
   image->channel_mask=channel_mask;
-  SetPixelChannelMap(image,channel_mask);
+  SetPixelChannelMapMask(image,channel_mask);
   return(mask);
 }
index 32bb0876eb3e43240d9d79d05f50cc9004eadac2..944b2ef11c8e9f274d4c323c3bef05a8ea824afa 100644 (file)
@@ -54,10 +54,11 @@ typedef enum
   BluePixelChannel = 2,
   YellowPixelChannel = 2,
   CrPixelChannel = 2,
-  AlphaPixelChannel = 3,
-  BlackPixelChannel = 4,
-  IndexPixelChannel = 4,
-  MaskPixelChannel = 5,
+  BlackPixelChannel = 3,
+  AlphaPixelChannel = 4,
+  IndexPixelChannel = 5,
+  MaskPixelChannel = 6,
+  MetaPixelChannel = 7,
   IntensityPixelChannel = MaxPixelChannels,
   CompositePixelChannel = MaxPixelChannels,
   SyncPixelChannel = MaxPixelChannels+1
@@ -78,6 +79,9 @@ typedef struct _PixelChannelMap
 
   PixelTrait
     traits;
+
+  int
+    offset;
 } PixelChannelMap;
 
 typedef struct _PixelInfo
@@ -154,7 +158,7 @@ extern MagickExport PixelInfo
 extern MagickExport void
   InitializePixelChannelMap(Image *),
   GetPixelInfo(const Image *,PixelInfo *),
-  SetPixelChannelMap(Image *,const ChannelType);
+  SetPixelChannelMapMask(Image *,const ChannelType);
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }
index 66519e767d56be37ebca3db9d6275585e25a7d2b..5525ef32f9817c6e13794ea08705d05a852f5028 100644 (file)
@@ -1745,8 +1745,8 @@ MagickExport Image *LiquidRescaleImage(const Image *image,const size_t columns,
         rescale_traits,
         traits;
 
-      traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-      channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+      traits=GetPixelChannelMapTraits(image,i);
+      channel=GetPixelChannelMapChannel(image,i);
       rescale_traits=GetPixelChannelMapTraits(rescale_image,channel);
       if ((traits == UndefinedPixelTrait) ||
           (rescale_traits == UndefinedPixelTrait))
@@ -2177,8 +2177,8 @@ static MagickBooleanType HorizontalFilter(const ResizeFilter *resize_filter,
         ssize_t
           k;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         resize_traits=GetPixelChannelMapTraits(resize_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (resize_traits == UndefinedPixelTrait))
@@ -2390,8 +2390,8 @@ static MagickBooleanType VerticalFilter(const ResizeFilter *resize_filter,
         ssize_t
           k;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         resize_traits=GetPixelChannelMapTraits(resize_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (resize_traits == UndefinedPixelTrait))
@@ -2700,8 +2700,8 @@ MagickExport Image *SampleImage(const Image *image,const size_t columns,
           sample_traits,
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         sample_traits=GetPixelChannelMapTraits(sample_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (sample_traits == UndefinedPixelTrait))
@@ -2890,7 +2890,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
         {
           for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
             if ((traits & BlendPixelTrait) == 0)
               {
                 x_vector[x*GetPixelChannels(image)+i]=(MagickRealType) p[i];
@@ -2923,7 +2923,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
               {
                 for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
                 {
-                  traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+                  traits=GetPixelChannelMapTraits(image,i);
                   if ((traits & BlendPixelTrait) == 0)
                     {
                       x_vector[x*GetPixelChannels(image)+i]=(MagickRealType)
@@ -2958,7 +2958,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
             {
               for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
               {
-                traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+                traits=GetPixelChannelMapTraits(image,i);
                 if ((traits & BlendPixelTrait) == 0)
                   {
                     x_vector[x*GetPixelChannels(image)+i]=(MagickRealType) p[i];
@@ -2999,8 +2999,8 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
         {
           for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
           {
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-            channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
+            channel=GetPixelChannelMapChannel(image,i);
             scale_traits=GetPixelChannelMapTraits(scale_image,channel);
             if ((traits == UndefinedPixelTrait) ||
                 (scale_traits == UndefinedPixelTrait))
@@ -3046,10 +3046,10 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
               }
             for (i=0; i < (ssize_t) GetPixelChannels(image); i++)
             {
-              traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+              traits=GetPixelChannelMapTraits(image,i);
               if (traits == UndefinedPixelTrait)
                 continue;
-              channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+              channel=GetPixelChannelMapChannel(image,i);
               pixel[i]+=span.x*scanline[x*GetPixelChannels(image)+i];
               scale_scanline[n*GetPixelChannels(scale_image)+channel]=pixel[i];
             }
@@ -3087,8 +3087,8 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns,
       {
         for (i=0; i < (ssize_t) GetPixelChannels(scale_image); i++)
         {
-          traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-          channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+          traits=GetPixelChannelMapTraits(image,i);
+          channel=GetPixelChannelMapChannel(image,i);
           scale_traits=GetPixelChannelMapTraits(scale_image,channel);
           if ((traits == UndefinedPixelTrait) ||
               (scale_traits == UndefinedPixelTrait))
index e039b2180e8e3eb3bffbc600ec46da246c9ee7a9..b9dcc71fa8988ff4639caab69a6882dc1fe087a7 100644 (file)
@@ -1097,8 +1097,8 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations,
                   rotate_traits,
                   traits;
 
-                traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-                channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+                traits=GetPixelChannelMapTraits(image,i);
+                channel=GetPixelChannelMapChannel(image,i);
                 rotate_traits=GetPixelChannelMapTraits(rotate_image,channel);
                 if ((traits == UndefinedPixelTrait) ||
                     (rotate_traits == UndefinedPixelTrait))
@@ -1183,8 +1183,8 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations,
               rotate_traits,
               traits;
 
-            traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-            channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(image,i);
+            channel=GetPixelChannelMapChannel(image,i);
             rotate_traits=GetPixelChannelMapTraits(rotate_image,channel);
             if ((traits == UndefinedPixelTrait) ||
                 (rotate_traits == UndefinedPixelTrait))
@@ -1306,8 +1306,8 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations,
                   rotate_traits,
                   traits;
 
-                traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-                channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+                traits=GetPixelChannelMapTraits(image,i);
+                channel=GetPixelChannelMapChannel(image,i);
                 rotate_traits=GetPixelChannelMapTraits(rotate_image,channel);
                 if ((traits == UndefinedPixelTrait) ||
                     (rotate_traits == UndefinedPixelTrait))
index 24cd7203c47d368458cc8048785c53dbdca25608..fb61628506f218c7668410ee612630a6f8f6d93e 100644 (file)
@@ -532,7 +532,7 @@ MagickExport MagickBooleanType SignatureImage(Image *image,
         register ssize_t
           j;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if ((traits & UpdatePixelTrait) == 0)
index d17a616f116ab0bd57b932a18b212687669a908f..1e664d6533f5a0713df9cef20f8a739123c3cd0d 100644 (file)
@@ -161,7 +161,8 @@ static PixelChannels **AcquirePixelThreadSet(const Image *image,
     number_threads;
 
   number_threads=GetOpenMPMaximumThreads();
-  pixels=(PixelChannels **) AcquireQuantumMemory(number_threads,sizeof(*pixels));
+  pixels=(PixelChannels **) AcquireQuantumMemory(number_threads,
+    sizeof(*pixels));
   if (pixels == (PixelChannels **) NULL)
     return((PixelChannels **) NULL);
   (void) ResetMagickMemory(pixels,0,number_threads*sizeof(*pixels));
@@ -254,10 +255,10 @@ static MagickRealType ApplyEvaluateOperator(RandomInfo *random_info,
     case AddModulusEvaluateOperator:
     {
       /*
-        This returns a 'floored modulus' of the addition which is a
-        positive result.  It differs from % or fmod() that returns a
-        'truncated modulus' result, where floor() is replaced by trunc() and
-        could return a negative result (which is clipped).
+        This returns a 'floored modulus' of the addition which is a positive
+        result.  It differs from % or fmod() that returns a 'truncated modulus'
+        result, where floor() is replaced by trunc() and could return a
+        negative result (which is clipped).
       */
       result=pixel+value;
       result-=(QuantumRange+1.0)*floor((double) result/(QuantumRange+1.0));
@@ -493,7 +494,7 @@ MagickExport Image *EvaluateImages(const Image *images,
   evaluate_view=AcquireCacheView(evaluate_image);
   if (op == MedianEvaluateOperator)
     {
-#if   defined(MAGICKCORE_OPENMP_SUPPORT)
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
       #pragma omp parallel for schedule(dynamic) shared(progress,status)
 #endif
       for (y=0; y < (ssize_t) evaluate_image->rows; y++)
@@ -671,8 +672,7 @@ MagickExport Image *EvaluateImages(const Image *images,
 
               evaluate_traits=GetPixelChannelMapTraits(evaluate_image,
                 (PixelChannel) i);
-              channel=GetPixelChannelMapChannel(evaluate_image,(PixelChannel)
-                i);
+              channel=GetPixelChannelMapChannel(evaluate_image,i);
               traits=GetPixelChannelMapTraits(next,channel);
               if ((traits == UndefinedPixelTrait) ||
                   (evaluate_traits == UndefinedPixelTrait))
@@ -680,8 +680,8 @@ MagickExport Image *EvaluateImages(const Image *images,
               if ((traits & UpdatePixelTrait) == 0)
                 continue;
               evaluate_pixel[x].channel[i]=ApplyEvaluateOperator(
-                random_info[id],GetPixelChannel(evaluate_image,channel,p),
-                j == 0 ? AddEvaluateOperator : op,evaluate_pixel[x].channel[i]);
+                random_info[id],GetPixelChannel(evaluate_image,channel,p),j ==
+                0 ? AddEvaluateOperator : op,evaluate_pixel[x].channel[i]);
             }
             p+=GetPixelChannels(next);
           }
@@ -727,7 +727,7 @@ MagickExport Image *EvaluateImages(const Image *images,
             PixelTrait
               traits;
 
-            traits=GetPixelChannelMapTraits(evaluate_image,(PixelChannel) i);
+            traits=GetPixelChannelMapTraits(evaluate_image,i);
             if (traits == UndefinedPixelTrait)
               continue;
             if ((traits & UpdatePixelTrait) == 0)
@@ -823,7 +823,7 @@ MagickExport MagickBooleanType EvaluateImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=ClampToQuantum(ApplyEvaluateOperator(random_info[id],q[i],op,
@@ -902,8 +902,8 @@ static Quantum ApplyFunction(Quantum pixel,const MagickFunction function,
     case PolynomialFunction:
     {
       /*
-        Polynomial: polynomial constants, highest to lowest order
-        (e.g. c0*x^3 + c1*x^2 + c2*x + c3).
+        Polynomial: polynomial constants, highest to lowest order (e.g. c0*x^3+
+        c1*x^2+c2*x+c3).
       */
       result=0.0;
       for (i=0; i < (ssize_t) number_parameters; i++)
@@ -939,8 +939,8 @@ static Quantum ApplyFunction(Quantum pixel,const MagickFunction function,
         width;
 
       /*
-        Arcsin (peged at range limits for invalid results):
-        width, center, range, and bias.
+        Arcsin (peged at range limits for invalid results): width, center,
+        range, and bias.
       */
       width=(number_parameters >= 1) ? parameters[0] : 1.0;
       center=(number_parameters >= 2) ? parameters[1] : 0.5;
@@ -1041,7 +1041,7 @@ MagickExport MagickBooleanType FunctionImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if ((traits & UpdatePixelTrait) == 0)
@@ -1176,7 +1176,7 @@ MagickExport MagickBooleanType GetImageMean(const Image *image,double *mean,
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if (traits == UndefinedPixelTrait)
       continue;
     if ((traits & UpdatePixelTrait) == 0)
@@ -1191,7 +1191,8 @@ MagickExport MagickBooleanType GetImageMean(const Image *image,double *mean,
   channel_statistics[CompositePixelChannel].standard_deviation=
     sqrt(channel_statistics[CompositePixelChannel].standard_deviation/area);
   *mean=channel_statistics[CompositePixelChannel].mean;
-  *standard_deviation=channel_statistics[CompositePixelChannel].standard_deviation;
+  *standard_deviation=
+    channel_statistics[CompositePixelChannel].standard_deviation;
   channel_statistics=(ChannelStatistics *) RelinquishMagickMemory(
     channel_statistics);
   return(MagickTrue);
@@ -1290,7 +1291,7 @@ MagickExport MagickBooleanType GetImageKurtosis(const Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if ((traits & UpdatePixelTrait) == 0)
@@ -1409,7 +1410,7 @@ MagickExport MagickBooleanType GetImageRange(const Image *image,double *minima,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if ((traits & UpdatePixelTrait) == 0)
@@ -1479,7 +1480,7 @@ static size_t GetImageChannels(const Image *image)
     PixelTrait
       traits;
 
-    traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+    traits=GetPixelChannelMapTraits(image,i);
     if ((traits & UpdatePixelTrait) != 0)
       channels++;
   }
@@ -1548,7 +1549,7 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         if (channel_statistics[i].depth != MAGICKCORE_QUANTUM_DEPTH)
@@ -1629,15 +1630,15 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image,
   {
     if (channel_statistics[i].standard_deviation == 0.0)
       continue;
-    channel_statistics[i].skewness=(channel_statistics[i].sum_cubed-
-      3.0*channel_statistics[i].mean*channel_statistics[i].sum_squared+
-      2.0*channel_statistics[i].mean*channel_statistics[i].mean*
+    channel_statistics[i].skewness=(channel_statistics[i].sum_cubed-3.0*
+      channel_statistics[i].mean*channel_statistics[i].sum_squared+2.0*
+      channel_statistics[i].mean*channel_statistics[i].mean*
       channel_statistics[i].mean)/(channel_statistics[i].standard_deviation*
       channel_statistics[i].standard_deviation*
       channel_statistics[i].standard_deviation);
-    channel_statistics[i].kurtosis=(channel_statistics[i].sum_fourth_power-
-      4.0*channel_statistics[i].mean*channel_statistics[i].sum_cubed+
-      6.0*channel_statistics[i].mean*channel_statistics[i].mean*
+    channel_statistics[i].kurtosis=(channel_statistics[i].sum_fourth_power-4.0*
+      channel_statistics[i].mean*channel_statistics[i].sum_cubed+6.0*
+      channel_statistics[i].mean*channel_statistics[i].mean*
       channel_statistics[i].sum_squared-3.0*channel_statistics[i].mean*
       channel_statistics[i].mean*1.0*channel_statistics[i].mean*
       channel_statistics[i].mean)/(channel_statistics[i].standard_deviation*
index 8d1e00d6a226c703abfee312d790cae9c68c8f86..6aa95d6fa08de4b8ba2954a5b9def4cf94cb4b52 100644 (file)
@@ -465,7 +465,7 @@ static MagickBooleanType GetOneAuthenticPixelFromStream(Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=q[i];
   }
   return(MagickTrue);
@@ -531,7 +531,7 @@ static MagickBooleanType GetOneVirtualPixelFromStream(const Image *image,
     PixelChannel
       channel;
 
-    channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+    channel=GetPixelChannelMapChannel(image,i);
     pixel[channel]=p[i];
   }
   return(MagickTrue);
index cb200c66518314cbd63c5944bf681a119b4a2a09..0ef604d7491651799e241379658816f994e5e643 100644 (file)
@@ -260,8 +260,8 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image,
         ssize_t
           v;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
-        channel=GetPixelChannelMapChannel(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
+        channel=GetPixelChannelMapChannel(image,i);
         threshold_traits=GetPixelChannelMapTraits(threshold_image,channel);
         if ((traits == UndefinedPixelTrait) ||
             (threshold_traits == UndefinedPixelTrait))
@@ -412,7 +412,7 @@ MagickExport MagickBooleanType BilevelImage(Image *image,const double threshold,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) != 0)
           q[i]=(Quantum) ((MagickRealType) q[i] <= threshold ? 0 :
             QuantumRange);
@@ -558,7 +558,7 @@ MagickExport MagickBooleanType BlackThresholdImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) == 0)
           continue;
         if ((MagickRealType) q[i] < threshold[n++ % 5])
@@ -698,7 +698,7 @@ MagickExport MagickBooleanType ClampImage(Image *image,ExceptionInfo *exception)
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if (traits == UndefinedPixelTrait)
           continue;
         q[i]=ClampToUnsignedQuantum(q[i]);
@@ -1320,7 +1320,7 @@ MagickExport MagickBooleanType OrderedPosterizeImage(Image *image,
           level,
           threshold;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) == 0)
           continue;
         if (fabs(levels[n++]) < MagickEpsilon)
@@ -1483,7 +1483,7 @@ MagickExport MagickBooleanType RandomThresholdImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) == 0)
           continue;
         if ((MagickRealType) q[i] < min_threshold)
@@ -1639,7 +1639,7 @@ MagickExport MagickBooleanType WhiteThresholdImage(Image *image,
         PixelTrait
           traits;
 
-        traits=GetPixelChannelMapTraits(image,(PixelChannel) i);
+        traits=GetPixelChannelMapTraits(image,i);
         if ((traits & UpdatePixelTrait) == 0)
           continue;
         if ((MagickRealType) q[i] > threshold[n++ % 5])
index b392bbdbb8e85de098cf96bf771a0d0a64760246..c3e14f8df234aec46ffe9a80f74eb4c67f35f08b 100644 (file)
@@ -27,14 +27,14 @@ extern "C" {
 */
 #define MagickPackageName "ImageMagick"
 #define MagickCopyright  "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision  "6029"
+#define MagickSVNRevision  "exported"
 #define MagickLibVersion  0x700
 #define MagickLibVersionText  "7.0.0"
 #define MagickLibVersionNumber  7,0,0
 #define MagickLibAddendum  "-0"
 #define MagickLibInterface  7
 #define MagickLibMinInterface  7
-#define MagickReleaseDate  "2011-11-19"
+#define MagickReleaseDate  "2011-12-03"
 #define MagickChangeDate   "20110801"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
index a665d7fba7bd3eb252c13d36c7802406a67f743f..aa5e4dc6f983a740b5a2ff67ab6b647105b1c76f 100644 (file)
@@ -393,7 +393,7 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
             if (channel < 0)
               ThrowCompareException(OptionError,"UnrecognizedChannelType",
                 argv[i]);
-            SetPixelChannelMap(image,(ChannelType) channel);
+            SetPixelChannelMapMask(image,(ChannelType) channel);
             break;
           }
         if (LocaleCompare("colorspace",option+1) == 0)
index fbc640755336dd39b722c523c36750df07a83fe1..478ec460074a3279b467f0225774f18795d89e95 100644 (file)
@@ -219,7 +219,7 @@ static MagickBooleanType CompositeImageList(ImageInfo *image_info,Image **image,
                 composite_image,geometry.x,geometry.y,exception);
             }
     }
-  (void) SetPixelChannelMap(composite_image,channel_mask);
+  (void) SetPixelChannelMapMask(composite_image,channel_mask);
   return(status != 0 ? MagickTrue : MagickFalse);
 }
 
index 8405d48de5435ed3ab2574c48434fe66449a80b2..b6d6d3f2190f9126eb9271dc0c63cc90d3c677c3 100644 (file)
@@ -1012,7 +1012,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               channel=DefaultChannels;
             else
               channel=(ChannelType) ParseChannelOption(argv[i+1]);
-            SetPixelChannelMap(*image,channel);
+            SetPixelChannelMapMask(*image,channel);
             break;
           }
         if (LocaleCompare("charcoal",option+1) == 0)
@@ -7360,7 +7360,7 @@ WandExport MagickBooleanType MogrifyImageList(ImageInfo *image_info,
                 break;
               }
             channel=(ChannelType) ParseChannelOption(argv[i+1]);
-            SetPixelChannelMap(*images,channel);
+            SetPixelChannelMapMask(*images,channel);
             break;
           }
         if (LocaleCompare("clut",option+1) == 0)
index 2fdb1fa30e40586367d8b9f4acac2040161ed24e..39d764188fe9039e71aede3b39824e206409ccb0 100644 (file)
@@ -3182,7 +3182,7 @@ Compare(ref,...)
                     "UnrecognizedType",SvPV(ST(i),na));
                   return;
                 }
-              SetPixelChannelMap(image,(ChannelType) option);
+              SetPixelChannelMapMask(image,(ChannelType) option);
               break;
             }
           ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
@@ -6145,7 +6145,7 @@ GetPixel(ref,...)
                     SvPV(ST(i),na));
                   return;
                 }
-              SetPixelChannelMap(image,(ChannelType) option);
+              SetPixelChannelMapMask(image,(ChannelType) option);
               break;
             }
           ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
index 0ae8fc3b0e6934c84100e68bdb5ed85fcbce4a02..a5fb68f8660a55365360ed2bd1d7bf63e87a139d 100644 (file)
@@ -370,7 +370,7 @@ push(@$images,$example);
 print "Scale...\n";
 $example=$model->Clone();
 $example->Label('Scale');
-$example->Scale('60%');
+#$example->Scale('60%');
 push(@$images,$example);
 
 print "Segment...\n";
index 30118d5dec18b2298c1f710e7d4cb1b2075dadcb..bdb9a50930278089e83f3a7786d58949c906bee1 100644 (file)
@@ -746,7 +746,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
           noise_image=AddNoiseImage(msl_info->image[n],noise,1.0,
             msl_info->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
           if (noise_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -1242,7 +1242,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           blur_image=BlurImage(msl_info->image[n],geometry_info.rho,
             geometry_info.sigma,geometry_info.xi,
             msl_info->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
           if (blur_image == (Image *) NULL)
             break;
           msl_info->image[n]=DestroyImage(msl_info->image[n]);
@@ -3796,7 +3796,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           (void) FloodfillPaintImage(msl_info->image[n],draw_info,&target,
             geometry.x,geometry.y,paint_method == FloodfillMethod ?
             MagickFalse : MagickTrue,msl_info->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
           draw_info=DestroyDrawInfo(draw_info);
           break;
         }
@@ -4100,7 +4100,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
           (void) NegateImage(msl_info->image[n],gray,
             msl_info->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
           break;
         }
       if (LocaleCompare((const char *) tag,"normalize") == 0)
@@ -4299,7 +4299,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           channel_mask=SetPixelChannelMask(msl_info->image[n],channel);
           (void) OpaquePaintImage(msl_info->image[n],&target,&fill_color,
             MagickFalse,msl_info->exception);
-          (void) SetPixelChannelMap(msl_info->image[n],channel_mask);
+          (void) SetPixelChannelMapMask(msl_info->image[n],channel_mask);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedElement",(const char *) tag);
index 12c23b17db76892542819bb5153f9fcc4e16a9c6..112d3873c27234b9f77d2a4dfd88bf8a1be8d86b 100644 (file)
@@ -11691,7 +11691,7 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
       (void) CopyMagickString(jpeg_image->magick,"JPEG",MaxTextExtent);
       channel_mask=SetPixelChannelMask(jpeg_image,AlphaChannel);
       status=SeparateImage(jpeg_image,exception);
-      (void) SetPixelChannelMap(jpeg_image,channel_mask);
+      (void) SetPixelChannelMapMask(jpeg_image,channel_mask);
       jpeg_image->matte=MagickFalse;
 
       if (jng_quality >= 1000)
index aeb5d857f87a4cb90d96186aa90306c1b94f98e9..a8f4c56d2fdd30cad94086ea57dd47e3802655b1 100644 (file)
@@ -523,7 +523,7 @@ static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
     ThrowWriterException(CoderError,exception->reason);
   channel_mask=SetPixelChannelMask(mask_image,AlphaChannel);
   status=SeparateImage(mask_image,exception);
-  (void) SetPixelChannelMap(mask_image,channel_mask);
+  (void) SetPixelChannelMapMask(mask_image,channel_mask);
   if (status == MagickFalse)
     {
       mask_image=DestroyImage(mask_image);