2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % V V EEEEE RRRR SSSSS IIIII OOO N N %
7 % V V E R R SS I O O NN N %
8 % V V EEE RRRR SSS I O O N N N %
9 % V V E R R SS I O O N NN %
10 % V EEEEE R R SSSSS IIIII OOO N N %
13 % MagickCore Version and Copyright Methods %
20 % Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
21 % dedicated to making software imaging solutions freely available. %
23 % You may not use this file except in compliance with the License. You may %
24 % obtain a copy of the License at %
26 % http://www.imagemagick.org/script/license.php %
28 % Unless required by applicable law or agreed to in writing, software %
29 % distributed under the License is distributed on an "AS IS" BASIS, %
30 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
31 % See the License for the specific language governing permissions and %
32 % limitations under the License. %
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
39 #include "MagickCore/studio.h"
40 #include "MagickCore/configure.h"
41 #include "MagickCore/exception.h"
42 #include "MagickCore/exception-private.h"
43 #include "MagickCore/hashmap.h"
44 #include "MagickCore/locale_.h"
45 #include "MagickCore/option.h"
46 #include "MagickCore/string_.h"
47 #include "MagickCore/utility.h"
48 #include "MagickCore/version.h"
53 #define MagickURLFilename "index.html"
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 % G e t M a g i c k C o p y r i g h t %
64 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 % GetMagickCopyright() returns the ImageMagick API copyright as a string.
68 % The format of the GetMagickCopyright method is:
70 % const char *GetMagickCopyright(void)
73 MagickExport const char *GetMagickCopyright(void)
75 return(MagickCopyright);
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
83 % G e t M a g i c k F e a t u r e s %
87 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89 % GetMagickFeatures() returns the ImageMagick features.
91 % The format of the GetMagickFeatures method is:
93 % const char *GetMagickFeatures(void)
95 % No parameters are required.
98 MagickExport const char *GetMagickFeatures(void)
100 return(MagickFeatures);
104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
108 % G e t M a g i c k H o m e U R L %
112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114 % GetMagickHomeURL() returns the ImageMagick home URL.
116 % The format of the GetMagickHomeURL method is:
118 % char *GetMagickHomeURL(void)
121 MagickExport char *GetMagickHomeURL(void)
135 exception=AcquireExceptionInfo();
136 paths=GetConfigurePaths(MagickURLFilename,exception);
137 exception=DestroyExceptionInfo(exception);
138 if (paths == (LinkedListInfo *) NULL)
139 return(ConstantString(MagickHomeURL));
140 element=(const char *) GetNextValueInLinkedList(paths);
141 while (element != (const char *) NULL)
143 (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",element,
144 DirectorySeparator,MagickURLFilename);
145 if (IsPathAccessible(path) != MagickFalse)
146 return(ConstantString(path));
147 element=(const char *) GetNextValueInLinkedList(paths);
149 return(ConstantString(MagickHomeURL));
153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
157 % G e t M a g i c k P a c k a g e N a m e %
161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
163 % GetMagickPackageName() returns the ImageMagick package name.
165 % The format of the GetMagickName method is:
167 % const char *GetMagickName(void)
169 % No parameters are required.
172 MagickExport const char *GetMagickPackageName(void)
174 return(MagickPackageName);
178 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182 % G e t M a g i c k Q u a n t u m D e p t h %
186 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
188 % GetMagickQuantumDepth() returns the ImageMagick quantum depth.
190 % The format of the GetMagickQuantumDepth method is:
192 % const char *GetMagickQuantumDepth(size_t *depth)
194 % A description of each parameter follows:
196 % o depth: the quantum depth is returned as a number.
199 MagickExport const char *GetMagickQuantumDepth(size_t *depth)
201 if (depth != (size_t *) NULL)
202 *depth=(size_t) MAGICKCORE_QUANTUM_DEPTH;
203 return(MagickQuantumDepth);
207 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
211 % G e t M a g i c k Q u a n t u m R a n g e %
215 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217 % GetMagickQuantumRange() returns the ImageMagick quantum range.
219 % The format of the GetMagickQuantumRange method is:
221 % const char *GetMagickQuantumRange(size_t *range)
223 % A description of each parameter follows:
225 % o range: the quantum range is returned as a number.
228 MagickExport const char *GetMagickQuantumRange(size_t *range)
230 if (range != (size_t *) NULL)
231 *range=(size_t) QuantumRange;
232 return(MagickQuantumRange);
236 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
240 % G e t M a g i c k R e l e a s e D a t e %
244 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
246 % GetMagickReleaseDate() returns the ImageMagick release date.
248 % The format of the GetMagickReleaseDate method is:
250 % const char *GetMagickReleaseDate(void)
252 % No parameters are required.
255 MagickExport const char *GetMagickReleaseDate(void)
257 return(MagickReleaseDate);
261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
265 % G e t M a g i c k V e r s i o n %
269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
271 % GetMagickVersion() returns the ImageMagick API version as a string and
274 % The format of the GetMagickVersion method is:
276 % const char *GetMagickVersion(size_t *version)
278 % A description of each parameter follows:
280 % o version: the ImageMagick version is returned as a number.
283 MagickExport const char *GetMagickVersion(size_t *version)
285 if (version != (size_t *) NULL)
286 *version=MagickLibVersion;
287 return(MagickVersion);