From: cristy Date: Fri, 15 Mar 2013 22:08:15 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~4075 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dab38059a4d0f1cb465cef1dee5cdff29260e0b;p=imagemagick --- diff --git a/MagickCore/draw.c b/MagickCore/draw.c index b43cb3458..75153b2a8 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -4146,8 +4146,8 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image, draw_info->affine.tx,draw_info->affine.ty); } if ((IsGrayColorspace(image->colorspace) != MagickFalse) && - ((IsPixelGray(&draw_info->fill) == MagickFalse) || - (IsPixelGray(&draw_info->stroke) == MagickFalse))) + ((IsPixelInfoGray(&draw_info->fill) == MagickFalse) || + (IsPixelInfoGray(&draw_info->stroke) == MagickFalse))) (void) TransformImageColorspace(image,sRGBColorspace,exception); status=MagickTrue; x=(ssize_t) ceil(primitive_info->point.x-0.5); diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 0412cf85f..709a6fdf8 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -701,7 +701,7 @@ MagickExport Image *ColorizeImage(const Image *image,const char *blend, return((Image *) NULL); } if ((IsGrayColorspace(image->colorspace) != MagickFalse) && - (IsPixelGray(&colorize) != MagickFalse)) + (IsPixelInfoGray(colorize) != MagickFalse)) (void) SetImageColorspace(colorize_image,sRGBColorspace,exception); if ((colorize_image->alpha_trait != BlendPixelTrait) && (colorize->alpha_trait == BlendPixelTrait)) @@ -5247,7 +5247,7 @@ MagickExport Image *TintImage(const Image *image,const char *blend, return((Image *) NULL); } if ((IsGrayColorspace(image->colorspace) != MagickFalse) && - (IsPixelGray(&tint) == MagickFalse)) + (IsPixelInfoGray(tint) == MagickFalse)) (void) SetImageColorspace(tint_image,sRGBColorspace,exception); if (blend == (const char *) NULL) return(tint_image); diff --git a/MagickWand/compare.c b/MagickWand/compare.c index 44d49fe96..80d54e57b 100644 --- a/MagickWand/compare.c +++ b/MagickWand/compare.c @@ -213,7 +213,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info, double dissimilarity_threshold, distortion, - similarity_metric; + similarity_metric, + similarity_threshold; Image *difference_image, diff --git a/MagickWand/magick-image.c b/MagickWand/magick-image.c index 94c0f526a..a5c9abeff 100644 --- a/MagickWand/magick-image.c +++ b/MagickWand/magick-image.c @@ -10739,7 +10739,8 @@ WandExport MagickBooleanType MagickSigmoidalContrastImage( % % MagickWand *MagickSimilarityImage(MagickWand *wand, % const MagickWand *reference,const MetricType metric, -% RectangeInfo *offset,double *similarity) +% const double similarity_threshold,RectangeInfo *offset, +% double *similarity) % % A description of each parameter follows: % @@ -10749,14 +10750,16 @@ WandExport MagickBooleanType MagickSigmoidalContrastImage( % % o metric: the metric. % +% o similarity_threshold: minimum distortion for (sub)image match. +% % o offset: the best match offset of the reference image within the image. % % o similarity: the computed similarity between the images. % */ WandExport MagickWand *MagickSimilarityImage(MagickWand *wand, - const MagickWand *reference,const MetricType metric,RectangleInfo *offset, - double *similarity) + const MagickWand *reference,const MetricType metric, + const double similarity_threshold,RectangleInfo *offset,double *similarity) { Image *similarity_image; @@ -10771,8 +10774,8 @@ WandExport MagickWand *MagickSimilarityImage(MagickWand *wand, "ContainsNoImages","`%s'",wand->name); return((MagickWand *) NULL); } - similarity_image=SimilarityImage(wand->images,reference->images,metric,offset, - similarity,wand->exception); + similarity_image=SimilarityImage(wand->images,reference->images,metric, + similarity_threshold,offset,similarity,wand->exception); if (similarity_image == (Image *) NULL) return((MagickWand *) NULL); return(CloneMagickWandFromImages(wand,similarity_image)); diff --git a/MagickWand/magick-image.h b/MagickWand/magick-image.h index 2128251ac..596cb94be 100644 --- a/MagickWand/magick-image.h +++ b/MagickWand/magick-image.h @@ -342,7 +342,7 @@ extern WandExport MagickWand *MagickOptimizeImageLayers(MagickWand *), *MagickPreviewImages(MagickWand *wand,const PreviewType), *MagickSimilarityImage(MagickWand *,const MagickWand *,const MetricType, - RectangleInfo *,double *), + const double,RectangleInfo *,double *), *MagickSmushImages(MagickWand *,const MagickBooleanType,const ssize_t), *MagickSteganoImage(MagickWand *,const MagickWand *,const ssize_t), *MagickStereoImage(MagickWand *,const MagickWand *),