|
MagickCore
6.7.5
|
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-2012 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 "MagickCore/studio.h" 00040 #include "MagickCore/configure.h" 00041 #include "MagickCore/exception.h" 00042 #include "MagickCore/exception-private.h" 00043 #include "MagickCore/hashmap.h" 00044 #include "MagickCore/locale_.h" 00045 #include "MagickCore/option.h" 00046 #include "MagickCore/string_.h" 00047 #include "MagickCore/utility.h" 00048 #include "MagickCore/utility-private.h" 00049 #include "MagickCore/version.h" 00050 00051 /* 00052 Define declarations. 00053 */ 00054 #define MagickURLFilename "index.html" 00055 00056 /* 00057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00058 % % 00059 % % 00060 % % 00061 % G e t M a g i c k C o p y r i g h t % 00062 % % 00063 % % 00064 % % 00065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00066 % 00067 % GetMagickCopyright() returns the ImageMagick API copyright as a string. 00068 % 00069 % The format of the GetMagickCopyright method is: 00070 % 00071 % const char *GetMagickCopyright(void) 00072 % 00073 */ 00074 MagickExport const char *GetMagickCopyright(void) 00075 { 00076 return(MagickCopyright); 00077 } 00078 00079 /* 00080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00081 % % 00082 % % 00083 % % 00084 % G e t M a g i c k F e a t u r e s % 00085 % % 00086 % % 00087 % % 00088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00089 % 00090 % GetMagickFeatures() returns the ImageMagick features. 00091 % 00092 % The format of the GetMagickFeatures method is: 00093 % 00094 % const char *GetMagickFeatures(void) 00095 % 00096 % No parameters are required. 00097 % 00098 */ 00099 MagickExport const char *GetMagickFeatures(void) 00100 { 00101 return(MagickFeatures); 00102 } 00103 00104 /* 00105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00106 % % 00107 % % 00108 % % 00109 % G e t M a g i c k H o m e U R L % 00110 % % 00111 % % 00112 % % 00113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00114 % 00115 % GetMagickHomeURL() returns the ImageMagick home URL. 00116 % 00117 % The format of the GetMagickHomeURL method is: 00118 % 00119 % char *GetMagickHomeURL(void) 00120 % 00121 */ 00122 MagickExport char *GetMagickHomeURL(void) 00123 { 00124 char 00125 path[MaxTextExtent]; 00126 00127 const char 00128 *element; 00129 00130 ExceptionInfo 00131 *exception; 00132 00133 LinkedListInfo 00134 *paths; 00135 00136 exception=AcquireExceptionInfo(); 00137 paths=GetConfigurePaths(MagickURLFilename,exception); 00138 exception=DestroyExceptionInfo(exception); 00139 if (paths == (LinkedListInfo *) NULL) 00140 return(ConstantString(MagickHomeURL)); 00141 element=(const char *) GetNextValueInLinkedList(paths); 00142 while (element != (const char *) NULL) 00143 { 00144 (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",element, 00145 DirectorySeparator,MagickURLFilename); 00146 if (IsPathAccessible(path) != MagickFalse) 00147 return(ConstantString(path)); 00148 element=(const char *) GetNextValueInLinkedList(paths); 00149 } 00150 return(ConstantString(MagickHomeURL)); 00151 } 00152 00153 /* 00154 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00155 % % 00156 % % 00157 % % 00158 % G e t M a g i c k P a c k a g e N a m e % 00159 % % 00160 % % 00161 % % 00162 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00163 % 00164 % GetMagickPackageName() returns the ImageMagick package name. 00165 % 00166 % The format of the GetMagickName method is: 00167 % 00168 % const char *GetMagickName(void) 00169 % 00170 % No parameters are required. 00171 % 00172 */ 00173 MagickExport const char *GetMagickPackageName(void) 00174 { 00175 return(MagickPackageName); 00176 } 00177 00178 /* 00179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00180 % % 00181 % % 00182 % % 00183 % G e t M a g i c k Q u a n t u m D e p t h % 00184 % % 00185 % % 00186 % % 00187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00188 % 00189 % GetMagickQuantumDepth() returns the ImageMagick quantum depth. 00190 % 00191 % The format of the GetMagickQuantumDepth method is: 00192 % 00193 % const char *GetMagickQuantumDepth(size_t *depth) 00194 % 00195 % A description of each parameter follows: 00196 % 00197 % o depth: the quantum depth is returned as a number. 00198 % 00199 */ 00200 MagickExport const char *GetMagickQuantumDepth(size_t *depth) 00201 { 00202 if (depth != (size_t *) NULL) 00203 *depth=(size_t) MAGICKCORE_QUANTUM_DEPTH; 00204 return(MagickQuantumDepth); 00205 } 00206 00207 /* 00208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00209 % % 00210 % % 00211 % % 00212 % G e t M a g i c k Q u a n t u m R a n g e % 00213 % % 00214 % % 00215 % % 00216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00217 % 00218 % GetMagickQuantumRange() returns the ImageMagick quantum range. 00219 % 00220 % The format of the GetMagickQuantumRange method is: 00221 % 00222 % const char *GetMagickQuantumRange(size_t *range) 00223 % 00224 % A description of each parameter follows: 00225 % 00226 % o range: the quantum range is returned as a number. 00227 % 00228 */ 00229 MagickExport const char *GetMagickQuantumRange(size_t *range) 00230 { 00231 if (range != (size_t *) NULL) 00232 *range=(size_t) QuantumRange; 00233 return(MagickQuantumRange); 00234 } 00235 00236 /* 00237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00238 % % 00239 % % 00240 % % 00241 % G e t M a g i c k R e l e a s e D a t e % 00242 % % 00243 % % 00244 % % 00245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00246 % 00247 % GetMagickReleaseDate() returns the ImageMagick release date. 00248 % 00249 % The format of the GetMagickReleaseDate method is: 00250 % 00251 % const char *GetMagickReleaseDate(void) 00252 % 00253 % No parameters are required. 00254 % 00255 */ 00256 MagickExport const char *GetMagickReleaseDate(void) 00257 { 00258 return(MagickReleaseDate); 00259 } 00260 00261 /* 00262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00263 % % 00264 % % 00265 % % 00266 % G e t M a g i c k V e r s i o n % 00267 % % 00268 % % 00269 % % 00270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 00271 % 00272 % GetMagickVersion() returns the ImageMagick API version as a string and 00273 % as a number. 00274 % 00275 % The format of the GetMagickVersion method is: 00276 % 00277 % const char *GetMagickVersion(size_t *version) 00278 % 00279 % A description of each parameter follows: 00280 % 00281 % o version: the ImageMagick version is returned as a number. 00282 % 00283 */ 00284 MagickExport const char *GetMagickVersion(size_t *version) 00285 { 00286 if (version != (size_t *) NULL) 00287 *version=MagickLibVersion; 00288 return(MagickVersion); 00289 }