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))
30static inline void SetImageCompareBounds(
const Image *image,
31 const Image *reconstruct_image,
size_t *columns,
size_t *rows)
33 const char *artifact = GetImageArtifact(image,
"compare:virtual-pixels");
34 MagickBooleanType vp = (artifact != (
const char *) NULL) ?
35 IsStringTrue(artifact) : MagickFalse;
36 if (vp == MagickFalse)
38 *columns=MagickMin(image->columns,reconstruct_image->columns);
39 *rows=MagickMin(image->rows,reconstruct_image->rows);
42 *columns=MagickMax(image->columns,reconstruct_image->columns);
43 *rows=MagickMax(image->rows,reconstruct_image->rows);
46#if defined(__cplusplus) || defined(c_plusplus)