#define QuantumFormat "%g"
#else
#if !defined(_CH_)
-# error "Specified value of MAGICKCORE_QUANTUM_DEPTH is not supported"
+# error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64"
#endif
#endif
#define MaxRGB QuantumRange /* deprecated */
#elif (MAGICKCORE_QUANTUM_DEPTH == 64)
static inline unsigned char ScaleQuantumToChar(const Quantum quantum)
{
+#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((unsigned char) (quantum/72340172838076673.0+0.5));
+#else
+ if (quantum <= 0.0)
+ return(0);
+ if ((quantum/72340172838076673.0) >= 255.0)
+ return(255);
+ return((unsigned char) (quantum/72340172838076673.0+0.5));
+#endif
}
#endif