Go to the documentation of this file.
18 #ifndef _MAGICKCORE_MAGICK_TYPE_H
19 #define _MAGICKCORE_MAGICK_TYPE_H
21 #if defined(__cplusplus) || defined(c_plusplus)
27 #if !defined(MAGICKCORE_QUANTUM_DEPTH)
28 #define MAGICKCORE_QUANTUM_DEPTH 16
31 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__) && !defined(__MINGW64__)
32 # define MagickLLConstant(c) (MagickOffsetType) (c ## i64)
33 # define MagickULLConstant(c) (MagickSizeType) (c ## ui64)
35 # define MagickLLConstant(c) (MagickOffsetType) (c ## LL)
36 # define MagickULLConstant(c) (MagickSizeType) (c ## ULL)
39 #if (MAGICKCORE_QUANTUM_DEPTH == 8)
40 #define MaxColormapSize 256UL
46 #if MAGICKCORE_SIZEOF_FLOAT_T == 0
48 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT)
50 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE)
52 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE)
55 # error Your float_t type is neither a float, nor a double, nor a long double
59 #if defined(MAGICKCORE_HDRI_SUPPORT)
61 #define QuantumRange 255.0
62 #define QuantumFormat "%g"
65 #define QuantumRange ((Quantum) 255)
66 #define QuantumFormat "%u"
68 #elif (MAGICKCORE_QUANTUM_DEPTH == 16)
69 #define MaxColormapSize 65536UL
70 #define MaxMap 65535UL
75 #if MAGICKCORE_SIZEOF_FLOAT_T == 0
77 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT)
79 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE)
81 #elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE)
84 # error Your float_t type is neither a float, nor a double, nor a long double
88 #if defined(MAGICKCORE_HDRI_SUPPORT)
90 #define QuantumRange 65535.0
91 #define QuantumFormat "%g"
94 #define QuantumRange ((Quantum) 65535)
95 #define QuantumFormat "%u"
97 #elif (MAGICKCORE_QUANTUM_DEPTH == 32)
98 #define MaxColormapSize 65536UL
99 #define MaxMap 65535UL
104 #if MAGICKCORE_SIZEOF_DOUBLE_T == 0
106 #elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_DOUBLE)
108 #elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_LONG_DOUBLE)
111 # error Your double_t type is neither a float, nor a double, nor a long double
115 #if defined(MAGICKCORE_HDRI_SUPPORT)
117 #define QuantumRange 4294967295.0
118 #define QuantumFormat "%g"
121 #define QuantumRange ((Quantum) 4294967295)
122 #define QuantumFormat "%u"
124 #elif (MAGICKCORE_QUANTUM_DEPTH == 64)
125 #define MAGICKCORE_HDRI_SUPPORT
126 #define MaxColormapSize 65536UL
127 #define MaxMap 65535UL
132 #define QuantumRange 18446744073709551615.0
133 #define QuantumFormat "%g"
136 # error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64"
139 #define MagickEpsilon ((MagickRealType) 1.0e-15)
140 #define MagickHuge 3.4e+38F
141 #define QuantumScale ((double) 1.0/(double) QuantumRange)
147 #if !defined(MAGICKCORE_WINDOWS_SUPPORT)
148 #if (MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG == 8)
151 #define MagickOffsetFormat "lld"
152 #define MagickSizeFormat "llu"
156 #define MagickOffsetFormat "ld"
157 #define MagickSizeFormat "lu"
162 #define MagickOffsetFormat "I64i"
163 #define MagickSizeFormat "I64u"
166 #if defined(_MSC_VER) && (_MSC_VER == 1200)
172 #if defined(macintosh)
173 #define ExceptionInfo MagickExceptionInfo
224 #if defined(__cplusplus) || defined(c_plusplus)