From 5a23c55ddcfdf6ae717dd42d8a1c1a2ff8c6305f Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 13 Feb 2013 14:34:28 +0000 Subject: [PATCH] --- MagickCore/attribute.c | 10 +-- MagickCore/cache-view.c | 15 +--- MagickCore/cache.c | 20 +---- MagickCore/channel.c | 34 ++----- MagickCore/compare.c | 155 +++++++++----------------------- MagickCore/composite.c | 84 +++++------------- MagickCore/decorate.c | 90 ++++--------------- MagickCore/effect.c | 130 +++++++-------------------- MagickCore/enhance.c | 116 ++++++------------------ MagickCore/fx.c | 139 ++++++++--------------------- MagickCore/histogram.c | 10 +-- MagickCore/image.c | 10 +-- MagickCore/paint.c | 13 +-- MagickCore/pixel.c | 75 ++++++++-------- MagickCore/quantum-export.c | 10 +-- MagickCore/quantum-import.c | 10 +-- MagickCore/resize.c | 129 +++++++-------------------- MagickCore/shear.c | 42 +++------ MagickCore/signature.c | 10 +-- MagickCore/statistic.c | 143 +++++++----------------------- MagickCore/stream.c | 10 +-- MagickCore/threshold.c | 91 +++++-------------- MagickCore/transform.c | 172 +++++++++--------------------------- 23 files changed, 386 insertions(+), 1132 deletions(-) diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c index 72b1eebe9..50a30a311 100644 --- a/MagickCore/attribute.c +++ b/MagickCore/attribute.c @@ -420,14 +420,8 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || (channel == IndexPixelChannel) || (channel == MaskPixelChannel)) continue; diff --git a/MagickCore/cache-view.c b/MagickCore/cache-view.c index 069afe331..a85a0380f 100644 --- a/MagickCore/cache-view.c +++ b/MagickCore/cache-view.c @@ -740,10 +740,7 @@ MagickExport MagickBooleanType GetOneCacheViewAuthenticPixel( } for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(cache_view->image,i); + PixelChannel channel=GetPixelChannelChannel(cache_view->image,i); pixel[channel]=p[i]; } return(MagickTrue); @@ -816,10 +813,7 @@ MagickExport MagickBooleanType GetOneCacheViewVirtualPixel( } for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(cache_view->image,i); + PixelChannel channel=GetPixelChannelChannel(cache_view->image,i); pixel[channel]=p[i]; } return(MagickTrue); @@ -950,10 +944,7 @@ MagickExport MagickBooleanType GetOneCacheViewVirtualMethodPixel( } for (i=0; i < (ssize_t) GetPixelChannels(cache_view->image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(cache_view->image,i); + PixelChannel channel=GetPixelChannelChannel(cache_view->image,i); pixel[channel]=p[i]; } return(MagickTrue); diff --git a/MagickCore/cache.c b/MagickCore/cache.c index d1f6a8a6f..2ce31b11b 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -1673,10 +1673,7 @@ MagickExport MagickBooleanType GetOneAuthenticPixel(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=q[i]; } return(MagickTrue); @@ -1748,10 +1745,7 @@ static MagickBooleanType GetOneAuthenticPixelFromCache(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=q[i]; } return(MagickTrue); @@ -1827,10 +1821,7 @@ MagickExport MagickBooleanType GetOneVirtualPixel(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=p[i]; } return(MagickTrue); @@ -1906,10 +1897,7 @@ static MagickBooleanType GetOneVirtualPixelFromCache(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=p[i]; } return(MagickTrue); diff --git a/MagickCore/channel.c b/MagickCore/channel.c index 29ebf59db..80c253643 100644 --- a/MagickCore/channel.c +++ b/MagickCore/channel.c @@ -530,21 +530,15 @@ MagickExport Image *CombineImages(const Image *image, next=image; for (i=0; i < (ssize_t) GetPixelChannels(combine_image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - register ssize_t x; - if (next == (Image *) NULL) - continue; - channel=GetPixelChannelChannel(combine_image,i); - traits=GetPixelChannelTraits(combine_image,channel); + PixelChannel channel=GetPixelChannelChannel(combine_image,i); + PixelTrait traits=GetPixelChannelTraits(combine_image,channel); if (traits == UndefinedPixelTrait) continue; + if (next == (Image *) NULL) + continue; image_view=AcquireVirtualCacheView(next,exception); p=GetCacheViewVirtualPixels(image_view,0,y,next->columns,1,exception); if (p == (const Quantum *) NULL) @@ -701,14 +695,8 @@ MagickExport Image *SeparateImage(const Image *image, double pixel; - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || (GetChannelBit(channel_type,channel) == 0)) continue; @@ -784,14 +772,8 @@ MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception) images=NewImageList(); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || ((traits & UpdatePixelTrait) == 0)) continue; diff --git a/MagickCore/compare.c b/MagickCore/compare.c index f255bfeeb..b3f89fa72 100644 --- a/MagickCore/compare.c +++ b/MagickCore/compare.c @@ -231,16 +231,10 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -370,16 +364,10 @@ static MagickBooleanType GetAbsoluteDistortion(const Image *image, difference=MagickFalse; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -417,14 +405,8 @@ static size_t GetImageChannels(const Image *image) channels=0; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) != 0) channels++; } @@ -494,16 +476,10 @@ static MagickBooleanType GetFuzzDistortion(const Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -595,16 +571,10 @@ static MagickBooleanType GetMeanAbsoluteDistortion(const Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -692,16 +662,10 @@ static MagickBooleanType GetMeanErrorPerPixel(Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -790,16 +754,10 @@ static MagickBooleanType GetMeanSquaredDistortion(const Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -900,16 +858,10 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion( } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -943,10 +895,7 @@ static MagickBooleanType GetNormalizedCrossCorrelationDistortion( double gamma; - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); gamma=image_statistics[i].standard_deviation* reconstruct_statistics[channel].standard_deviation; gamma=PerceptibleReciprocal(gamma); @@ -1025,16 +974,10 @@ static MagickBooleanType GetPeakAbsoluteDistortion(const Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -1438,16 +1381,10 @@ MagickExport MagickBooleanType IsImagesEqual(Image *image, double distance; - PixelChannel - channel; - - PixelTrait - reconstruct_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - reconstruct_traits=GetPixelChannelTraits(reconstruct_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait reconstruct_traits=GetPixelChannelTraits(reconstruct_image, + channel); if ((traits == UndefinedPixelTrait) || (reconstruct_traits == UndefinedPixelTrait) || ((reconstruct_traits & UpdatePixelTrait) == 0)) @@ -1637,16 +1574,10 @@ MagickExport Image *SimilarityImage(Image *image,const Image *reference, } for (i=0; i < (ssize_t) GetPixelChannels(similarity_image); i++) { - PixelChannel - channel; - - PixelTrait - similarity_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - similarity_traits=GetPixelChannelTraits(similarity_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait similarity_traits=GetPixelChannelTraits(similarity_image, + channel); if ((traits == UndefinedPixelTrait) || (similarity_traits == UndefinedPixelTrait) || ((similarity_traits & UpdatePixelTrait) == 0)) diff --git a/MagickCore/composite.c b/MagickCore/composite.c index 65b9f9f4b..630947ef6 100644 --- a/MagickCore/composite.c +++ b/MagickCore/composite.c @@ -440,16 +440,10 @@ static MagickBooleanType CompositeOverImage(Image *image, source,exception); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - composite_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - composite_traits=GetPixelChannelTraits(composite_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait composite_traits=GetPixelChannelTraits(composite_image, + channel); if ((traits == UndefinedPixelTrait) || (composite_traits == UndefinedPixelTrait)) continue; @@ -477,16 +471,10 @@ static MagickBooleanType CompositeOverImage(Image *image, alpha=Sa*(-Da)+Sa+Da; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - composite_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - composite_traits=GetPixelChannelTraits(composite_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait composite_traits=GetPixelChannelTraits(composite_image, + channel); if ((traits == UndefinedPixelTrait) || (composite_traits == UndefinedPixelTrait)) continue; @@ -667,16 +655,10 @@ MagickExport MagickBooleanType CompositeImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(composite_image); i++) { - PixelChannel - channel; - - PixelTrait - composite_traits, - traits; - - channel=GetPixelChannelChannel(composite_image,i); - composite_traits=GetPixelChannelTraits(composite_image,channel); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(composite_image,i); + PixelTrait composite_traits=GetPixelChannelTraits(composite_image, + channel); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || (composite_traits == UndefinedPixelTrait)) continue; @@ -1315,16 +1297,10 @@ MagickExport MagickBooleanType CompositeImage(Image *image, MagickRealType pixel; - PixelChannel - channel; - - PixelTrait - composite_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - composite_traits=GetPixelChannelTraits(composite_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait composite_traits=GetPixelChannelTraits(composite_image, + channel); if ((traits == UndefinedPixelTrait) || (composite_traits == UndefinedPixelTrait)) continue; @@ -1504,16 +1480,10 @@ MagickExport MagickBooleanType CompositeImage(Image *image, pixel, sans; - PixelChannel - channel; - - PixelTrait - composite_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - composite_traits=GetPixelChannelTraits(composite_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait composite_traits=GetPixelChannelTraits(composite_image, + channel); if (traits == UndefinedPixelTrait) continue; if ((compose != IntensityCompositeOp) && @@ -2499,16 +2469,10 @@ MagickExport MagickBooleanType TextureImage(Image *image,const Image *texture, } for (i=0; i < (ssize_t) GetPixelChannels(texture_image); i++) { - PixelChannel - channel; - - PixelTrait - texture_traits, - traits; - - channel=GetPixelChannelChannel(texture_image,i); - texture_traits=GetPixelChannelTraits(texture_image,channel); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(texture_image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait texture_traits=GetPixelChannelTraits(texture_image, + channel); if ((traits == UndefinedPixelTrait) || (texture_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/decorate.c b/MagickCore/decorate.c index 93f96a006..454582a4b 100644 --- a/MagickCore/decorate.c +++ b/MagickCore/decorate.c @@ -459,14 +459,8 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & (CopyPixelTrait | UpdatePixelTrait)) == 0) continue; q[i]=p[i]; @@ -733,14 +727,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*HighlightFactor+(double) @@ -757,14 +745,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*AccentuateFactor+ @@ -781,14 +763,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*ShadowFactor+(double) @@ -841,14 +817,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*HighlightFactor+(double) @@ -867,14 +837,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*ShadowFactor+(double) @@ -927,14 +891,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*HighlightFactor+(double) @@ -946,14 +904,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, { for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*TroughFactor+ @@ -970,14 +922,8 @@ MagickExport MagickBooleanType RaiseImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(QuantumScale*((double) q[i]*ShadowFactor+(double) diff --git a/MagickCore/effect.c b/MagickCore/effect.c index 2d71df202..130fa410d 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -357,13 +357,6 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const MagickRealType *restrict k; @@ -376,9 +369,9 @@ MagickExport Image *AdaptiveBlurImage(const Image *image,const double radius, ssize_t v; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -682,13 +675,6 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - sharp_traits, - traits; - register const MagickRealType *restrict k; @@ -701,9 +687,9 @@ MagickExport Image *AdaptiveSharpenImage(const Image *image,const double radius, ssize_t v; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - sharp_traits=GetPixelChannelTraits(sharp_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait sharp_traits=GetPixelChannelTraits(sharp_image,channel); if ((traits == UndefinedPixelTrait) || (sharp_traits == UndefinedPixelTrait)) continue; @@ -989,13 +975,6 @@ MagickExport Image *BlurImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const MagickRealType *restrict k; @@ -1005,9 +984,9 @@ MagickExport Image *BlurImage(const Image *image,const double radius, register ssize_t u; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -1113,13 +1092,6 @@ MagickExport Image *BlurImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const MagickRealType *restrict k; @@ -1129,9 +1101,9 @@ MagickExport Image *BlurImage(const Image *image,const double radius, register ssize_t u; - channel=GetPixelChannelChannel(blur_image,i); - traits=GetPixelChannelTraits(blur_image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(blur_image,i); + PixelTrait traits=GetPixelChannelTraits(blur_image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -1425,13 +1397,6 @@ MagickExport Image *DespeckleImage(const Image *image,ExceptionInfo *exception) despeckle_view=AcquireAuthenticCacheView(despeckle_image,exception); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - despeckle_traits, - traits; - register ssize_t k, x; @@ -1442,9 +1407,9 @@ MagickExport Image *DespeckleImage(const Image *image,ExceptionInfo *exception) if (status == MagickFalse) continue; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - despeckle_traits=GetPixelChannelTraits(despeckle_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait despeckle_traits=GetPixelChannelTraits(despeckle_image,channel); if ((traits == UndefinedPixelTrait) || (despeckle_traits == UndefinedPixelTrait)) continue; @@ -1993,13 +1958,6 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const Quantum *restrict r; @@ -2009,9 +1967,9 @@ MagickExport Image *MotionBlurImage(const Image *image,const double radius, register ssize_t j; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -2789,22 +2747,15 @@ MagickExport Image *RadialBlurImage(const Image *image,const double angle, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const Quantum *restrict r; register ssize_t j; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -3091,13 +3042,6 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius, gamma, pixel; - PixelChannel - channel; - - PixelTrait - blur_traits, - traits; - register const MagickRealType *restrict k; @@ -3111,9 +3055,9 @@ MagickExport Image *SelectiveBlurImage(const Image *image,const double radius, ssize_t v; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - blur_traits=GetPixelChannelTraits(blur_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait blur_traits=GetPixelChannelTraits(blur_image,channel); if ((traits == UndefinedPixelTrait) || (blur_traits == UndefinedPixelTrait)) continue; @@ -3397,16 +3341,9 @@ MagickExport Image *ShadeImage(const Image *image,const MagickBooleanType gray, } for (i=0; i < (ssize_t) GetPixelChannels(linear_image); i++) { - PixelChannel - channel; - - PixelTrait - shade_traits, - traits; - - channel=GetPixelChannelChannel(linear_image,i); - traits=GetPixelChannelTraits(linear_image,channel); - shade_traits=GetPixelChannelTraits(shade_image,channel); + PixelChannel channel=GetPixelChannelChannel(linear_image,i); + PixelTrait traits=GetPixelChannelTraits(linear_image,channel); + PixelTrait shade_traits=GetPixelChannelTraits(shade_image,channel); if ((traits == UndefinedPixelTrait) || (shade_traits == UndefinedPixelTrait)) continue; @@ -3825,16 +3762,9 @@ MagickExport Image *UnsharpMaskImage(const Image *image,const double radius, double pixel; - PixelChannel - channel; - - PixelTrait - traits, - unsharp_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - unsharp_traits=GetPixelChannelTraits(unsharp_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait unsharp_traits=GetPixelChannelTraits(unsharp_image,channel); if ((traits == UndefinedPixelTrait) || (unsharp_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c index fb447d7e7..b3d66dbe0 100644 --- a/MagickCore/enhance.c +++ b/MagickCore/enhance.c @@ -138,14 +138,8 @@ MagickExport MagickBooleanType AutoGammaImage(Image *image, ChannelType channel_mask; - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; channel_mask=SetImageChannelMask(image,(ChannelType) (1 << i)); @@ -1231,14 +1225,8 @@ MagickExport MagickBooleanType ContrastStretchImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (((traits & UpdatePixelTrait) == 0) || (black[i] == white[i])) continue; q[i]=ClampToQuantum(stretch_map[GetPixelChannels(image)* @@ -1399,19 +1387,12 @@ MagickExport Image *EnhanceImage(const Image *image,ExceptionInfo *exception) mean, total_weight; - PixelChannel - channel; - - PixelTrait - enhance_traits, - traits; - register const Quantum *restrict r; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - enhance_traits=GetPixelChannelTraits(enhance_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait enhance_traits=GetPixelChannelTraits(enhance_image,channel); if ((traits == UndefinedPixelTrait) || (enhance_traits == UndefinedPixelTrait)) continue; @@ -1618,9 +1599,6 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, map=(double *) RelinquishMagickMemory(map); if (image->storage_class == PseudoClass) { - PixelChannel - channel; - register ssize_t j; @@ -1631,7 +1609,7 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, { if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0) { - channel=GetPixelChannelChannel(image,RedPixelChannel); + PixelChannel channel=GetPixelChannelChannel(image,RedPixelChannel); if (black[channel] != white[channel]) image->colormap[j].red=equalize_map[GetPixelChannels(image)* ScaleQuantumToMap(ClampToQuantum(image->colormap[j].red))]+ @@ -1639,7 +1617,8 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, } if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0) { - channel=GetPixelChannelChannel(image,GreenPixelChannel); + PixelChannel channel=GetPixelChannelChannel(image, + GreenPixelChannel); if (black[channel] != white[channel]) image->colormap[j].green=equalize_map[GetPixelChannels(image)* ScaleQuantumToMap(ClampToQuantum(image->colormap[j].green))]+ @@ -1647,7 +1626,7 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, } if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0) { - channel=GetPixelChannelChannel(image,BluePixelChannel); + PixelChannel channel=GetPixelChannelChannel(image,BluePixelChannel); if (black[channel] != white[channel]) image->colormap[j].blue=equalize_map[GetPixelChannels(image)* ScaleQuantumToMap(ClampToQuantum(image->colormap[j].blue))]+ @@ -1655,7 +1634,8 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, } if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0) { - channel=GetPixelChannelChannel(image,AlphaPixelChannel); + PixelChannel channel=GetPixelChannelChannel(image, + AlphaPixelChannel); if (black[channel] != white[channel]) image->colormap[j].alpha=equalize_map[GetPixelChannels(image)* ScaleQuantumToMap(ClampToQuantum(image->colormap[j].alpha))]+ @@ -1700,14 +1680,8 @@ MagickExport MagickBooleanType EqualizeImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (((traits & UpdatePixelTrait) == 0) || (black[i] == white[i])) continue; q[i]=ClampToQuantum(equalize_map[GetPixelChannels(image)* @@ -1867,14 +1841,8 @@ MagickExport MagickBooleanType GammaImage(Image *image,const double gamma, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=gamma_map[ScaleQuantumToMap(q[i])]; @@ -2242,14 +2210,8 @@ MagickExport MagickBooleanType LevelImage(Image *image,const double black_point, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(LevelPixel(black_point,white_point,gamma, @@ -2407,14 +2369,8 @@ MagickExport MagickBooleanType LevelizeImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=LevelizeValue(q[i]); @@ -3117,14 +3073,8 @@ MagickExport MagickBooleanType NegateImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=QuantumRange-q[i]; @@ -3186,14 +3136,8 @@ MagickExport MagickBooleanType NegateImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=QuantumRange-q[i]; @@ -3488,14 +3432,8 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if (sharpen != MagickFalse) diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 653319e56..93e462b94 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -355,16 +355,9 @@ MagickExport Image *AddNoiseImage(const Image *image,const NoiseType noise_type, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - noise_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - noise_traits=GetPixelChannelTraits(noise_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait noise_traits=GetPixelChannelTraits(noise_image,channel); if ((traits == UndefinedPixelTrait) || (noise_traits == UndefinedPixelTrait)) continue; @@ -777,16 +770,10 @@ MagickExport Image *ColorizeImage(const Image *image,const char *blend, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - colorize_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - colorize_traits=GetPixelChannelTraits(colorize_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait colorize_traits=GetPixelChannelTraits(colorize_image, + channel); if ((traits == UndefinedPixelTrait) || (colorize_traits == UndefinedPixelTrait)) continue; @@ -3109,16 +3096,9 @@ MagickExport Image *FxImage(const Image *image,const char *expression, double alpha; - PixelChannel - channel; - - PixelTrait - fx_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - fx_traits=GetPixelChannelTraits(fx_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait fx_traits=GetPixelChannelTraits(fx_image,channel); if ((traits == UndefinedPixelTrait) || (fx_traits == UndefinedPixelTrait)) continue; @@ -3317,16 +3297,10 @@ MagickExport Image *ImplodeImage(const Image *image,const double amount, if (distance >= (radius*radius)) for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - implode_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - implode_traits=GetPixelChannelTraits(implode_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait implode_traits=GetPixelChannelTraits(implode_image, + channel); if ((traits == UndefinedPixelTrait) || (implode_traits == UndefinedPixelTrait)) continue; @@ -3547,16 +3521,9 @@ MagickExport Image *MorphImages(const Image *image,const size_t number_frames, for (i=0; i < (ssize_t) GetPixelChannels(morph_image); i++) { - PixelChannel - channel; - - PixelTrait - morph_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - morph_traits=GetPixelChannelTraits(morph_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait morph_traits=GetPixelChannelTraits(morph_image,channel); if ((traits == UndefinedPixelTrait) || (morph_traits == UndefinedPixelTrait)) continue; @@ -3669,12 +3636,6 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, double plasma; - PixelChannel - channel; - - PixelTrait - traits; - register const Quantum *restrict u, *restrict v; @@ -3751,8 +3712,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, return(MagickTrue); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma); @@ -3774,8 +3735,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, return(MagickTrue); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma); @@ -3801,8 +3762,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, return(MagickTrue); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma); @@ -3825,8 +3786,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, return(MagickTrue); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma); @@ -3851,8 +3812,8 @@ static MagickBooleanType PlasmaImageProxy(Image *image,CacheView *image_view, return(MagickTrue); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PlasmaPixel(random_info,(u[channel]+v[channel])/2.0,plasma); @@ -4497,14 +4458,8 @@ MagickExport Image *SketchImage(const Image *image,const double radius, value=GetPseudoRandomValue(random_info[id]); for (i=0; i < (ssize_t) GetPixelChannels(random_image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=ClampToQuantum(QuantumRange*value); @@ -4663,14 +4618,8 @@ MagickExport MagickBooleanType SolarizeImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || ((traits & CopyPixelTrait) != 0)) continue; @@ -5163,16 +5112,9 @@ MagickExport Image *SwirlImage(const Image *image,double degrees, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - swirl_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - swirl_traits=GetPixelChannelTraits(swirl_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait swirl_traits=GetPixelChannelTraits(swirl_image,channel); if ((traits == UndefinedPixelTrait) || (swirl_traits == UndefinedPixelTrait)) continue; @@ -5386,16 +5328,9 @@ MagickExport Image *TintImage(const Image *image,const char *blend, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - tint_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - tint_traits=GetPixelChannelTraits(tint_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait tint_traits=GetPixelChannelTraits(tint_image,channel); if ((traits == UndefinedPixelTrait) || (tint_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/histogram.c b/MagickCore/histogram.c index 0eee2cacf..f01264089 100644 --- a/MagickCore/histogram.c +++ b/MagickCore/histogram.c @@ -1011,14 +1011,8 @@ MagickExport MagickBooleanType MinMaxStretchImage(Image *image, ChannelType channel_mask; - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; channel_mask=SetImageChannelMask(image,(ChannelType) (1 << i)); diff --git a/MagickCore/image.c b/MagickCore/image.c index eaa6e0d49..7e877c859 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -2105,14 +2105,8 @@ static inline void FlattenPixelInfo(const Image *image,const PixelInfo *p, gamma=PerceptibleReciprocal(gamma); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; switch (channel) diff --git a/MagickCore/paint.c b/MagickCore/paint.c index f11b9f9a3..e81c41c09 100644 --- a/MagickCore/paint.c +++ b/MagickCore/paint.c @@ -670,16 +670,9 @@ MagickExport Image *OilPaintImage(const Image *image,const double radius, } for (i=0; i < (ssize_t) GetPixelChannels(linear_image); i++) { - PixelChannel - channel; - - PixelTrait - paint_traits, - traits; - - channel=GetPixelChannelChannel(linear_image,i); - traits=GetPixelChannelTraits(linear_image,channel); - paint_traits=GetPixelChannelTraits(paint_image,channel); + PixelChannel channel=GetPixelChannelChannel(linear_image,i); + PixelTrait traits=GetPixelChannelTraits(linear_image,channel); + PixelTrait paint_traits=GetPixelChannelTraits(paint_image,channel); if ((traits == UndefinedPixelTrait) || (paint_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c index 21d69a142..5e97f880b 100644 --- a/MagickCore/pixel.c +++ b/MagickCore/pixel.c @@ -4592,13 +4592,6 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, gamma, pixels[16]; - PixelChannel - channel; - - PixelTrait - destination_traits, - traits; - register const Quantum *p; @@ -4661,9 +4654,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, register ssize_t j; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4706,9 +4700,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, delta, epsilon; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4761,9 +4756,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, register ssize_t j; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4835,9 +4831,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, register ssize_t j; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4887,9 +4884,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, RectangleInfo geometry; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4931,9 +4929,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, } for (i=0; i < (ssize_t) GetPixelChannels(source); i++) { - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4953,9 +4952,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, } for (i=0; i < (ssize_t) GetPixelChannels(source); i++) { - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -4977,9 +4977,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, delta, luminance; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -5088,9 +5089,10 @@ MagickExport MagickBooleanType InterpolatePixelChannels(const Image *source, register ssize_t j; - channel=GetPixelChannelChannel(source,i); - traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -5941,10 +5943,7 @@ MagickExport void SetPixelChannelMask(Image *image, image->channel_mask=channel_mask; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); SetPixelChannelTraits(image,channel, GetChannelBit(channel_mask,channel) == 0 ? CopyPixelTrait : image->alpha_trait != BlendPixelTrait || (channel == AlphaPixelChannel) ? diff --git a/MagickCore/quantum-export.c b/MagickCore/quantum-export.c index 5dfc99fc4..7da0ee9ed 100644 --- a/MagickCore/quantum-export.c +++ b/MagickCore/quantum-export.c @@ -3248,14 +3248,8 @@ MagickExport size_t ExportQuantumPixels(const Image *image, Sa=QuantumScale*GetPixelAlpha(image,q); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(Sa*q[i]); diff --git a/MagickCore/quantum-import.c b/MagickCore/quantum-import.c index 450badc5e..cd6e32911 100644 --- a/MagickCore/quantum-import.c +++ b/MagickCore/quantum-import.c @@ -3613,14 +3613,8 @@ MagickExport size_t ImportQuantumPixels(const Image *image, gamma=PerceptibleReciprocal(Sa); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; q[i]=ClampToQuantum(gamma*q[i]); diff --git a/MagickCore/resize.c b/MagickCore/resize.c index 9825dadf9..a3bd5cf1a 100644 --- a/MagickCore/resize.c +++ b/MagickCore/resize.c @@ -1659,16 +1659,9 @@ MagickExport Image *InterpolativeResizeImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(resize_image); i++) { - PixelChannel - channel; - - PixelTrait - resize_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - resize_traits=GetPixelChannelTraits(resize_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait resize_traits=GetPixelChannelTraits(resize_image,channel); if ((traits == UndefinedPixelTrait) || (resize_traits == UndefinedPixelTrait)) continue; @@ -1882,16 +1875,9 @@ MagickExport Image *LiquidRescaleImage(const Image *image,const size_t columns, break; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - rescale_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - rescale_traits=GetPixelChannelTraits(rescale_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait rescale_traits=GetPixelChannelTraits(rescale_image,channel); if ((traits == UndefinedPixelTrait) || (rescale_traits == UndefinedPixelTrait)) continue; @@ -2308,22 +2294,15 @@ static MagickBooleanType HorizontalFilter(const ResizeFilter *resize_filter, gamma, pixel; - PixelChannel - channel; - - PixelTrait - resize_traits, - traits; - register ssize_t j; ssize_t k; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - resize_traits=GetPixelChannelTraits(resize_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait resize_traits=GetPixelChannelTraits(resize_image,channel); if ((traits == UndefinedPixelTrait) || (resize_traits == UndefinedPixelTrait)) continue; @@ -2523,22 +2502,15 @@ static MagickBooleanType VerticalFilter(const ResizeFilter *resize_filter, gamma, pixel; - PixelChannel - channel; - - PixelTrait - resize_traits, - traits; - register ssize_t j; ssize_t k; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - resize_traits=GetPixelChannelTraits(resize_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait resize_traits=GetPixelChannelTraits(resize_image,channel); if ((traits == UndefinedPixelTrait) || (resize_traits == UndefinedPixelTrait)) continue; @@ -2842,16 +2814,9 @@ MagickExport Image *SampleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(sample_image); i++) { - PixelChannel - channel; - - PixelTrait - sample_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - sample_traits=GetPixelChannelTraits(sample_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait sample_traits=GetPixelChannelTraits(sample_image,channel); if ((traits == UndefinedPixelTrait) || (sample_traits == UndefinedPixelTrait)) continue; @@ -2940,13 +2905,6 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, proceed, status; - PixelChannel - channel; - - PixelTrait - scale_traits, - traits; - PointInfo scale, span; @@ -3056,14 +3014,8 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & BlendPixelTrait) == 0) { x_vector[x*GetPixelChannels(image)+i]=(double) p[i]; @@ -3103,18 +3055,11 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & BlendPixelTrait) == 0) { - x_vector[x*GetPixelChannels(image)+i]=(double) - p[i]; + x_vector[x*GetPixelChannels(image)+i]=(double) p[i]; continue; } alpha=QuantumScale*GetPixelAlpha(image,p); @@ -3153,14 +3098,8 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & BlendPixelTrait) == 0) { x_vector[x*GetPixelChannels(image)+i]=(double) p[i]; @@ -3209,9 +3148,9 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, ssize_t offset; - channel=GetPixelChannelChannel(scale_image,i); - traits=GetPixelChannelTraits(image,channel); - scale_traits=GetPixelChannelTraits(scale_image,channel); + PixelChannel channel=GetPixelChannelChannel(scale_image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait scale_traits=GetPixelChannelTraits(scale_image,channel); if ((traits == UndefinedPixelTrait) || (scale_traits == UndefinedPixelTrait)) continue; @@ -3257,14 +3196,8 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; pixel[i]+=span.x*scanline[x*GetPixelChannels(image)+i]; @@ -3297,7 +3230,7 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, ((ssize_t) n < (ssize_t) scale_image->columns)) for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); scale_scanline[n*MaxPixelChannels+channel]=pixel[i]; } /* @@ -3312,9 +3245,9 @@ MagickExport Image *ScaleImage(const Image *image,const size_t columns, } for (i=0; i < (ssize_t) GetPixelChannels(scale_image); i++) { - channel=GetPixelChannelChannel(scale_image,i); - traits=GetPixelChannelTraits(image,channel); - scale_traits=GetPixelChannelTraits(scale_image,channel); + PixelChannel channel=GetPixelChannelChannel(scale_image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait scale_traits=GetPixelChannelTraits(scale_image,channel); if ((traits == UndefinedPixelTrait) || (scale_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/shear.c b/MagickCore/shear.c index 86fc662c5..6de880d60 100644 --- a/MagickCore/shear.c +++ b/MagickCore/shear.c @@ -1101,16 +1101,10 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - rotate_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - rotate_traits=GetPixelChannelTraits(rotate_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait rotate_traits=GetPixelChannelTraits(rotate_image, + channel); if ((traits == UndefinedPixelTrait) || (rotate_traits == UndefinedPixelTrait)) continue; @@ -1193,16 +1187,10 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - rotate_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - rotate_traits=GetPixelChannelTraits(rotate_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait rotate_traits=GetPixelChannelTraits(rotate_image, + channel); if ((traits == UndefinedPixelTrait) || (rotate_traits == UndefinedPixelTrait)) continue; @@ -1323,16 +1311,10 @@ MagickExport Image *IntegralRotateImage(const Image *image,size_t rotations, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - rotate_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - rotate_traits=GetPixelChannelTraits(rotate_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait rotate_traits=GetPixelChannelTraits(rotate_image, + channel); if ((traits == UndefinedPixelTrait) || (rotate_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/signature.c b/MagickCore/signature.c index 4a93685d5..8e13e513e 100644 --- a/MagickCore/signature.c +++ b/MagickCore/signature.c @@ -531,17 +531,11 @@ MagickExport MagickBooleanType SignatureImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - register ssize_t j; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; pixel=QuantumScale*p[i]; diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c index d3bcc5188..7c570f642 100644 --- a/MagickCore/statistic.c +++ b/MagickCore/statistic.c @@ -551,16 +551,9 @@ MagickExport Image *EvaluateImages(const Image *images, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - evaluate_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - evaluate_traits=GetPixelChannelTraits(image,channel); - traits=GetPixelChannelTraits(next,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait evaluate_traits=GetPixelChannelTraits(image,channel); + PixelTrait traits=GetPixelChannelTraits(next,channel); if ((traits == UndefinedPixelTrait) || (evaluate_traits == UndefinedPixelTrait)) continue; @@ -664,16 +657,9 @@ MagickExport Image *EvaluateImages(const Image *images, } for (i=0; i < (ssize_t) GetPixelChannels(next); i++) { - PixelChannel - channel; - - PixelTrait - evaluate_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(next,channel); - evaluate_traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(next,channel); + PixelTrait evaluate_traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || (evaluate_traits == UndefinedPixelTrait)) continue; @@ -729,14 +715,8 @@ MagickExport Image *EvaluateImages(const Image *images, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if ((traits & UpdatePixelTrait) == 0) @@ -838,14 +818,8 @@ MagickExport MagickBooleanType EvaluateImage(Image *image, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if (((traits & CopyPixelTrait) != 0) || @@ -1069,14 +1043,8 @@ MagickExport MagickBooleanType FunctionImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if ((traits & UpdatePixelTrait) == 0) @@ -1208,14 +1176,8 @@ MagickExport MagickBooleanType GetImageMean(const Image *image,double *mean, channel_statistics[CompositePixelChannel].standard_deviation=0.0; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if ((traits & UpdatePixelTrait) == 0) @@ -1328,14 +1290,8 @@ MagickExport MagickBooleanType GetImageKurtosis(const Image *image, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if (((traits & UpdatePixelTrait) == 0) || @@ -1460,14 +1416,8 @@ MagickExport MagickBooleanType GetImageRange(const Image *image,double *minima, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if ((traits & UpdatePixelTrait) == 0) @@ -1543,14 +1493,8 @@ static size_t GetImageChannels(const Image *image) channels=0; for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) != 0) channels++; } @@ -1618,14 +1562,8 @@ MagickExport ChannelStatistics *GetImageStatistics(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if (channel_statistics[channel].depth != MAGICKCORE_QUANTUM_DEPTH) @@ -1893,16 +1831,9 @@ MagickExport Image *PolynomialImage(const Image *images, coefficient, degree; - PixelChannel - channel; - - PixelTrait - polynomial_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(next,channel); - polynomial_traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(next,channel); + PixelTrait polynomial_traits=GetPixelChannelTraits(image,channel); if ((traits == UndefinedPixelTrait) || (polynomial_traits == UndefinedPixelTrait)) continue; @@ -1930,14 +1861,8 @@ MagickExport Image *PolynomialImage(const Image *images, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; if ((traits & UpdatePixelTrait) == 0) @@ -2535,13 +2460,6 @@ MagickExport Image *StatisticImage(const Image *image,const StatisticType type, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - statistic_traits, - traits; - Quantum pixel; @@ -2554,9 +2472,10 @@ MagickExport Image *StatisticImage(const Image *image,const StatisticType type, ssize_t v; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - statistic_traits=GetPixelChannelTraits(statistic_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait statistic_traits=GetPixelChannelTraits(statistic_image, + channel); if ((traits == UndefinedPixelTrait) || (statistic_traits == UndefinedPixelTrait)) continue; diff --git a/MagickCore/stream.c b/MagickCore/stream.c index 2054e156b..d6dc3cfd3 100644 --- a/MagickCore/stream.c +++ b/MagickCore/stream.c @@ -464,10 +464,7 @@ static MagickBooleanType GetOneAuthenticPixelFromStream(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=q[i]; } return(MagickTrue); @@ -531,10 +528,7 @@ static MagickBooleanType GetOneVirtualPixelFromStream(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - channel=GetPixelChannelChannel(image,i); + PixelChannel channel=GetPixelChannelChannel(image,i); pixel[channel]=p[i]; } return(MagickTrue); diff --git a/MagickCore/threshold.c b/MagickCore/threshold.c index 6480605df..bfbff3158 100644 --- a/MagickCore/threshold.c +++ b/MagickCore/threshold.c @@ -212,13 +212,6 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image, channel_bias[MaxPixelChannels], channel_sum[MaxPixelChannels]; - PixelChannel - channel; - - PixelTrait - threshold_traits, - traits; - register const Quantum *restrict p, *restrict pixels; @@ -250,9 +243,10 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image, GetPixelChannels(image)*(width/2); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - threshold_traits=GetPixelChannelTraits(threshold_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait threshold_traits=GetPixelChannelTraits(threshold_image, + channel); if ((traits == UndefinedPixelTrait) || (threshold_traits == UndefinedPixelTrait)) continue; @@ -284,9 +278,10 @@ MagickExport Image *AdaptiveThresholdImage(const Image *image, double mean; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - threshold_traits=GetPixelChannelTraits(threshold_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait threshold_traits=GetPixelChannelTraits(threshold_image, + channel); if ((traits == UndefinedPixelTrait) || (threshold_traits == UndefinedPixelTrait)) continue; @@ -445,14 +440,8 @@ MagickExport MagickBooleanType BilevelImage(Image *image,const double threshold, pixel=GetPixelIntensity(image,q); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if (image->channel_mask != DefaultChannels) @@ -616,14 +605,8 @@ MagickExport MagickBooleanType BlackThresholdImage(Image *image, pixel=GetPixelIntensity(image,q); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if (image->channel_mask != DefaultChannels) @@ -770,14 +753,8 @@ MagickExport MagickBooleanType ClampImage(Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=ClampPixel(q[i]); @@ -1397,18 +1374,12 @@ MagickExport MagickBooleanType OrderedPosterizeImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - ssize_t level, threshold; - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if (fabs(levels[n++]) < MagickEpsilon) @@ -1567,14 +1538,8 @@ MagickExport MagickBooleanType PerceptibleImage(Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if (traits == UndefinedPixelTrait) continue; q[i]=PerceptibleThreshold(q[i],epsilon); @@ -1740,14 +1705,8 @@ MagickExport MagickBooleanType RandomThresholdImage(Image *image, double threshold; - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if ((double) q[i] < min_threshold) @@ -1918,14 +1877,8 @@ MagickExport MagickBooleanType WhiteThresholdImage(Image *image, pixel=GetPixelIntensity(image,q); for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); if ((traits & UpdatePixelTrait) == 0) continue; if (image->channel_mask != DefaultChannels) diff --git a/MagickCore/transform.c b/MagickCore/transform.c index 5e13c9e3a..3671a5ae8 100644 --- a/MagickCore/transform.c +++ b/MagickCore/transform.c @@ -283,16 +283,9 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - chop_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - chop_traits=GetPixelChannelTraits(chop_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait chop_traits=GetPixelChannelTraits(chop_image,channel); if ((traits == UndefinedPixelTrait) || (chop_traits == UndefinedPixelTrait)) continue; @@ -355,16 +348,9 @@ MagickExport Image *ChopImage(const Image *image,const RectangleInfo *chop_info, for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - chop_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - chop_traits=GetPixelChannelTraits(chop_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait chop_traits=GetPixelChannelTraits(chop_image,channel); if ((traits == UndefinedPixelTrait) || (chop_traits == UndefinedPixelTrait)) continue; @@ -717,16 +703,9 @@ MagickExport Image *CropImage(const Image *image,const RectangleInfo *geometry, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - crop_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - crop_traits=GetPixelChannelTraits(crop_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait crop_traits=GetPixelChannelTraits(crop_image,channel); if ((traits == UndefinedPixelTrait) || (crop_traits == UndefinedPixelTrait)) continue; @@ -1079,16 +1058,9 @@ MagickExport Image *ExcerptImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - excerpt_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - excerpt_traits=GetPixelChannelTraits(excerpt_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait excerpt_traits=GetPixelChannelTraits(excerpt_image,channel); if ((traits == UndefinedPixelTrait) || (excerpt_traits == UndefinedPixelTrait)) continue; @@ -1286,16 +1258,9 @@ MagickExport Image *FlipImage(const Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - flip_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - flip_traits=GetPixelChannelTraits(flip_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait flip_traits=GetPixelChannelTraits(flip_image,channel); if ((traits == UndefinedPixelTrait) || (flip_traits == UndefinedPixelTrait)) continue; @@ -1434,16 +1399,9 @@ MagickExport Image *FlopImage(const Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - flop_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - flop_traits=GetPixelChannelTraits(flop_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait flop_traits=GetPixelChannelTraits(flop_image,channel); if ((traits == UndefinedPixelTrait) || (flop_traits == UndefinedPixelTrait)) continue; @@ -1568,16 +1526,10 @@ static inline MagickBooleanType CopyImageRegion(Image *destination, } for (i=0; i < (ssize_t) GetPixelChannels(source); i++) { - PixelChannel - channel; - - PixelTrait - destination_traits, - source_traits; - - channel=GetPixelChannelChannel(source,i); - source_traits=GetPixelChannelTraits(source,channel); - destination_traits=GetPixelChannelTraits(destination,channel); + PixelChannel channel=GetPixelChannelChannel(source,i); + PixelTrait source_traits=GetPixelChannelTraits(source,channel); + PixelTrait destination_traits=GetPixelChannelTraits(destination, + channel); if ((source_traits == UndefinedPixelTrait) || (destination_traits == UndefinedPixelTrait)) continue; @@ -1892,16 +1844,9 @@ MagickExport Image *SpliceImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - splice_traits, - traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - splice_traits=GetPixelChannelTraits(splice_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait splice_traits=GetPixelChannelTraits(splice_image,channel); if ((traits == UndefinedPixelTrait) || (splice_traits == UndefinedPixelTrait)) continue; @@ -1925,16 +1870,9 @@ MagickExport Image *SpliceImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits, - splice_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - splice_traits=GetPixelChannelTraits(splice_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait splice_traits=GetPixelChannelTraits(splice_image,channel); if ((traits == UndefinedPixelTrait) || (splice_traits == UndefinedPixelTrait)) continue; @@ -2001,16 +1939,9 @@ MagickExport Image *SpliceImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits, - splice_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - splice_traits=GetPixelChannelTraits(splice_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait splice_traits=GetPixelChannelTraits(splice_image,channel); if ((traits == UndefinedPixelTrait) || (splice_traits == UndefinedPixelTrait)) continue; @@ -2034,16 +1965,9 @@ MagickExport Image *SpliceImage(const Image *image, } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits, - splice_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - splice_traits=GetPixelChannelTraits(splice_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait splice_traits=GetPixelChannelTraits(splice_image,channel); if ((traits == UndefinedPixelTrait) || (splice_traits == UndefinedPixelTrait)) continue; @@ -2350,16 +2274,10 @@ MagickExport Image *TransposeImage(const Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits, - transpose_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - transpose_traits=GetPixelChannelTraits(transpose_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait transpose_traits=GetPixelChannelTraits(transpose_image, + channel); if ((traits == UndefinedPixelTrait) || (transpose_traits == UndefinedPixelTrait)) continue; @@ -2503,16 +2421,10 @@ MagickExport Image *TransverseImage(const Image *image,ExceptionInfo *exception) } for (i=0; i < (ssize_t) GetPixelChannels(image); i++) { - PixelChannel - channel; - - PixelTrait - traits, - transverse_traits; - - channel=GetPixelChannelChannel(image,i); - traits=GetPixelChannelTraits(image,channel); - transverse_traits=GetPixelChannelTraits(transverse_image,channel); + PixelChannel channel=GetPixelChannelChannel(image,i); + PixelTrait traits=GetPixelChannelTraits(image,channel); + PixelTrait transverse_traits=GetPixelChannelTraits(transverse_image, + channel); if ((traits == UndefinedPixelTrait) || (transverse_traits == UndefinedPixelTrait)) continue; -- 2.40.0