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