]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 11 Sep 2012 23:39:36 +0000 (23:39 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 11 Sep 2012 23:39:36 +0000 (23:39 +0000)
MagickCore/accelerate.c
MagickCore/compare.c
MagickCore/decorate.c
MagickCore/display.c
MagickCore/enhance.c
MagickCore/histogram.c
MagickCore/nt-base.c
MagickCore/quantize.c
MagickCore/resample.c

index 29b6ac4f926323548fa58e45731ef78a9d5954a5..c7b0b44c3fc940cc0f73a0925358c60ea576a25a 100644 (file)
@@ -670,7 +670,7 @@ MagickExport MagickBooleanType AccelerateConvolveImage(const Image *image,
   assert(convolve_image->signature == MagickSignature);
   assert(exception != (ExceptionInfo *) NULL);
   assert(exception->signature == MagickSignature);
-  if ((image->storage_class != DirectClass) || 
+  if ((image->storage_class != DirectClass) ||
       (image->colorspace == CMYKColorspace))
     return(MagickFalse);
   if ((GetImageVirtualPixelMethod(image) != UndefinedVirtualPixelMethod) &&
index a50aa30c03db2c899783d6064e8df99a3323daeb..408ae529e74d103958ccba2f7522828a08ca87b4 100644 (file)
@@ -80,7 +80,7 @@
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  CompareImages() compares one or more pixel channels of an image to a 
+%  CompareImages() compares one or more pixel channels of an image to a
 %  reconstructed image and returns the difference image.
 %
 %  The format of the CompareImages method is:
@@ -283,7 +283,7 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  GetImageDistortion() compares one or more pixel channels of an image to a 
+%  GetImageDistortion() compares one or more pixel channels of an image to a
 %  reconstructed image and returns the specified distortion metric.
 %
 %  The format of the CompareImages method is:
index 48d9286ffaed63e715550df93abfcc407af78808..7df4bf34e43134438269ea7c24bfc5c628ca5f13 100644 (file)
@@ -383,7 +383,7 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
   /*
     Draw sides of ornamental border.
   */
-#if defined(MAGICKCORE_OPENMP_SUPPORT) 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   #pragma omp parallel for schedule(static) shared(progress,status) \
     dynamic_number_threads(image,image->columns,image->rows,1)
 #endif
@@ -485,7 +485,7 @@ MagickExport Image *FrameImage(const Image *image,const FrameInfo *frame_info,
         MagickBooleanType
           proceed;
 
-#if defined(MAGICKCORE_OPENMP_SUPPORT) 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
         #pragma omp critical (MagickCore_FrameImage)
 #endif
         proceed=SetImageProgress(image,FrameImageTag,progress++,image->rows);
@@ -688,7 +688,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
   status=MagickTrue;
   progress=0;
   image_view=AcquireAuthenticCacheView(image,exception);
-#if defined(MAGICKCORE_OPENMP_SUPPORT) 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   #pragma omp parallel for schedule(static) shared(progress,status) \
     dynamic_number_threads(image,image->columns,image->rows,1)
 #endif
@@ -876,7 +876,7 @@ MagickExport MagickBooleanType RaiseImage(Image *image,
           status=MagickFalse;
       }
   }
-#if defined(MAGICKCORE_OPENMP_SUPPORT) 
+#if defined(MAGICKCORE_OPENMP_SUPPORT)
   #pragma omp parallel for schedule(static) shared(progress,status) \
     dynamic_number_threads(image,image->columns,image->rows,1)
 #endif
index 2d6e537e3634903aba0a1e748c5ba2e52803f195..03a13e9c7a0e01cf60e45fe2371c8058bfb6e088 100644 (file)
@@ -10172,7 +10172,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
               (DrawInfo *) NULL);
             draw_info->fill.alpha=(double) ClampToQuantum(
               StringToDouble(matte,(char **) NULL));
-            channel_mask=SetImageChannelMask(*image,AlphaChannel); 
+            channel_mask=SetImageChannelMask(*image,AlphaChannel);
             (void) FloodfillPaintImage(*image,draw_info,&target,(ssize_t)
               x_offset,(ssize_t) y_offset,method == FloodfillMethod ?
               MagickFalse : MagickTrue,exception);
index fff798b62b7535d21f636cbe604ded2c1a19bcd6..5e25515368f36bc19f5699c5321f38badb7fe84d 100644 (file)
@@ -718,15 +718,15 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
     for (i=0; i < (ssize_t) image->colors; i++)
     {
       /*
-       Apply transfer function to colormap.
+        Apply transfer function to colormap.
       */
       double
-       luma;
+        luma;
 
       luma=0.21267*image->colormap[i].red+0.71526*image->colormap[i].green+
-       0.07217*image->colormap[i].blue;
+        0.07217*image->colormap[i].blue;
       image->colormap[i].red=luma+color_correction.saturation*cdl_map[
-       ScaleQuantumToMap(ClampToQuantum(image->colormap[i].red))].red-luma;
+        ScaleQuantumToMap(ClampToQuantum(image->colormap[i].red))].red-luma;
       image->colormap[i].green=luma+color_correction.saturation*cdl_map[
         ScaleQuantumToMap(ClampToQuantum(image->colormap[i].green))].green-luma;
       image->colormap[i].blue=luma+color_correction.saturation*cdl_map[
@@ -1806,10 +1806,10 @@ MagickExport MagickBooleanType GammaImage(Image *image,const double gamma,
     for (i=0; i < (ssize_t) image->colors; i++)
     {
       /*
-       Gamma-correct colormap.
+        Gamma-correct colormap.
       */
       if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-       image->colormap[i].red=(double) gamma_map[
+        image->colormap[i].red=(double) gamma_map[
           ScaleQuantumToMap(ClampToQuantum(image->colormap[i].red))];
       if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
         image->colormap[i].green=(double) gamma_map[
@@ -3058,18 +3058,18 @@ MagickExport MagickBooleanType NegateImage(Image *image,
     for (i=0; i < (ssize_t) image->colors; i++)
     {
       /*
-       Negate colormap.
+        Negate colormap.
       */
       if (grayscale != MagickFalse)
-       if ((image->colormap[i].red != image->colormap[i].green) ||
-         (image->colormap[i].green != image->colormap[i].blue))
-         continue;
+        if ((image->colormap[i].red != image->colormap[i].green) ||
+            (image->colormap[i].green != image->colormap[i].blue))
+          continue;
       if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-       image->colormap[i].red=QuantumRange-image->colormap[i].red;
+        image->colormap[i].red=QuantumRange-image->colormap[i].red;
       if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
-       image->colormap[i].green=QuantumRange-image->colormap[i].green;
+        image->colormap[i].green=QuantumRange-image->colormap[i].green;
       if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
-       image->colormap[i].blue=QuantumRange-image->colormap[i].blue;
+        image->colormap[i].blue=QuantumRange-image->colormap[i].blue;
     }
   /*
     Negate image.
@@ -3387,9 +3387,9 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image,
     Convenience macros.
   */
 #define ScaledSig(x) ( ClampToQuantum(QuantumRange* \
-  ScaledSigmoidal(contrast,QuantumScale*midpoint,QuantumScale*(x))) )  
+  ScaledSigmoidal(contrast,QuantumScale*midpoint,QuantumScale*(x))) )
 #define InverseScaledSig(x) ( ClampToQuantum(QuantumRange* \
-  InverseScaledSigmoidal(contrast,QuantumScale*midpoint,QuantumScale*(x))) )  
+  InverseScaledSigmoidal(contrast,QuantumScale*midpoint,QuantumScale*(x))) )
 
   assert(image != (Image *) NULL);
   assert(image->signature == MagickSignature);
@@ -3401,32 +3401,32 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image,
   if (image->storage_class == PseudoClass)
     {
       register ssize_t
-       i;
+        i;
 
       if (sharpen != MagickFalse)
         for (i=0; i < (ssize_t) image->colors; i++)
         {
           if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].red=ScaledSig(image->colormap[i].red);
-         if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].green=ScaledSig(image->colormap[i].green);
-         if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].blue=ScaledSig(image->colormap[i].blue);
-         if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].alpha=ScaledSig(image->colormap[i].alpha);
-       }
+            image->colormap[i].red=ScaledSig(image->colormap[i].red);
+          if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
+            image->colormap[i].green=ScaledSig(image->colormap[i].green);
+          if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
+            image->colormap[i].blue=ScaledSig(image->colormap[i].blue);
+          if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
+            image->colormap[i].alpha=ScaledSig(image->colormap[i].alpha);
+        }
       else
         for (i=0; i < (ssize_t) image->colors; i++)
-       {
-         if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].red=InverseScaledSig(image->colormap[i].red);
-         if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
+        {
+          if ((GetPixelRedTraits(image) & UpdatePixelTrait) != 0)
+            image->colormap[i].red=InverseScaledSig(image->colormap[i].red);
+          if ((GetPixelGreenTraits(image) & UpdatePixelTrait) != 0)
             image->colormap[i].green=InverseScaledSig(image->colormap[i].green);
-         if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].blue=InverseScaledSig(image->colormap[i].blue);
+          if ((GetPixelBlueTraits(image) & UpdatePixelTrait) != 0)
+            image->colormap[i].blue=InverseScaledSig(image->colormap[i].blue);
           if ((GetPixelAlphaTraits(image) & UpdatePixelTrait) != 0)
-           image->colormap[i].alpha=InverseScaledSig(image->colormap[i].alpha);
-       }
+            image->colormap[i].alpha=InverseScaledSig(image->colormap[i].alpha);
+        }
     }
   /*
     Sigmoidal-contrast enhance image.
@@ -3457,7 +3457,7 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image,
     for (x=0; x < (ssize_t) image->columns; x++)
     {
       register ssize_t
-       i;
+        i;
 
       if (GetPixelMask(image,q) != 0)
         {
@@ -3476,10 +3476,10 @@ MagickExport MagickBooleanType SigmoidalContrastImage(Image *image,
         traits=GetPixelChannelTraits(image,channel);
         if ((traits & UpdatePixelTrait) == 0)
           continue;
-       if (sharpen != MagickFalse)
-         q[i]=ScaledSig(q[i]);
-       else
-         q[i]=InverseScaledSig(q[i]);
+        if (sharpen != MagickFalse)
+          q[i]=ScaledSig(q[i]);
+        else
+          q[i]=InverseScaledSig(q[i]);
       }
       q+=GetPixelChannels(image);
     }
index 0505adbcc459dfc8a69a7cabbe2e9d839ea9c0eb..83d0cad6e081aea3e9e4bf2d29d369dc4aac177b 100644 (file)
@@ -1157,7 +1157,7 @@ MagickExport size_t GetNumberColors(const Image *image,FILE *file,
     (void) ConcatenateMagickString(tuple,")",MaxTextExtent);
     (void) QueryColorname(image,&pixel,SVGCompliance,color,exception);
     GetColorTuple(&pixel,MagickTrue,hex);
-    (void) FormatLocaleFile(file,"%10.20g",(double) ((MagickOffsetType) 
+    (void) FormatLocaleFile(file,"%10.20g",(double) ((MagickOffsetType)
       p->count));
     (void) FormatLocaleFile(file,": %s %s %s\n",tuple,hex,color);
     if (image->progress_monitor != (MagickProgressMonitor) NULL)
index d9414bd7664979043df5921f2b98df012e03d8c2..95f1f610e4cf264e15c57e870640c8536dc640ae 100644 (file)
@@ -1087,7 +1087,7 @@ static int NTGhostscriptGetString(const char *name,BOOL *is_64_bit,char *value,
 #endif
         (void) NTLocateGhostscript(flags,&product_family,&major_version,
           &minor_version);
-         }
+      }
     }
     else
       is_64_bit_version=NTIs64BitPlatform();
index fe2e30d6c248b99824b6ef82d9bf37bf6a41afa8..f98e8aaa29cfcf865a340045243ef7d5cdbe5551 100644 (file)
@@ -2742,7 +2742,7 @@ MagickExport MagickBooleanType QuantizeImage(const QuantizeInfo *quantize_info,
     {
       if ((image->columns*image->rows) <= maximum_colors)
         (void) DirectToColormapImage(image,exception);
-      if (IsImageGray(image,exception) != MagickFalse) 
+      if (IsImageGray(image,exception) != MagickFalse)
         (void) SetGrayscaleImage(image,exception);
     }
   if ((image->storage_class == PseudoClass) &&
@@ -3346,8 +3346,7 @@ static MagickBooleanType SetGrayscaleImage(Image *image,
                   image->colors++;
                }
             }
-          SetPixelIndex(image,(Quantum) 
-            colormap_index[intensity],q);
+          SetPixelIndex(image,(Quantum) colormap_index[intensity],q);
           q+=GetPixelChannels(image);
         }
         if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
index 45d8a59999c2a15333e8655c8461b7d9dbf98d0d..441ec2f2c70d2550d24dc64cc09100924c364b62 100644 (file)
@@ -703,16 +703,10 @@ MagickExport MagickBooleanType ResamplePixelColor(
 %
 % Reference: http://en.wikipedia.org/wiki/Ellipse#Canonical_form
 */
-static inline void ClampUpAxes(const double dux,
-                              const double dvx,
-                              const double duy,
-                              const double dvy,
-                              double *major_mag,
-                              double *minor_mag,
-                              double *major_unit_x,
-                              double *major_unit_y,
-                              double *minor_unit_x,
-                              double *minor_unit_y)
+static inline void ClampUpAxes(const double dux,const double dvx,
+  const double duy,const double dvy,double *major_mag,double *minor_mag,
+  double *major_unit_x,double *major_unit_y,double *minor_unit_x,
+  double *minor_unit_y)
 {
   /*
    * ClampUpAxes takes an input 2x2 matrix