mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-06-12 15:37:14 +02:00
PHASH should trap for equal size image for subimage-search
This commit is contained in:
@@ -1265,7 +1265,8 @@ WandExport MagickBooleanType CompareImagesCommand(ImageInfo *image_info,
|
||||
if (((subimage_search != MagickFalse) &&
|
||||
(image->columns == reconstruct_image->columns) &&
|
||||
(image->rows == reconstruct_image->rows)) &&
|
||||
(fabs(maxima-minima) < MagickEpsilon))
|
||||
((fabs(maxima-minima) < MagickEpsilon) ||
|
||||
(metric == PerceptualHashErrorMetric)))
|
||||
(void) ThrowMagickException(exception,GetMagickModule(),ImageWarning,
|
||||
"metric for subimage search is not sufficiently robust","(%s)",
|
||||
CommandOptionToMnemonic(MagickMetricOptions,(ssize_t) metric));
|
||||
|
||||
Reference in New Issue
Block a user