% %
% %
% %
-% C o m p a r e I m a g e C h a n n e l s %
+% C o m p a r e I m a g e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% CompareImageChannels() compares one or more image channels of an image
-% to a reconstructed image and returns the difference image.
+% CompareImages() compares one or more pixel channels of an image to a
+% reconstructed image and returns the difference image.
%
-% The format of the CompareImageChannels method is:
+% The format of the CompareImages method is:
%
-% Image *CompareImageChannels(const Image *image,
-% const Image *reconstruct_image,const ChannelType channel,
+% Image *CompareImages(const Image *image,const Image *reconstruct_image,
% const MetricType metric,double *distortion,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
% o reconstruct_image: the reconstruct image.
%
-% o channel: the channel.
-%
% o metric: the metric.
%
% o distortion: the computed distortion between the images.
% o exception: return any errors or warnings in this structure.
%
*/
-
MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
const MetricType metric,double *distortion,ExceptionInfo *exception)
-{
- Image
- *highlight_image;
-
- highlight_image=CompareImageChannels(image,reconstruct_image,CompositeChannels,
- metric,distortion,exception);
- return(highlight_image);
-}
-
-MagickExport Image *CompareImageChannels(Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- const MetricType metric,double *distortion,ExceptionInfo *exception)
{
CacheView
*highlight_view,
if ((reconstruct_image->columns != image->columns) ||
(reconstruct_image->rows != image->rows))
ThrowImageException(ImageError,"ImageSizeDiffers");
- status=GetImageChannelDistortion(image,reconstruct_image,channel,metric,
- distortion,exception);
+ status=GetImageDistortion(image,reconstruct_image,metric,distortion,
+ exception);
if (status == MagickFalse)
return((Image *) NULL);
difference_image=CloneImage(image,0,0,MagickTrue,exception);
SetPixelInfo(image,p,&pixel);
SetPixelInfo(reconstruct_image,q,&reconstruct_pixel);
difference=MagickFalse;
- if (channel == CompositeChannels)
+ if (image->sync == MagickTrue)
{
if (IsFuzzyEquivalencePixelInfo(&pixel,&reconstruct_pixel) == MagickFalse)
difference=MagickTrue;
% %
% %
% %
-% G e t I m a g e C h a n n e l D i s t o r t i o n %
+% G e t I m a g e D i s t o r t i o n %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetImageChannelDistortion() compares one or more image channels of an image
-% to a reconstructed image and returns the specified distortion metric.
+% GetImageDistortion() compares one or more pixel channels of an image to a
+% reconstructed image and returns the specified distortion metric.
%
-% The format of the CompareImageChannels method is:
+% The format of the CompareImages method is:
%
-% MagickBooleanType GetImageChannelDistortion(const Image *image,
-% const Image *reconstruct_image,const ChannelType channel,
-% const MetricType metric,double *distortion,ExceptionInfo *exception)
+% MagickBooleanType GetImageDistortion(const Image *image,
+% const Image *reconstruct_image,const MetricType metric,
+% double *distortion,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
%
% o reconstruct_image: the reconstruct image.
%
-% o channel: the channel.
-%
% o metric: the metric.
%
% o distortion: the computed distortion between the images.
%
*/
-MagickExport MagickBooleanType GetImageDistortion(Image *image,
- const Image *reconstruct_image,const MetricType metric,double *distortion,
- ExceptionInfo *exception)
-{
- MagickBooleanType
- status;
-
- status=GetImageChannelDistortion(image,reconstruct_image,CompositeChannels,
- metric,distortion,exception);
- return(status);
-}
-
static MagickBooleanType GetAbsoluteDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,double *distortion,
- ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
return(status);
}
-static size_t GetNumberChannels(const Image *image,
- const ChannelType channel)
+static size_t GetNumberChannels(const Image *image)
{
size_t
channels;
}
static MagickBooleanType GetFuzzDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
if (((GetPixelAlphaTraits(image) & ActivePixelTrait) != 0) &&
((image->matte != MagickFalse) ||
(reconstruct_image->matte != MagickFalse)))
- distortion[CompositeChannels]/=(double)
- (GetNumberChannels(image,channel)-1);
+ distortion[CompositeChannels]/=(double) (GetNumberChannels(image)-1);
else
- distortion[CompositeChannels]/=(double) GetNumberChannels(image,channel);
+ distortion[CompositeChannels]/=(double) GetNumberChannels(image);
distortion[CompositeChannels]=sqrt(distortion[CompositeChannels]);
return(status);
}
static MagickBooleanType GetMeanAbsoluteDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
image_view=DestroyCacheView(image_view);
for (i=0; i <= (ssize_t) CompositeChannels; i++)
distortion[i]/=((double) image->columns*image->rows);
- distortion[CompositeChannels]/=(double) GetNumberChannels(image,channel);
+ distortion[CompositeChannels]/=(double) GetNumberChannels(image);
return(status);
}
static MagickBooleanType GetMeanErrorPerPixel(Image *image,
- const Image *reconstruct_image,const ChannelType channel,double *distortion,
- ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
}
static MagickBooleanType GetMeanSquaredDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
image_view=DestroyCacheView(image_view);
for (i=0; i <= (ssize_t) CompositeChannels; i++)
distortion[i]/=((double) image->columns*image->rows);
- distortion[CompositeChannels]/=(double) GetNumberChannels(image,channel);
+ distortion[CompositeChannels]/=(double) GetNumberChannels(image);
return(status);
}
static MagickBooleanType GetNormalizedCrossCorrelationDistortion(
- const Image *image,const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *image,const Image *reconstruct_image,double *distortion,
+ ExceptionInfo *exception)
{
#define SimilarityImageTag "Similarity/Image"
distortion[CompositeChannels]+=distortion[BlackChannel]*
distortion[BlackChannel];
distortion[CompositeChannels]=sqrt(distortion[CompositeChannels]/
- GetNumberChannels(image,channel));
+ GetNumberChannels(image));
/*
Free resources.
*/
}
static MagickBooleanType GetPeakAbsoluteDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
CacheView
*image_view,
}
static MagickBooleanType GetPeakSignalToNoiseRatio(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
MagickBooleanType
status;
- status=GetMeanSquaredDistortion(image,reconstruct_image,channel,distortion,
- exception);
+ status=GetMeanSquaredDistortion(image,reconstruct_image,distortion,exception);
if ((GetPixelRedTraits(image) & ActivePixelTrait) != 0)
distortion[RedChannel]=20.0*log10((double) 1.0/sqrt(
distortion[RedChannel]));
}
static MagickBooleanType GetRootMeanSquaredDistortion(const Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- double *distortion,ExceptionInfo *exception)
+ const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
MagickBooleanType
status;
- status=GetMeanSquaredDistortion(image,reconstruct_image,channel,distortion,
- exception);
+ status=GetMeanSquaredDistortion(image,reconstruct_image,distortion,exception);
if ((GetPixelRedTraits(image) & ActivePixelTrait) != 0)
distortion[RedChannel]=sqrt(distortion[RedChannel]);
if ((GetPixelGreenTraits(image) & ActivePixelTrait) != 0)
return(status);
}
-MagickExport MagickBooleanType GetImageChannelDistortion(Image *image,
- const Image *reconstruct_image,const ChannelType channel,
- const MetricType metric,double *distortion,ExceptionInfo *exception)
+MagickExport MagickBooleanType GetImageDistortion(Image *image,
+ const Image *reconstruct_image,const MetricType metric,double *distortion,
+ ExceptionInfo *exception)
{
double
*channel_distortion;
{
case AbsoluteErrorMetric:
{
- status=GetAbsoluteDistortion(image,reconstruct_image,channel,
- channel_distortion,exception);
+ status=GetAbsoluteDistortion(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case FuzzErrorMetric:
{
- status=GetFuzzDistortion(image,reconstruct_image,channel,
- channel_distortion,exception);
+ status=GetFuzzDistortion(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case MeanAbsoluteErrorMetric:
{
- status=GetMeanAbsoluteDistortion(image,reconstruct_image,channel,
+ status=GetMeanAbsoluteDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
case MeanErrorPerPixelMetric:
{
- status=GetMeanErrorPerPixel(image,reconstruct_image,channel,
- channel_distortion,exception);
+ status=GetMeanErrorPerPixel(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case MeanSquaredErrorMetric:
{
- status=GetMeanSquaredDistortion(image,reconstruct_image,channel,
+ status=GetMeanSquaredDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
default:
{
status=GetNormalizedCrossCorrelationDistortion(image,reconstruct_image,
- channel,channel_distortion,exception);
+ channel_distortion,exception);
break;
}
case PeakAbsoluteErrorMetric:
{
- status=GetPeakAbsoluteDistortion(image,reconstruct_image,channel,
+ status=GetPeakAbsoluteDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
case PeakSignalToNoiseRatioMetric:
{
- status=GetPeakSignalToNoiseRatio(image,reconstruct_image,channel,
+ status=GetPeakSignalToNoiseRatio(image,reconstruct_image,
channel_distortion,exception);
break;
}
case RootMeanSquaredErrorMetric:
{
- status=GetRootMeanSquaredDistortion(image,reconstruct_image,channel,
+ status=GetRootMeanSquaredDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
% %
% %
% %
-% G e t I m a g e C h a n n e l D i s t o r t i o n s %
+% G e t I m a g e D i s t o r t i o n s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% GetImageChannelDistrortion() compares the image channels of an image to a
+% GetImageDistrortion() compares the pixel channels of an image to a
% reconstructed image and returns the specified distortion metric for each
% channel.
%
-% The format of the CompareImageChannels method is:
+% The format of the CompareImages method is:
%
-% double *GetImageChannelDistortions(const Image *image,
+% double *GetImageDistortions(const Image *image,
% const Image *reconstruct_image,const MetricType metric,
% ExceptionInfo *exception)
%
% o exception: return any errors or warnings in this structure.
%
*/
-MagickExport double *GetImageChannelDistortions(Image *image,
+MagickExport double *GetImageDistortions(Image *image,
const Image *reconstruct_image,const MetricType metric,
ExceptionInfo *exception)
{
{
case AbsoluteErrorMetric:
{
- status=GetAbsoluteDistortion(image,reconstruct_image,CompositeChannels,
- channel_distortion,exception);
+ status=GetAbsoluteDistortion(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case FuzzErrorMetric:
{
- status=GetFuzzDistortion(image,reconstruct_image,CompositeChannels,
- channel_distortion,exception);
+ status=GetFuzzDistortion(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case MeanAbsoluteErrorMetric:
{
- status=GetMeanAbsoluteDistortion(image,reconstruct_image,CompositeChannels,
+ status=GetMeanAbsoluteDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
case MeanErrorPerPixelMetric:
{
- status=GetMeanErrorPerPixel(image,reconstruct_image,CompositeChannels,
- channel_distortion,exception);
+ status=GetMeanErrorPerPixel(image,reconstruct_image,channel_distortion,
+ exception);
break;
}
case MeanSquaredErrorMetric:
{
- status=GetMeanSquaredDistortion(image,reconstruct_image,CompositeChannels,
+ status=GetMeanSquaredDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
default:
{
status=GetNormalizedCrossCorrelationDistortion(image,reconstruct_image,
- CompositeChannels,channel_distortion,exception);
+ channel_distortion,exception);
break;
}
case PeakAbsoluteErrorMetric:
{
- status=GetPeakAbsoluteDistortion(image,reconstruct_image,CompositeChannels,
+ status=GetPeakAbsoluteDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
case PeakSignalToNoiseRatioMetric:
{
- status=GetPeakSignalToNoiseRatio(image,reconstruct_image,CompositeChannels,
+ status=GetPeakSignalToNoiseRatio(image,reconstruct_image,
channel_distortion,exception);
break;
}
case RootMeanSquaredErrorMetric:
{
- status=GetRootMeanSquaredDistortion(image,reconstruct_image,CompositeChannels,
+ status=GetRootMeanSquaredDistortion(image,reconstruct_image,
channel_distortion,exception);
break;
}
} MetricType;
extern MagickExport double
- *GetImageChannelDistortions(Image *,const Image *,const MetricType,
- ExceptionInfo *);
+ *GetImageDistortions(Image *,const Image *,const MetricType,ExceptionInfo *);
extern MagickExport Image
- *CompareImageChannels(Image *,const Image *,const ChannelType,
- const MetricType,double *,ExceptionInfo *),
*CompareImages(Image *,const Image *,const MetricType,double *,
ExceptionInfo *),
*SimilarityImage(Image *,const Image *,RectangleInfo *,double *,
ExceptionInfo *);
extern MagickExport MagickBooleanType
- GetImageChannelDistortion(Image *,const Image *,const ChannelType,
- const MetricType,double *,ExceptionInfo *),
GetImageDistortion(Image *,const Image *,const MetricType,double *,
ExceptionInfo *),
IsImagesEqual(Image *,const Image *);
% ComparePixels() Compare the two pixels and return true if the pixels
% differ according to the given LayerType comparision method.
%
-% This currently only used internally by CompareImageBounds(). It is
+% This currently only used internally by CompareImagesBounds(). It is
% doubtful that this sub-routine will be useful outside this module.
%
% The format of the ComparePixels method is:
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% CompareImageBounds() Given two images return the smallest rectangular area
+% CompareImagesBounds() Given two images return the smallest rectangular area
% by which the two images differ, accourding to the given 'Compare...'
% layer method.
%
% This currently only used internally in this module, but may eventually
% be used by other modules.
%
-% The format of the CompareImageBounds method is:
+% The format of the CompareImagesBounds method is:
%
-% RectangleInfo *CompareImageBounds(const ImageLayerMethod method,
+% RectangleInfo *CompareImagesBounds(const ImageLayerMethod method,
% const Image *image1, const Image *image2, ExceptionInfo *exception)
%
% A description of each parameter follows:
%
*/
-static RectangleInfo CompareImageBounds(const Image *image1,const Image *image2,
+static RectangleInfo CompareImagesBounds(const Image *image1,const Image *image2,
const ImageLayerMethod method,ExceptionInfo *exception)
{
RectangleInfo
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% CompareImageLayers() compares each image with the next in a sequence and
+% CompareImagesLayers() compares each image with the next in a sequence and
% returns the minimum bounding region of all the pixel differences (of the
% ImageLayerMethod specified) it discovers.
%
% No GIF dispose methods are applied, so GIF animations must be coalesced
% before applying this image operator to find differences to them.
%
-% The format of the CompareImageLayers method is:
+% The format of the CompareImagesLayers method is:
%
-% Image *CompareImageLayers(const Image *images,
+% Image *CompareImagesLayers(const Image *images,
% const ImageLayerMethod method,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
*/
-MagickExport Image *CompareImageLayers(const Image *image,
+MagickExport Image *CompareImagesLayers(const Image *image,
const ImageLayerMethod method, ExceptionInfo *exception)
{
Image
}
(void) CompositeImage(image_a,CopyCompositeOp,next,next->page.x,
next->page.y);
- bounds[i]=CompareImageBounds(image_b,image_a,method,exception);
+ bounds[i]=CompareImagesBounds(image_b,image_a,method,exception);
image_b=DestroyImage(image_b);
i++;
(void) FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
#endif
disposals[0]=NoneDispose;
- bounds[0]=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
+ bounds[0]=CompareImagesBounds(prev_image,curr,CompareAnyLayer,exception);
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g\n\n",
(double) bounds[i].width,(double) bounds[i].height,
/*
Assume none disposal is the best
*/
- bounds[i]=CompareImageBounds(curr->previous,curr,CompareAnyLayer,exception);
+ bounds[i]=CompareImagesBounds(curr->previous,curr,CompareAnyLayer,exception);
cleared=IsBoundsCleared(curr->previous,curr,&bounds[i],exception);
disposals[i-1]=NoneDispose;
#if DEBUG_OPT_FRAME
/*
Compare a none disposal against a previous disposal
*/
- try_bounds=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
+ try_bounds=CompareImagesBounds(prev_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(prev_image,curr,&try_bounds,exception);
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "test_prev: %.20gx%.20g%+.20g%+.20g%s\n",
prev_image=DestroyImage(prev_image);
return((Image *) NULL);
}
- dup_bounds=CompareImageBounds(dup_image,curr,CompareClearLayer,exception);
+ dup_bounds=CompareImagesBounds(dup_image,curr,CompareClearLayer,exception);
ClearBounds(dup_image,&dup_bounds);
- try_bounds=CompareImageBounds(dup_image,curr,CompareAnyLayer,exception);
+ try_bounds=CompareImagesBounds(dup_image,curr,CompareAnyLayer,exception);
if ( cleared ||
dup_bounds.width*dup_bounds.height
+try_bounds.width*try_bounds.height
}
bgnd_bounds=bounds[i-1]; /* interum bounds of the previous image */
ClearBounds(bgnd_image,&bgnd_bounds);
- try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
+ try_bounds=CompareImagesBounds(bgnd_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "background: %s\n",
include the pixels that are cleared. This guaranteed
to work, though may not be the most optimized solution.
*/
- try_bounds=CompareImageBounds(curr->previous,curr,CompareClearLayer,exception);
+ try_bounds=CompareImagesBounds(curr->previous,curr,CompareClearLayer,exception);
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "expand_clear: %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
* to see, or writet he image at this point it is hard to tell what is wrong!
* Only CompareOverlay seemed to return something sensible.
*/
- try_bounds=CompareImageBounds(bgnd_image,curr,CompareClearLayer,exception);
+ try_bounds=CompareImagesBounds(bgnd_image,curr,CompareClearLayer,exception);
(void) FormatLocaleFile(stderr, "expand_ctst: %.20gx%.20g%+.20g%+.20g\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y );
- try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
+ try_bounds=CompareImagesBounds(bgnd_image,curr,CompareAnyLayer,exception);
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
(void) FormatLocaleFile(stderr, "expand_any : %.20gx%.20g%+.20g%+.20g%s\n",
(double) try_bounds.width,(double) try_bounds.height,
(double) try_bounds.x,(double) try_bounds.y,
try_cleared?" (pixels cleared)":"");
#endif
- try_bounds=CompareImageBounds(bgnd_image,curr,CompareOverlayLayer,exception);
+ try_bounds=CompareImagesBounds(bgnd_image,curr,CompareOverlayLayer,exception);
#if DEBUG_OPT_FRAME
try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
(void) FormatLocaleFile(stderr, "expand_test: %.20gx%.20g%+.20g%+.20g%s\n",
if ( curr->columns != next->columns || curr->rows != next->rows
|| curr->page.x != next->page.x || curr->page.y != next->page.y )
continue;
- bounds=CompareImageBounds(curr,next,CompareAnyLayer,exception);
+ bounds=CompareImagesBounds(curr,next,CompareAnyLayer,exception);
if ( bounds.x < 0 ) {
/*
the two images are the same, merge time delays and delete one.
extern MagickExport Image
*CoalesceImages(const Image *,ExceptionInfo *),
*DisposeImages(const Image *,ExceptionInfo *),
- *CompareImageLayers(const Image *,const ImageLayerMethod,ExceptionInfo *),
+ *CompareImagesLayers(const Image *,const ImageLayerMethod,ExceptionInfo *),
*MergeImageLayers(Image *,const ImageLayerMethod,ExceptionInfo *),
*OptimizeImageLayers(const Image *,ExceptionInfo *),
*OptimizePlusImageLayers(const Image *,ExceptionInfo *);
/* #undef AUTOTRACE_DELEGATE */
/* Define if coders and filters are to be built as modules. */
-#ifndef MAGICKCORE_BUILD_MODULES
-#define MAGICKCORE_BUILD_MODULES 1
-#endif
+/* #undef BUILD_MODULES */
/* Define if you have the bzip2 library */
#ifndef MAGICKCORE_BZLIB_DELEGATE
#endif
/* Define if you have DJVU library */
-#ifndef MAGICKCORE_DJVU_DELEGATE
-#define MAGICKCORE_DJVU_DELEGATE 1
-#endif
+/* #undef DJVU_DELEGATE */
/* Directory where ImageMagick documents live. */
#ifndef MAGICKCORE_DOCUMENTATION_PATH
#endif
/* Define if you have FFTW library */
-#ifndef MAGICKCORE_FFTW_DELEGATE
-#define MAGICKCORE_FFTW_DELEGATE 1
-#endif
+/* #undef FFTW_DELEGATE */
/* Location of filter modules */
#ifndef MAGICKCORE_FILTER_PATH
#endif
/* Define if you have the <lcms2.h> header file. */
-/* #undef HAVE_LCMS2_H */
+#ifndef MAGICKCORE_HAVE_LCMS2_H
+#define MAGICKCORE_HAVE_LCMS2_H 1
+#endif
/* Define if you have the <lcms2/lcms2.h> header file. */
/* #undef HAVE_LCMS2_LCMS2_H */
/* Define if you have the <lcms.h> header file. */
-#ifndef MAGICKCORE_HAVE_LCMS_H
-#define MAGICKCORE_HAVE_LCMS_H 1
-#endif
+/* #undef HAVE_LCMS_H */
/* Define if you have the <lcms/lcms.h> header file. */
/* #undef HAVE_LCMS_LCMS_H */
#endif
/* Define if you have JBIG library */
-#ifndef MAGICKCORE_JBIG_DELEGATE
-#define MAGICKCORE_JBIG_DELEGATE 1
-#endif
+/* #undef JBIG_DELEGATE */
/* Define if you have JPEG version 2 "Jasper" library */
#ifndef MAGICKCORE_JP2_DELEGATE
#endif
/* Define if you have LQR library */
-#ifndef MAGICKCORE_LQR_DELEGATE
-#define MAGICKCORE_LQR_DELEGATE 1
-#endif
+/* #undef LQR_DELEGATE */
/* Define if using libltdl to support dynamically loadable modules */
#ifndef MAGICKCORE_LTDL_DELEGATE
/* Define to the system default library search path. */
#ifndef MAGICKCORE_LT_DLSEARCH_PATH
-#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/R/lib:/usr/lib64/atlas:/opt/modules/pkg/intel/f77/10.0.025/lib:/usr/local/lib:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/xulrunner-2"
+#define MAGICKCORE_LT_DLSEARCH_PATH "/lib64:/usr/lib64:/lib:/usr/lib:/usr/lib64/atlas:/usr/lib64/mysql:/usr/lib64/qt-3.3/lib:/usr/lib64/tcl8.5/tclx8.4:/usr/lib64/tcl8.5:/usr/lib/wine/:/usr/lib64/wine/:/usr/lib64/xulrunner-2"
#endif
/* The archive extension */
/* #undef NO_MINUS_C_MINUS_O */
/* Define if you have OPENEXR library */
-#ifndef MAGICKCORE_OPENEXR_DELEGATE
-#define MAGICKCORE_OPENEXR_DELEGATE 1
-#endif
+/* #undef OPENEXR_DELEGATE */
/* Define to the address where bug reports for this package should be sent. */
#ifndef MAGICKCORE_PACKAGE_BUGREPORT
#endif
/* Define if you have RSVG library */
-#ifndef MAGICKCORE_RSVG_DELEGATE
-#define MAGICKCORE_RSVG_DELEGATE 1
-#endif
+/* #undef RSVG_DELEGATE */
/* Define to the type of arg 1 for `select'. */
#ifndef MAGICKCORE_SELECT_TYPE_ARG1
/* Define if you have WEBP library */
-#ifndef MAGICKCORE_WEBP_DELEGATE
-#define MAGICKCORE_WEBP_DELEGATE 1
-#endif
+/* #undef WEBP_DELEGATE */
/* Define to use the Windows GDI32 library */
/* #undef WINGDI32_DELEGATE */
/* #undef WITH_DMALLOC */
/* Define if you have WMF library */
-#ifndef MAGICKCORE_WMF_DELEGATE
-#define MAGICKCORE_WMF_DELEGATE 1
-#endif
+/* #undef WMF_DELEGATE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#define CombineImages PrependMagickMethod(CombineImages)
#define CompareHashmapStringInfo PrependMagickMethod(CompareHashmapStringInfo)
#define CompareHashmapString PrependMagickMethod(CompareHashmapString)
-#define CompareImageChannels PrependMagickMethod(CompareImageChannels)
-#define CompareImageLayers PrependMagickMethod(CompareImageLayers)
+#define CompareImages PrependMagickMethod(CompareImages)
+#define CompareImagesLayers PrependMagickMethod(CompareImagesLayers)
#define CompareImages PrependMagickMethod(CompareImages)
#define CompareSplayTreeStringInfo PrependMagickMethod(CompareSplayTreeStringInfo)
#define CompareSplayTreeString PrependMagickMethod(CompareSplayTreeString)
#define GetImageAttribute PrependMagickMethod(GetImageAttribute)
#define GetImageBoundingBox PrependMagickMethod(GetImageBoundingBox)
#define GetImageDepth PrependMagickMethod(GetImageDepth)
-#define GetImageChannelDistortion PrependMagickMethod(GetImageChannelDistortion)
-#define GetImageChannelDistortions PrependMagickMethod(GetImageChannelDistortions)
+#define GetImageDistortion PrependMagickMethod(GetImageDistortion)
+#define GetImageDistortions PrependMagickMethod(GetImageDistortions)
#define GetImageChannelExtrema PrependMagickMethod(GetImageChannelExtrema)
#define GetImageChannelKurtosis PrependMagickMethod(GetImageChannelKurtosis)
#define GetImageChannelMean PrependMagickMethod(GetImageChannelMean)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% SetPixelComponentMap() sets the pixel component map from the specified
-% string map.
+% channel mask.
%
% The format of the SetPixelComponentMap method is:
%
-% void SetPixelComponentMap(Image *image,const char *components)
+% void SetPixelComponentMap(Image *image,const ChannelType channel)
%
% A description of each parameter follows:
%
% o image: the image.
%
-% o components: One or more pixel components separated by commas.
+% o channel: the channel mask.
%
*/
-MagickExport void SetPixelComponentMap(Image *image,const char *components)
+MagickExport void SetPixelComponentMap(Image *image,const ChannelType channel)
{
register ssize_t
i;
- ssize_t
- channel;
-
for (i=0; i < MaxPixelComponents; i++)
image->component_map[i].traits=UndefinedPixelTrait;
- channel=(ChannelType) ParseChannelOption(components);
- if (channel < 0)
- channel=DefaultChannels;
image->sync=(channel & SyncChannels) != 0 ? MagickTrue : MagickFalse;
if ((channel & RedChannel) != 0)
SetPixelRedTraits(image,ActivePixelTrait);
extern MagickExport void
StandardPixelComponentMap(Image *),
GetPixelInfo(const Image *,PixelInfo *),
- SetPixelComponentMap(Image *,const char *);
+ SetPixelComponentMap(Image *,const ChannelType);
#if defined(__cplusplus) || defined(c_plusplus)
}
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision "exported"
+#define MagickSVNRevision "4693"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 5,0,0
#define MagickLibAddendum "-0"
#define MagickLibInterface 5
#define MagickLibMinInterface 5
-#define MagickReleaseDate "2011-07-04"
+#define MagickReleaseDate "2011-07-05"
#define MagickChangeDate "20110701"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#if defined(MAGICKCORE_OPENMP_SUPPORT)
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% CompareImageCommand() compares two images and returns the difference between
+% CompareImagesCommand() compares two images and returns the difference between
% them as a distortion metric and as a new image visually annotating their
% differences.
%
-% The format of the CompareImageCommand method is:
+% The format of the CompareImagesCommand method is:
%
-% MagickBooleanType CompareImageCommand(ImageInfo *image_info,int argc,
+% MagickBooleanType CompareImagesCommand(ImageInfo *image_info,int argc,
% char **argv,char **metadata,ExceptionInfo *exception)
%
% A description of each parameter follows:
return(MagickFalse);
}
-WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
+WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
int argc,char **argv,char **metadata,ExceptionInfo *exception)
{
#define DefaultDissimilarityThreshold 0.31830988618379067154
const char
*format;
- ChannelType
- channels;
-
double
dissimilarity_threshold,
distortion,
}
if (argc < 3)
return(CompareUsage());
- channels=CompositeChannels;
difference_image=NewImageList();
similarity_image=NewImageList();
dissimilarity_threshold=DefaultDissimilarityThreshold;
if (channel < 0)
ThrowCompareException(OptionError,"UnrecognizedChannelType",
argv[i]);
- channels=(ChannelType) channel;
+ SetPixelComponentMap(image,(ChannelType) channel);
break;
}
if (LocaleCompare("colorspace",option+1) == 0)
}
if ((reconstruct_image->columns == image->columns) &&
(reconstruct_image->rows == image->rows))
- difference_image=CompareImageChannels(image,reconstruct_image,channels,
- metric,&distortion,exception);
+ difference_image=CompareImages(image,reconstruct_image,metric,&distortion,
+ exception);
else
if (similarity_image == (Image *) NULL)
ThrowCompareException(OptionError,"ImageWidthsOrHeightsDiffer",
*/
composite_image=CloneImage(image,0,0,MagickTrue,exception);
if (composite_image == (Image *) NULL)
- difference_image=CompareImageChannels(image,reconstruct_image,
- channels,metric,&distortion,exception);
+ difference_image=CompareImages(image,reconstruct_image,metric,
+ &distortion,exception);
else
{
(void) CompositeImage(composite_image,CopyCompositeOp,
reconstruct_image,offset.x,offset.y);
- difference_image=CompareImageChannels(image,composite_image,
- channels,metric,&distortion,exception);
+ difference_image=CompareImages(image,composite_image,metric,
+ &distortion,exception);
if (difference_image != (Image *) NULL)
{
difference_image->page.x=offset.x;
double
*channel_distortion;
- channel_distortion=GetImageChannelDistortions(image,reconstruct_image,
+ channel_distortion=GetImageDistortions(image,reconstruct_image,
metric,&image->exception);
(void) FormatLocaleFile(stderr,"Image: %s\n",image->filename);
if ((reconstruct_image->columns != image->columns) ||
#endif
extern WandExport MagickBooleanType
- CompareImageCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
+ CompareImagesCommand(ImageInfo *,int,char **,char **,ExceptionInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
}
% %
% %
% %
-% M a g i c k C o m p a r e I m a g e C h a n n e l s %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickCompareImageChannels() compares one or more image channels of an image
-% to a reconstructed image and returns the difference image.
-%
-% The format of the MagickCompareImageChannels method is:
-%
-% MagickWand *MagickCompareImageChannels(MagickWand *wand,
-% const MagickWand *reference,const ChannelType channel,
-% const MetricType metric,double *distortion)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o reference: the reference wand.
-%
-% o channel: the channel.
-%
-% o metric: the metric.
-%
-% o distortion: the computed distortion between the images.
-%
-*/
-WandExport MagickWand *MagickCompareImageChannels(MagickWand *wand,
- const MagickWand *reference,const ChannelType channel,const MetricType metric,
- double *distortion)
-{
- Image
- *compare_image;
-
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
- {
- (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
- "ContainsNoImages","`%s'",wand->name);
- return((MagickWand *) NULL);
- }
- compare_image=CompareImageChannels(wand->images,reference->images,channel,
- metric,distortion,&wand->images->exception);
- if (compare_image == (Image *) NULL)
- return((MagickWand *) NULL);
- return(CloneMagickWandFromImages(wand,compare_image));
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% M a g i c k C o m p a r e I m a g e L a y e r s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickCompareImageLayers() compares each image with the next in a sequence
+% MagickCompareImagesLayers() compares each image with the next in a sequence
% and returns the maximum bounding region of any pixel differences it
% discovers.
%
-% The format of the MagickCompareImageLayers method is:
+% The format of the MagickCompareImagesLayers method is:
%
-% MagickWand *MagickCompareImageLayers(MagickWand *wand,
+% MagickWand *MagickCompareImagesLayers(MagickWand *wand,
% const ImageLayerMethod method)
%
% A description of each parameter follows:
% o method: the compare method.
%
*/
-WandExport MagickWand *MagickCompareImageLayers(MagickWand *wand,
+WandExport MagickWand *MagickCompareImagesLayers(MagickWand *wand,
const ImageLayerMethod method)
{
Image
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
return((MagickWand *) NULL);
- layers_image=CompareImageLayers(wand->images,method,wand->exception);
+ layers_image=CompareImagesLayers(wand->images,method,wand->exception);
if (layers_image == (Image *) NULL)
return((MagickWand *) NULL);
return(CloneMagickWandFromImages(wand,layers_image));
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
return((MagickWand *) NULL);
- deconstruct_image=CompareImageLayers(wand->images,CompareAnyLayer,
+ deconstruct_image=CompareImagesLayers(wand->images,CompareAnyLayer,
wand->exception);
if (deconstruct_image == (Image *) NULL)
return((MagickWand *) NULL);
% %
% %
% %
-% M a g i c k G e t I m a g e C h a n n e l D i s t o r t i o n %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickGetImageChannelDistortion() compares one or more image channels of an
-% image to a reconstructed image and returns the specified distortion metric.
-%
-% The format of the MagickGetImageChannelDistortion method is:
-%
-% MagickBooleanType MagickGetImageChannelDistortion(MagickWand *wand,
-% const MagickWand *reference,const ChannelType channel,
-% const MetricType metric,double *distortion)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o reference: the reference wand.
-%
-% o channel: the channel.
-%
-% o metric: the metric.
-%
-% o distortion: the computed distortion between the images.
-%
-*/
-WandExport MagickBooleanType MagickGetImageChannelDistortion(MagickWand *wand,
- const MagickWand *reference,const ChannelType channel,const MetricType metric,
- double *distortion)
-{
- MagickBooleanType
- status;
-
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- assert(reference != (MagickWand *) NULL);
- assert(reference->signature == WandSignature);
- if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
- ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=GetImageChannelDistortion(wand->images,reference->images,channel,
- metric,distortion,&wand->images->exception);
- return(status);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
-% M a g i c k G e t I m a g e C h a n n e l D i s t o r t i o n s %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% MagickGetImageChannelDistortions() compares one or more image channels of an
-% image to a reconstructed image and returns the specified distortion metrics.
-%
-% Use MagickRelinquishMemory() to free the metrics when you are done with them.
-%
-% The format of the MagickGetImageChannelDistortion method is:
-%
-% double *MagickGetImageChannelDistortion(MagickWand *wand,
-% const MagickWand *reference,const MetricType metric)
-%
-% A description of each parameter follows:
-%
-% o wand: the magick wand.
-%
-% o reference: the reference wand.
-%
-% o metric: the metric.
-%
-*/
-WandExport double *MagickGetImageChannelDistortions(MagickWand *wand,
- const MagickWand *reference,const MetricType metric)
-{
- double
- *channel_distortion;
-
- assert(wand != (MagickWand *) NULL);
- assert(wand->signature == WandSignature);
- if (wand->debug != MagickFalse)
- (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- assert(reference != (MagickWand *) NULL);
- assert(reference->signature == WandSignature);
- if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
- {
- (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
- "ContainsNoImages","`%s'",wand->name);
- return((double *) NULL);
- }
- channel_distortion=GetImageChannelDistortions(wand->images,reference->images,
- metric,&wand->images->exception);
- return(channel_distortion);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
% M a g i c k G e t I m a g e C h a n n e l F e a t u r e s %
% %
% %
% %
% %
% %
+% M a g i c k G e t I m a g e D i s p o s e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickGetImageDispose() gets the image disposal method.
+%
+% The format of the MagickGetImageDispose method is:
+%
+% DisposeType MagickGetImageDispose(MagickWand *wand)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+*/
+WandExport DisposeType MagickGetImageDispose(MagickWand *wand)
+{
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ if (wand->images == (Image *) NULL)
+ {
+ (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
+ "ContainsNoImages","`%s'",wand->name);
+ return(UndefinedDispose);
+ }
+ return((DisposeType) wand->images->dispose);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% M a g i c k G e t I m a g e D i s t o r t i o n %
% %
% %
MagickBooleanType
status;
-
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
% %
% %
% %
-% M a g i c k G e t I m a g e D i s p o s e %
+% M a g i c k G e t I m a g e D i s t o r t i o n s %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickGetImageDispose() gets the image disposal method.
+% MagickGetImageDistortions() compares one or more pixel channels of an
+% image to a reconstructed image and returns the specified distortion metrics.
%
-% The format of the MagickGetImageDispose method is:
+% Use MagickRelinquishMemory() to free the metrics when you are done with them.
%
-% DisposeType MagickGetImageDispose(MagickWand *wand)
+% The format of the MagickGetImageDistortion method is:
+%
+% double *MagickGetImageDistortion(MagickWand *wand,
+% const MagickWand *reference,const MetricType metric)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
+% o reference: the reference wand.
+%
+% o metric: the metric.
+%
*/
-WandExport DisposeType MagickGetImageDispose(MagickWand *wand)
+WandExport double *MagickGetImageDistortions(MagickWand *wand,
+ const MagickWand *reference,const MetricType metric)
{
+ double
+ *channel_distortion;
+
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
- if (wand->images == (Image *) NULL)
+ assert(reference != (MagickWand *) NULL);
+ assert(reference->signature == WandSignature);
+ if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
{
(void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
"ContainsNoImages","`%s'",wand->name);
- return(UndefinedDispose);
+ return((double *) NULL);
}
- return((DisposeType) wand->images->dispose);
+ channel_distortion=GetImageDistortions(wand->images,reference->images,
+ metric,&wand->images->exception);
+ return(channel_distortion);
}
\f
/*
MagickGetImageDispose(MagickWand *);
extern WandExport double
- *MagickGetImageChannelDistortions(MagickWand *,const MagickWand *,
+ *MagickGetImageDistortions(MagickWand *,const MagickWand *,
const MetricType),
MagickGetImageFuzz(MagickWand *),
MagickGetImageGamma(MagickWand *),
MagickGetImageBackgroundColor(MagickWand *,PixelWand *),
MagickGetImageBluePrimary(MagickWand *,double *,double *),
MagickGetImageBorderColor(MagickWand *,PixelWand *),
- MagickGetImageChannelDistortion(MagickWand *,const MagickWand *,
- const ChannelType,const MetricType,double *),
MagickGetImageChannelKurtosis(MagickWand *,const ChannelType,double *,
double *),
MagickGetImageChannelMean(MagickWand *,const ChannelType,double *,double *),
*MagickAppendImages(MagickWand *,const MagickBooleanType),
*MagickCoalesceImages(MagickWand *),
*MagickCombineImages(MagickWand *,const ChannelType),
- *MagickCompareImageChannels(MagickWand *,const MagickWand *,const ChannelType,
- const MetricType,double *),
*MagickCompareImages(MagickWand *,const MagickWand *,const MetricType,
double *),
- *MagickCompareImageLayers(MagickWand *,const ImageLayerMethod),
+ *MagickCompareImagesLayers(MagickWand *,const ImageLayerMethod),
*MagickDeconstructImages(MagickWand *),
*MagickEvaluateImages(MagickWand *,const MagickEvaluateOperator),
*MagickFxImage(MagickWand *,const char *),
% o image_info: the image info.
%
% o command: Choose from ConvertImageCommand, IdentifyImageCommand,
-% MogrifyImageCommand, CompositeImageCommand, CompareImageCommand,
+% MogrifyImageCommand, CompositeImageCommand, CompareImagesCommand,
% ConjureImageCommand, StreamImageCommand, ImportImageCommand,
% DisplayImageCommand, or AnimateImageCommand.
%
channel=DefaultChannels;
else
channel=(ChannelType) ParseChannelOption(argv[i+1]);
- SetPixelComponentMap(*image,argv[i+1]);
+ SetPixelComponentMap(*image,channel);
break;
}
if (LocaleCompare("charcoal",option+1) == 0)
*deconstruct_image;
(void) SyncImagesSettings(mogrify_info,*images);
- deconstruct_image=CompareImageLayers(*images,CompareAnyLayer,
+ deconstruct_image=CompareImagesLayers(*images,CompareAnyLayer,
exception);
if (deconstruct_image == (Image *) NULL)
{
case CompareOverlayLayer:
default:
{
- layers=CompareImageLayers(*images,method,exception);
+ layers=CompareImagesLayers(*images,method,exception);
break;
}
case MergeLayer:
Compare(ref,...)
Image::Magick ref=NO_INIT
ALIAS:
- CompareImage = 1
+ CompareImages = 1
compare = 2
compareimage = 3
PPCODE:
char
*attribute;
- ChannelType
- channel;
-
double
distortion;
/*
Get attribute.
*/
- channel=DefaultChannels;
reconstruct_image=image;
metric=RootMeanSquaredErrorMetric;
for (i=2; i < items; i+=2)
"UnrecognizedType",SvPV(ST(i),na));
return;
}
- channel=(ChannelType) option;
+ SetPixelComponentMap(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
}
}
}
- difference_image=CompareImageChannels(image,reconstruct_image,channel,
- metric,&distortion,exception);
+ difference_image=CompareImages(image,reconstruct_image,metric,&distortion,
+ exception);
if (difference_image != (Image *) NULL)
{
difference_image->error.mean_error_per_pixel=distortion;
CompareLayers(ref)
Image::Magick ref=NO_INIT
ALIAS:
- CompareImageLayers = 1
+ CompareImagesLayers = 1
comparelayers = 2
compareimagelayers = 3
PPCODE:
}
}
}
- image=CompareImageLayers(image,method,exception);
+ image=CompareImagesLayers(image,method,exception);
if ((image == (Image *) NULL) || (exception->severity >= ErrorException))
goto PerlException;
for ( ; image; image=image->next)
char
*attribute;
- ChannelType
- channel;
-
ExceptionInfo
*exception;
PackageName);
goto PerlException;
}
- channel=DefaultChannels;
normalize=MagickTrue;
region.x=0;
region.y=0;
SvPV(ST(i),na));
return;
}
- channel=(ChannelType) option;
+ SetPixelComponentMap(image,(ChannelType) option);
break;
}
ThrowPerlException(exception,OptionError,"UnrecognizedAttribute",
case CompareOverlayLayer:
default:
{
- layers=CompareImageLayers(image,method,exception);
+ layers=CompareImagesLayers(image,method,exception);
break;
}
case MergeLayer:
invert=MagickFalse;
if (attribute_flag[6] != 0)
invert=(MagickBooleanType) argument_list[6].integer_reference;
- SetPixelComponentMap(image,"alpha");
+ SetPixelComponentMap(image,AlphaChannel);
(void) FloodfillPaintImage(image,AlphaChannel,draw_info,&target,
geometry.x,geometry.y,invert);
StandardPixelComponentMap(image);
}
case 65: /* Deconstruct */
{
- image=CompareImageLayers(image,CompareAnyLayer,exception);
+ image=CompareImagesLayers(image,CompareAnyLayer,exception);
break;
}
case 66: /* GaussianBlur */
<configure name="LIB_VERSION" value="0x700"/>
<configure name="LIB_VERSION_NUMBER" value="7,0,0,0"/>
<configure name="SVN_REVISION" value="4693" />
- <configure name="RELEASE_DATE" value="2011-07-02"/>
+ <configure name="RELEASE_DATE" value="2011-07-05"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
(*fail)++;
continue;
}
- status=CompareImageCommand(image_info,number_arguments,arguments,
+ status=CompareImagesCommand(image_info,number_arguments,arguments,
(char **) NULL,exception);
for (j=0; j < number_arguments; j++)
arguments[j]=DestroyString(arguments[j]);
if (reference_image->colorspace != RGBColorspace)
fuzz+=0.3;
fuzz+=MagickEpsilon;
- difference_image=CompareImageChannels(reference_image,reconstruct_image,
+ difference_image=CompareImages(reference_image,reconstruct_image,
CompositeChannels,MeanSquaredErrorMetric,&distortion,exception);
reconstruct_image=DestroyImage(reconstruct_image);
reference_image=DestroyImage(reference_image);
if (reference_image->colorspace != RGBColorspace)
fuzz+=0.3;
fuzz+=MagickEpsilon;
- difference_image=CompareImageChannels(reference_image,reconstruct_image,
+ difference_image=CompareImages(reference_image,reconstruct_image,
CompositeChannels,MeanSquaredErrorMetric,&distortion,exception);
reconstruct_image=DestroyImage(reconstruct_image);
reference_image=DestroyImage(reference_image);
/*
Compare reference to reconstruct image.
*/
- difference_image=CompareImageChannels(reference_image,reconstruct_image,
+ difference_image=CompareImages(reference_image,reconstruct_image,
CompositeChannels,MeanSquaredErrorMetric,&distortion,exception);
reconstruct_image=DestroyImage(reconstruct_image);
reference_image=DestroyImage(reference_image);
exception=AcquireExceptionInfo();
image_info=AcquireImageInfo();
metadata=(char *) NULL;
- status=MagickCommandGenesis(image_info,CompareImageCommand,argc,argv,
+ status=MagickCommandGenesis(image_info,CompareImagesCommand,argc,argv,
&metadata,exception);
if (metadata != (char *) NULL)
metadata=DestroyString(metadata);