#include "MagickCore/memory_.h"
#include "MagickCore/cache.h"
#include "MagickCore/image-private.h"
+#include "MagickCore/pixel-accessor.h"
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
if (quantum > range)
return(QuantumRange);
#if !defined(MAGICKCORE_HDRI_SUPPORT)
- return((Quantum) (((double) QuantumRange*quantum)/range+0.5));
+ return((Quantum) (((double) QuantumRange*quantum)*
+ PerceptibleReciprocal(range)+0.5));
#else
- return((Quantum) (((double) QuantumRange*quantum)/range));
+ return((Quantum) (((double) QuantumRange*quantum)*
+ PerceptibleReciprocal(range)));
#endif
}