]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Sun, 15 Sep 2013 18:32:54 +0000 (18:32 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Sun, 15 Sep 2013 18:32:54 +0000 (18:32 +0000)
MagickCore/fourier.c
MagickCore/version.h
utilities/compare.1
utilities/identify.1

index 625622ac6d77ea56a1551b0b94d301d8d3ce5e4c..191118bf63ecb3ed559fdab5ba36be820240af22 100644 (file)
@@ -43,6 +43,7 @@
   Include declarations.
 */
 #include "MagickCore/studio.h"
+#include "MagickCore/artifact.h"
 #include "MagickCore/attribute.h"
 #include "MagickCore/blob.h"
 #include "MagickCore/cache.h"
@@ -54,6 +55,7 @@
 #include "MagickCore/memory_.h"
 #include "MagickCore/monitor.h"
 #include "MagickCore/pixel-accessor.h"
+#include "MagickCore/pixel-private.h"
 #include "MagickCore/property.h"
 #include "MagickCore/quantum-private.h"
 #include "MagickCore/resource_.h"
@@ -422,8 +424,10 @@ static MagickBooleanType ForwardFourierTransform(FourierInfo *fourier_info,
   CacheView
     *image_view;
 
+  const char
+    *value;
+
   double
-    gamma,
     *source_pixels;
 
   fftw_complex
@@ -522,22 +526,29 @@ static MagickBooleanType ForwardFourierTransform(FourierInfo *fourier_info,
   fftw_execute(fftw_r2c_plan);
   fftw_destroy_plan(fftw_r2c_plan);
   source_info=(MemoryInfo *) RelinquishVirtualMemory(source_info);
-  /*
-    Normalize Fourier transform.
-  */
-  i=0L;
-  gamma=PerceptibleReciprocal((double) fourier_info->width*
-    fourier_info->height);
-  for (y=0L; y < (ssize_t) fourier_info->height; y++)
-    for (x=0L; x < (ssize_t) fourier_info->center; x++)
+  value=GetImageArtifact(image,"fourier:normalize");
+  if ((value == (const char *) NULL) || (LocaleCompare(value,"fft") == 0))
     {
+      double
+        gamma;
+
+      /*
+        Normalize Fourier transform.
+      */
+      i=0L;
+      gamma=PerceptibleReciprocal((double) fourier_info->width*
+        fourier_info->height);
+      for (y=0L; y < (ssize_t) fourier_info->height; y++)
+        for (x=0L; x < (ssize_t) fourier_info->center; x++)
+        {
 #if defined(MAGICKCORE_HAVE_COMPLEX_H)
-      forward_pixels[i]*=gamma;
+          forward_pixels[i]*=gamma;
 #else
-      forward_pixels[i][0]*=gamma;
-      forward_pixels[i][1]*=gamma;
+          forward_pixels[i][0]*=gamma;
+          forward_pixels[i][1]*=gamma;
 #endif
-      i++;
+          i++;
+        }
     }
   /*
     Generate magnitude and phase (or real and imaginary).
@@ -1028,6 +1039,9 @@ static MagickBooleanType InverseFourierTransform(FourierInfo *fourier_info,
   CacheView
     *image_view;
 
+  const char
+    *value;
+
   double
     *source_pixels;
 
@@ -1056,6 +1070,30 @@ static MagickBooleanType InverseFourierTransform(FourierInfo *fourier_info,
       return(MagickFalse);
     }
   source_pixels=(double *) GetVirtualMemoryBlob(source_info);
+  value=GetImageArtifact(image,"fourier:normalize");
+  if ((value == (const char *) NULL) || (LocaleCompare(value,"fft") == 0))
+    {
+      double
+        gamma;
+
+      /*
+        Normalize inverse transform.
+      */
+      i=0L;
+      gamma=PerceptibleReciprocal((double) fourier_info->width*
+        fourier_info->height);
+      for (y=0L; y < (ssize_t) fourier_info->height; y++)
+        for (x=0L; x < (ssize_t) fourier_info->center; x++)
+        {
+#if defined(MAGICKCORE_HAVE_COMPLEX_H)
+          fourier_pixels[i]*=gamma;
+#else
+          fourier_pixels[i][0]*=gamma;
+          fourier_pixels[i][1]*=gamma;
+#endif
+          i++;
+        }
+    }
 #if defined(MAGICKCORE_OPENMP_SUPPORT)
   #pragma omp critical (MagickCore_InverseFourierTransform)
 #endif
index d768fd5aa43f42d2c87210a33e4c144cebc04230..1bd3dabdc1967aa690b689844666ccd93bd848b0 100644 (file)
@@ -37,9 +37,9 @@ extern "C" {
 #define MagickppLibVersionText  "7.0.0"
 #define MagickppLibVersionNumber  @MAGICKPP_LIB_VERSION_NUMBER@
 #define MagickppLibAddendum  "-0"
-#define MagickppLibInterface  2
-#define MagickppLibMinInterface  2
-#define MagickReleaseDate  "2013-08-28"
+#define MagickppLibInterface  1
+#define MagickppLibMinInterface  1
+#define MagickReleaseDate  "2013-09-15"
 #define MagickChangeDate   "20120427"
 #define MagickAuthoritativeURL  "http://www.imagemagick.org"
 #define MagickFeatures "DPC HDRI OpenMP"
index 505b37d1c131e9cb44af4de9603313cd9ddfad68..d8f60eea911de174468c6e36649538bd5ff1d17a 100644 (file)
@@ -68,6 +68,9 @@ Miscellaneous Options:
   \-version             print version information
 
 By default, the image format of `file' is determined by its magic number.  To specify a particular image format, precede the filename with an image format name and a colon (i.e. ps:image) or specify the image type as the filename suffix (i.e. image.ps).  Specify 'file' as '-' for standard input or output.
+
+The compare program returns 2 on error otherwise 0 if the images are similar or
+1 if they are dissimilar.
 .SH SEE ALSO
 ImageMagick(1)
 
index 4fb2c8e49116ba69083d81b100a3b86f61036d07..65ab992ed1c4e5ac0432fbd10e5b4d1fbda9366d 100644 (file)
@@ -40,6 +40,7 @@ Image Settings:
   \-matte               store matte channel if the image has one
   \-monitor             monitor progress
   \-ping                efficiently determine image attributes
+  \-precision value     maximum number of significant digits to print
   \-quiet               suppress all warning messages
   \-regard-warnings     pay attention to warning messages
   \-respect-parentheses settings remain in effect until parenthesis boundary
@@ -56,6 +57,7 @@ Image Settings:
                        virtual pixel access method
 
 Image Operators:
+  \-grayscale method    convert image to grayscale
   \-negate              replace each pixel with its complementary color 
 
 Miscellaneous Options: