difference_image=CompareImages(image,reconstruct_image,metric,&distortion,
exception);
else
- if ((similarity_image == (Image *) NULL) &&
- (metric != PerceptualHashErrorMetric))
- ThrowCompareException(OptionError,"ImageWidthsOrHeightsDiffer",
- image->filename)
+ if (similarity_image == (Image *) NULL)
+ {
+ unsigned long
+ height,
+ width;
+
+ width=image->columns;
+ if (reconstruct_image->columns > width)
+ width=reconstruct_image->columns;
+ height=image->rows;
+ if (reconstruct_image->rows > height)
+ height=reconstruct_image->rows;
+ if ((SetImageExtent(image,width,height,exception) != MagickFalse) &&
+ (SetImageExtent(reconstruct_image,width,height,exception) != MagickFalse))
+ difference_image=CompareImages(image,reconstruct_image,metric,
+ &distortion,exception);
+ }
else
{
Image