18#ifndef MAGICKCORE_COMPARE_PRIVATE_H
19#define MAGICKCORE_COMPARE_PRIVATE_H
21#if defined(__cplusplus) || defined(c_plusplus)
25#include "magick/image-private.h"
27#define DefaultSimilarityThreshold (-1.0)
28#define MagickSafePSNRRecipicol(x) ((x)*log10(1.0/MagickEpsilon))
31static inline void SetImageCompareBounds(
const Image *image,
32 const Image *reconstruct_image,
size_t *columns,
size_t *rows)
37 *columns=MagickMax(image->columns,reconstruct_image->columns);
38 *rows=MagickMax(image->rows,reconstruct_image->rows);
39 artifact=GetImageArtifact(image,
"compare:virtual-pixels");
40 if ((artifact != (
const char *) NULL) &&
41 (IsStringTrue(artifact) == MagickFalse))
43 *columns=MagickMin(image->columns,reconstruct_image->columns);
44 *rows=MagickMin(image->rows,reconstruct_image->rows);
48#if defined(__cplusplus) || defined(c_plusplus)