From: cristy Date: Sun, 15 Sep 2013 18:32:54 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~3313 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99dc036190f292a67801dc4b141898bf18c96b36;p=imagemagick --- diff --git a/MagickCore/fourier.c b/MagickCore/fourier.c index 625622ac6..191118bf6 100644 --- a/MagickCore/fourier.c +++ b/MagickCore/fourier.c @@ -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 diff --git a/MagickCore/version.h b/MagickCore/version.h index d768fd5aa..1bd3dabdc 100644 --- a/MagickCore/version.h +++ b/MagickCore/version.h @@ -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" diff --git a/utilities/compare.1 b/utilities/compare.1 index 505b37d1c..d8f60eea9 100644 --- a/utilities/compare.1 +++ b/utilities/compare.1 @@ -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) diff --git a/utilities/identify.1 b/utilities/identify.1 index 4fb2c8e49..65ab992ed 100644 --- a/utilities/identify.1 +++ b/utilities/identify.1 @@ -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: