00001 /* 00002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00003 % % 00004 % % 00005 % % 00006 % V V EEEEE RRRR SSSSS IIIII OOO N N % 00007 % V V E R R SS I O O NN N % 00008 % V V EEE RRRR SSS I O O N N N % 00009 % V V E R R SS I O O N NN % 00010 % V EEEEE R R SSSSS IIIII OOO N N % 00011 % % 00012 % % 00013 % MagickCore Version and Copyright Methods % 00014 % % 00015 % Software Design % 00016 % John Cristy % 00017 % September 2002 % 00018 % % 00019 % % 00020 % Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization % 00021 % dedicated to making software imaging solutions freely available. % 00022 % % 00023 % You may not use this file except in compliance with the License. You may % 00024 % obtain a copy of the License at % 00025 % % 00026 % http://www.imagemagick.org/script/license.php % 00027 % % 00028 % Unless required by applicable law or agreed to in writing, software % 00029 % distributed under the License is distributed on an "AS IS" BASIS, % 00030 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % 00031 % See the License for the specific language governing permissions and % 00032 % limitations under the License. % 00033 % % 00034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00035 % 00036 % 00037 */ 00038 00039 #include "magick/studio.h" 00040 #include "magick/configure.h" 00041 #include "magick/exception.h" 00042 #include "magick/exception-private.h" 00043 #include "magick/hashmap.h" 00044 #include "magick/option.h" 00045 #include "magick/string_.h" 00046 #include "magick/utility.h" 00047 #include "magick/version.h" 00048 00049 /* 00050 Define declarations. 00051 */ 00052 #define MagickURLFilename "index.html" 00053 00054 /* 00055 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00056 % % 00057 % % 00058 % % 00059 % G e t M a g i c k C o p y r i g h t % 00060 % % 00061 % % 00062 % % 00063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00064 % 00065 % GetMagickCopyright() returns the ImageMagick API copyright as a string. 00066 % 00067 % The format of the GetMagickCopyright method is: 00068 % 00069 % const char *GetMagickCopyright(void) 00070 % 00071 */ 00072 MagickExport const char *GetMagickCopyright(void) 00073 { 00074 return(MagickCopyright); 00075 } 00076 00077 /* 00078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00079 % % 00080 % % 00081 % % 00082 % G e t M a g i c k F e a t u r e s % 00083 % % 00084 % % 00085 % % 00086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00087 % 00088 % GetMagickFeatures() returns the ImageMagick features. 00089 % 00090 % The format of the GetMagickFeatures method is: 00091 % 00092 % const char *GetMagickFeatures(void) 00093 % 00094 % No parameters are required. 00095 % 00096 */ 00097 MagickExport const char *GetMagickFeatures(void) 00098 { 00099 return(MagickFeatures); 00100 } 00101 00102 /* 00103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00104 % % 00105 % % 00106 % % 00107 % G e t M a g i c k H o m e U R L % 00108 % % 00109 % % 00110 % % 00111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00112 % 00113 % GetMagickHomeURL() returns the ImageMagick home URL. 00114 % 00115 % The format of the GetMagickHomeURL method is: 00116 % 00117 % char *GetMagickHomeURL(void) 00118 % 00119 */ 00120 MagickExport char *GetMagickHomeURL(void) 00121 { 00122 char 00123 path[MaxTextExtent]; 00124 00125 const char 00126 *element; 00127 00128 ExceptionInfo 00129 *exception; 00130 00131 LinkedListInfo 00132 *paths; 00133 00134 exception=AcquireExceptionInfo(); 00135 paths=GetConfigurePaths(MagickURLFilename,exception); 00136 exception=DestroyExceptionInfo(exception); 00137 if (paths == (LinkedListInfo *) NULL) 00138 return(ConstantString(MagickHomeURL)); 00139 element=(const char *) GetNextValueInLinkedList(paths); 00140 while (element != (const char *) NULL) 00141 { 00142 (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",element, 00143 DirectorySeparator,MagickURLFilename); 00144 if (IsPathAccessible(path) != MagickFalse) 00145 return(ConstantString(path)); 00146 element=(const char *) GetNextValueInLinkedList(paths); 00147 } 00148 return(ConstantString(MagickHomeURL)); 00149 } 00150 00151 /* 00152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00153 % % 00154 % % 00155 % % 00156 % G e t M a g i c k P a c k a g e N a m e % 00157 % % 00158 % % 00159 % % 00160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00161 % 00162 % GetMagickPackageName() returns the ImageMagick package name. 00163 % 00164 % The format of the GetMagickName method is: 00165 % 00166 % const char *GetMagickName(void) 00167 % 00168 % No parameters are required. 00169 % 00170 */ 00171 MagickExport const char *GetMagickPackageName(void) 00172 { 00173 return(MagickPackageName); 00174 } 00175 00176 /* 00177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00178 % % 00179 % % 00180 % % 00181 % G e t M a g i c k Q u a n t u m D e p t h % 00182 % % 00183 % % 00184 % % 00185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00186 % 00187 % GetMagickQuantumDepth() returns the ImageMagick quantum depth. 00188 % 00189 % The format of the GetMagickQuantumDepth method is: 00190 % 00191 % const char *GetMagickQuantumDepth(unsigned long *depth) 00192 % 00193 % A description of each parameter follows: 00194 % 00195 % o depth: the quantum depth is returned as a number. 00196 % 00197 */ 00198 MagickExport const char *GetMagickQuantumDepth(unsigned long *depth) 00199 { 00200 if (depth != (unsigned long *) NULL) 00201 *depth=(unsigned long) MAGICKCORE_QUANTUM_DEPTH; 00202 return(MagickQuantumDepth); 00203 } 00204 00205 /* 00206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00207 % % 00208 % % 00209 % % 00210 % G e t M a g i c k Q u a n t u m R a n g e % 00211 % % 00212 % % 00213 % % 00214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00215 % 00216 % GetMagickQuantumRange() returns the ImageMagick quantum range. 00217 % 00218 % The format of the GetMagickQuantumRange method is: 00219 % 00220 % const char *GetMagickQuantumRange(unsigned long *range) 00221 % 00222 % A description of each parameter follows: 00223 % 00224 % o range: the quantum range is returned as a number. 00225 % 00226 */ 00227 MagickExport const char *GetMagickQuantumRange(unsigned long *range) 00228 { 00229 if (range != (unsigned long *) NULL) 00230 *range=(unsigned long) QuantumRange; 00231 return(MagickQuantumRange); 00232 } 00233 00234 /* 00235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00236 % % 00237 % % 00238 % % 00239 % G e t M a g i c k R e l e a s e D a t e % 00240 % % 00241 % % 00242 % % 00243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00244 % 00245 % GetMagickReleaseDate() returns the ImageMagick release date. 00246 % 00247 % The format of the GetMagickReleaseDate method is: 00248 % 00249 % const char *GetMagickReleaseDate(void) 00250 % 00251 % No parameters are required. 00252 % 00253 */ 00254 MagickExport const char *GetMagickReleaseDate(void) 00255 { 00256 return(MagickReleaseDate); 00257 } 00258 00259 /* 00260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00261 % % 00262 % % 00263 % % 00264 % G e t M a g i c k V e r s i o n % 00265 % % 00266 % % 00267 % % 00268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00269 % 00270 % GetMagickVersion() returns the ImageMagick API version as a string and 00271 % as a number. 00272 % 00273 % The format of the GetMagickVersion method is: 00274 % 00275 % const char *GetMagickVersion(unsigned long *version) 00276 % 00277 % A description of each parameter follows: 00278 % 00279 % o version: the ImageMagick version is returned as a number. 00280 % 00281 */ 00282 MagickExport const char *GetMagickVersion(unsigned long *version) 00283 { 00284 if (version != (unsigned long *) NULL) 00285 *version=MagickLibVersion; 00286 return(MagickVersion); 00287 }
1.6.1