18#ifndef MAGICKCORE_MAGICK_TYPE_H
19#define MAGICKCORE_MAGICK_TYPE_H
23#if defined(__cplusplus) || defined(c_plusplus)
27#if !defined(MAGICKCORE_QUANTUM_DEPTH)
28#define MAGICKCORE_QUANTUM_DEPTH 16
30#if !defined(MagickPathExtent)
31#define MagickPathExtent MaxTextExtent
34#if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__MINGW32__)
35# define MagickLLConstant(c) ((MagickOffsetType) (c ## i64))
36# define MagickULLConstant(c) ((MagickSizeType) (c ## ui64))
38# define MagickLLConstant(c) ((MagickOffsetType) (c ## LL))
39# define MagickULLConstant(c) ((MagickSizeType) (c ## ULL))
45#if MAGICKCORE_SIZEOF_FLOAT_T == 0
47#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_FLOAT)
49#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_DOUBLE)
51#elif (MAGICKCORE_SIZEOF_FLOAT_T == MAGICKCORE_SIZEOF_LONG_DOUBLE)
54#error Your MagickFloatType type is neither a float, nor a double, nor a long double
57#if MAGICKCORE_SIZEOF_DOUBLE_T == 0
59#elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_DOUBLE)
61#elif (MAGICKCORE_SIZEOF_DOUBLE_T == MAGICKCORE_SIZEOF_LONG_DOUBLE)
64#error Your MagickDoubleType type is neither a float, nor a double, nor a long double
67#if (MAGICKCORE_QUANTUM_DEPTH == 8)
68#define MaxColormapSize 256UL
71#if defined(MAGICKCORE_HDRI_SUPPORT)
73#define QuantumRange 255.0
74#define QuantumFormat "%g"
77#define QuantumRange ((Quantum) 255)
78#define QuantumFormat "%u"
80#elif (MAGICKCORE_QUANTUM_DEPTH == 16)
81#define MaxColormapSize 65536UL
84#if defined(MAGICKCORE_HDRI_SUPPORT)
86#define QuantumRange 65535.0
87#define QuantumFormat "%g"
90#define QuantumRange ((Quantum) 65535)
91#define QuantumFormat "%u"
93#elif (MAGICKCORE_QUANTUM_DEPTH == 32)
94#define MaxColormapSize 65536UL
97#if defined(MAGICKCORE_HDRI_SUPPORT)
99#define QuantumRange 4294967295.0
100#define QuantumFormat "%g"
103#define QuantumRange ((Quantum) 4294967295)
104#define QuantumFormat "%u"
106#elif (MAGICKCORE_QUANTUM_DEPTH == 64)
107#define MAGICKCORE_HDRI_SUPPORT 1
108#define MaxColormapSize 65536UL
109#define MaxMap 65535UL
112#define QuantumRange 18446744073709551615.0
113#define QuantumFormat "%g"
116# error "MAGICKCORE_QUANTUM_DEPTH must be one of 8, 16, 32, or 64"
119#define MagickEpsilon (1.0e-12)
120#define MagickMaximumValue 1.79769313486231570E+308
121#define MagickMinimumValue 2.22507385850720140E-308
122#define MagickStringify(macro_or_string) MagickStringifyArg(macro_or_string)
123#define MagickStringifyArg(contents) #contents
124#define QuantumScale ((double) 1.0/(double) QuantumRange)
132#if !defined(MAGICKCORE_WINDOWS_SUPPORT)
133#if (MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG == 8)
136#define MagickOffsetFormat "lld"
137#define MagickSizeFormat "llu"
141#define MagickOffsetFormat "ld"
142#define MagickSizeFormat "lu"
147#define MagickOffsetFormat "I64i"
148#define MagickSizeFormat "I64u"
151#if MAGICKCORE_HAVE_UINTPTR_T || defined(uintptr_t)
158#if defined(_MSC_VER) && (_MSC_VER == 1200)
164#if defined(macintosh)
165#define ExceptionInfo MagickExceptionInfo
219#if defined(MAGICKCORE_HAVE_ISNAN)
220# define IsNaN(a) isnan(a)
221#elif defined(_MSC_VER) && (_MSC_VER >= 1310)
223# define IsNaN(a) _isnan(a)
225# define IsNaN(a) ((a) != (a))
227#if !defined(INFINITY)
228# define INFINITY ((double) -logf(0f))
239#if defined(__cplusplus) || defined(c_plusplus)
float MagickFloatType
Definition magick-type.h:46
ChannelType
Definition magick-type.h:169
@ MatteChannel
Definition magick-type.h:180
@ UndefinedChannel
Definition magick-type.h:170
@ GrayChannels
Definition magick-type.h:190
@ AllChannels
Definition magick-type.h:184
@ GreenChannel
Definition magick-type.h:174
@ OpacityChannel
Definition magick-type.h:179
@ CompositeChannels
Definition magick-type.h:183
@ TrueAlphaChannel
Definition magick-type.h:188
@ BlackChannel
Definition magick-type.h:181
@ DefaultChannels
Definition magick-type.h:192
@ BlueChannel
Definition magick-type.h:176
@ RedChannel
Definition magick-type.h:171
@ SyncChannels
Definition magick-type.h:191
@ YellowChannel
Definition magick-type.h:177
@ MagentaChannel
Definition magick-type.h:175
@ RGBChannels
Definition magick-type.h:189
@ IndexChannel
Definition magick-type.h:182
@ CyanChannel
Definition magick-type.h:173
@ AlphaChannel
Definition magick-type.h:178
@ GrayChannel
Definition magick-type.h:172
MagickDoubleType MagickRealType
Definition magick-type.h:129
double MagickDoubleType
Definition magick-type.h:58
ssize_t MagickOffsetType
Definition magick-type.h:139
ssize_t SignedQuantum
Definition magick-type.h:83
unsigned short Quantum
Definition magick-type.h:89
unsigned int MagickStatusType
Definition magick-type.h:131
ClassType
Definition magick-type.h:196
@ UndefinedClass
Definition magick-type.h:197
@ DirectClass
Definition magick-type.h:198
@ PseudoClass
Definition magick-type.h:199
MagickSizeType QuantumAny
Definition magick-type.h:161
size_t MagickSizeType
Definition magick-type.h:140
MagickBooleanType
Definition magick-type.h:203
@ MagickFalse
Definition magick-type.h:204
@ MagickTrue
Definition magick-type.h:205
size_t MagickAddressType
Definition magick-type.h:155
Definition exception.h:103