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-2010 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 "magick/studio.h"
40 #include "magick/configure.h"
41 #include "magick/exception.h"
42 #include "magick/exception-private.h"
43 #include "magick/hashmap.h"
44 #include "magick/option.h"
45 #include "magick/string_.h"
46 #include "magick/utility.h"
47 #include "magick/version.h"
52 #define MagickURLFilename "index.html"
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 % G e t M a g i c k C o p y r i g h t %
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
65 % GetMagickCopyright() returns the ImageMagick API copyright as a string.
67 % The format of the GetMagickCopyright method is:
69 % const char *GetMagickCopyright(void)
72 MagickExport const char *GetMagickCopyright(void)
74 return(MagickCopyright);
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 % G e t M a g i c k F e a t u r e s %
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88 % GetMagickFeatures() returns the ImageMagick features.
90 % The format of the GetMagickFeatures method is:
92 % const char *GetMagickFeatures(void)
94 % No parameters are required.
97 MagickExport const char *GetMagickFeatures(void)
99 return(MagickFeatures);
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 % G e t M a g i c k H o m e U R L %
111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113 % GetMagickHomeURL() returns the ImageMagick home URL.
115 % The format of the GetMagickHomeURL method is:
117 % char *GetMagickHomeURL(void)
120 MagickExport char *GetMagickHomeURL(void)
134 exception=AcquireExceptionInfo();
135 paths=GetConfigurePaths(MagickURLFilename,exception);
136 exception=DestroyExceptionInfo(exception);
137 if (paths == (LinkedListInfo *) NULL)
138 return(ConstantString(MagickHomeURL));
139 element=(const char *) GetNextValueInLinkedList(paths);
140 while (element != (const char *) NULL)
142 (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",element,
143 DirectorySeparator,MagickURLFilename);
144 if (IsPathAccessible(path) != MagickFalse)
145 return(ConstantString(path));
146 element=(const char *) GetNextValueInLinkedList(paths);
148 return(ConstantString(MagickHomeURL));
152 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 % G e t M a g i c k P a c k a g e N a m e %
160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
162 % GetMagickPackageName() returns the ImageMagick package name.
164 % The format of the GetMagickName method is:
166 % const char *GetMagickName(void)
168 % No parameters are required.
171 MagickExport const char *GetMagickPackageName(void)
173 return(MagickPackageName);
177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
181 % G e t M a g i c k Q u a n t u m D e p t h %
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 % GetMagickQuantumDepth() returns the ImageMagick quantum depth.
189 % The format of the GetMagickQuantumDepth method is:
191 % const char *GetMagickQuantumDepth(size_t *depth)
193 % A description of each parameter follows:
195 % o depth: the quantum depth is returned as a number.
198 MagickExport const char *GetMagickQuantumDepth(size_t *depth)
200 if (depth != (size_t *) NULL)
201 *depth=(size_t) MAGICKCORE_QUANTUM_DEPTH;
202 return(MagickQuantumDepth);
206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210 % G e t M a g i c k Q u a n t u m R a n g e %
214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216 % GetMagickQuantumRange() returns the ImageMagick quantum range.
218 % The format of the GetMagickQuantumRange method is:
220 % const char *GetMagickQuantumRange(size_t *range)
222 % A description of each parameter follows:
224 % o range: the quantum range is returned as a number.
227 MagickExport const char *GetMagickQuantumRange(size_t *range)
229 if (range != (size_t *) NULL)
230 *range=(size_t) QuantumRange;
231 return(MagickQuantumRange);
235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
239 % G e t M a g i c k R e l e a s e D a t e %
243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
245 % GetMagickReleaseDate() returns the ImageMagick release date.
247 % The format of the GetMagickReleaseDate method is:
249 % const char *GetMagickReleaseDate(void)
251 % No parameters are required.
254 MagickExport const char *GetMagickReleaseDate(void)
256 return(MagickReleaseDate);
260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
264 % G e t M a g i c k V e r s i o n %
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270 % GetMagickVersion() returns the ImageMagick API version as a string and
273 % The format of the GetMagickVersion method is:
275 % const char *GetMagickVersion(size_t *version)
277 % A description of each parameter follows:
279 % o version: the ImageMagick version is returned as a number.
282 MagickExport const char *GetMagickVersion(size_t *version)
284 if (version != (size_t *) NULL)
285 *version=MagickLibVersion;
286 return(MagickVersion);