magick-type.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.
00006   obtain a copy of the License at
00007   
00008     http://www.imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickCore types.
00017 */
00018 #ifndef _MAGICKCORE_MAGICK_TYPE_H
00019 #define _MAGICKCORE_MAGICK_TYPE_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include "magick/magick-config.h"
00026 
00027 #if !defined(MAGICKCORE_QUANTUM_DEPTH)
00028 #define MAGICKCORE_QUANTUM_DEPTH  16
00029 #endif
00030 
00031 #if defined(__WINDOWS__) && !defined(__MINGW32__)
00032 #  define MagickLLConstant(c)  (MagickOffsetType) (c ## i64)
00033 #  define MagickULLConstant(c)  (MagickSizeType) (c ## ui64)
00034 #else
00035 #  define MagickLLConstant(c)  (MagickOffsetType) (c ## LL)
00036 #  define MagickULLConstant(c)  (MagickSizeType) (c ## ULL)
00037 #endif
00038 
00039 #if (MAGICKCORE_QUANTUM_DEPTH == 8)
00040 #define MagickEpsilon  1.0e-6
00041 #define MagickHuge     1.0e6
00042 #define MaxColormapSize  256UL
00043 #define MaxMap  255UL
00044 #define QuantumRange  255UL
00045 
00046 typedef float MagickRealType;
00047 #if defined(MAGICKCORE_HDRI_SUPPORT)
00048 typedef float Quantum;
00049 #define QuantumFormat  "%g"
00050 #else
00051 typedef unsigned char Quantum;
00052 #define QuantumFormat  "%u"
00053 #endif
00054 typedef unsigned long QuantumAny;
00055 #elif (MAGICKCORE_QUANTUM_DEPTH == 16)
00056 #define MagickEpsilon  1.0e-10
00057 #define MagickHuge     1.0e12
00058 #define MaxColormapSize  65536UL
00059 #define MaxMap  65535UL
00060 #define QuantumRange  65535UL
00061 
00062 typedef double MagickRealType;
00063 #if defined(MAGICKCORE_HDRI_SUPPORT)
00064 typedef float Quantum;
00065 #define QuantumFormat  "%g"
00066 #else
00067 typedef unsigned short Quantum;
00068 #define QuantumFormat  "%u"
00069 #endif
00070 typedef unsigned long QuantumAny;
00071 #elif (MAGICKCORE_QUANTUM_DEPTH == 32)
00072 #define MagickEpsilon  1.0e-10
00073 #define MagickHuge     1.0e12
00074 #define MaxColormapSize  65536UL
00075 #define MaxMap  65535UL
00076 #define QuantumRange  4294967295UL
00077 
00078 #if defined(MAGICKCORE_HAVE_LONG_DOUBLE)
00079 typedef long double MagickRealType;
00080 #else
00081 typedef double MagickRealType;
00082 #endif
00083 #if defined(MAGICKCORE_HDRI_SUPPORT)
00084 typedef float Quantum;
00085 #define QuantumFormat  "%g"
00086 #else
00087 typedef unsigned int Quantum;
00088 #define QuantumFormat  "%u"
00089 #endif
00090 typedef unsigned long QuantumAny;
00091 #elif (MAGICKCORE_QUANTUM_DEPTH == 64) && defined(MAGICKCORE_HAVE_LONG_DOUBLE)
00092 #define MagickEpsilon  1.0e-10
00093 #define MagickHuge     1.0e12
00094 #define MaxColormapSize  65536UL
00095 #define MaxMap  65535UL
00096 #define QuantumRange  MagickULLConstant(18446744073709551615)
00097 
00098 typedef long double MagickRealType;
00099 #if defined(MAGICKCORE_HDRI_SUPPORT)
00100 typedef double Quantum;
00101 #define QuantumFormat  "%g"
00102 #else
00103 typedef unsigned long long Quantum;
00104 #define QuantumFormat  "%llu"
00105 #endif
00106 typedef unsigned long long QuantumAny;
00107 #else
00108 #if !defined(_CH_)
00109 # error "Specified value of MAGICKCORE_QUANTUM_DEPTH is not supported"
00110 #endif
00111 #endif
00112 #define MaxRGB  QuantumRange  /* deprecated */
00113 
00114 /*
00115   Typedef declarations.
00116 */
00117 typedef unsigned int MagickStatusType;
00118 #if !defined(__WINDOWS__)
00119 #if (MAGICKCORE_SIZEOF_UNSIGNED_LONG_LONG == 8)
00120 typedef long long MagickOffsetType;
00121 typedef unsigned long long MagickSizeType;
00122 #define MagickSizeFormat  "%10llu"
00123 #else
00124 typedef long MagickOffsetType;
00125 typedef unsigned long MagickSizeType;
00126 #define MagickSizeFormat  "%10lu"
00127 #endif
00128 #else
00129 typedef __int64 MagickOffsetType;
00130 typedef unsigned __int64 MagickSizeType;
00131 #define MagickSizeFormat  "%10llu"
00132 #endif
00133 
00134 #if defined(macintosh)
00135 #define ExceptionInfo  MagickExceptionInfo
00136 #endif
00137 
00138 typedef enum
00139 {
00140   UndefinedChannel,
00141   RedChannel = 0x0001,
00142   GrayChannel = 0x0001,
00143   CyanChannel = 0x0001,
00144   GreenChannel = 0x0002,
00145   MagentaChannel = 0x0002,
00146   BlueChannel = 0x0004,
00147   YellowChannel = 0x0004,
00148   AlphaChannel = 0x0008,
00149   OpacityChannel = 0x0008,
00150   MatteChannel = 0x0008,  /* deprecated */
00151   BlackChannel = 0x0020,
00152   IndexChannel = 0x0020,
00153   AllChannels = 0xff,
00154   DefaultChannels = (AllChannels &~ OpacityChannel)
00155 } ChannelType;
00156 
00157 typedef enum
00158 {
00159   UndefinedClass,
00160   DirectClass,
00161   PseudoClass
00162 } ClassType;
00163 
00164 typedef enum
00165 {
00166   MagickFalse = 0,
00167   MagickTrue = 1
00168 } MagickBooleanType;
00169 
00170 typedef struct _BlobInfo BlobInfo;
00171 
00172 typedef struct _ExceptionInfo ExceptionInfo;
00173 
00174 typedef struct _Image Image;
00175 
00176 typedef struct _ImageInfo ImageInfo;
00177 
00178 #if defined(__cplusplus) || defined(c_plusplus)
00179 }
00180 #endif
00181 
00182 #endif

Generated on Sat Jan 26 14:50:29 2008 for MagickCore by  doxygen 1.5.4