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-2012 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/utility-private.h"
49 #include "MagickCore/version.h"
54 #define MagickURLFilename "index.html"
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 % G e t M a g i c k C o p y r i g h t %
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67 % GetMagickCopyright() returns the ImageMagick API copyright as a string.
69 % The format of the GetMagickCopyright method is:
71 % const char *GetMagickCopyright(void)
74 MagickExport const char *GetMagickCopyright(void)
76 return(MagickCopyright);
80 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
84 % G e t M a g i c k F e a t u r e s %
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90 % GetMagickFeatures() returns the ImageMagick features.
92 % The format of the GetMagickFeatures method is:
94 % const char *GetMagickFeatures(void)
96 % No parameters are required.
99 MagickExport const char *GetMagickFeatures(void)
101 return(MagickFeatures);
105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 % G e t M a g i c k H o m e U R L %
113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
115 % GetMagickHomeURL() returns the ImageMagick home URL.
117 % The format of the GetMagickHomeURL method is:
119 % char *GetMagickHomeURL(void)
122 MagickExport char *GetMagickHomeURL(void)
136 exception=AcquireExceptionInfo();
137 paths=GetConfigurePaths(MagickURLFilename,exception);
138 exception=DestroyExceptionInfo(exception);
139 if (paths == (LinkedListInfo *) NULL)
140 return(ConstantString(MagickHomeURL));
141 element=(const char *) GetNextValueInLinkedList(paths);
142 while (element != (const char *) NULL)
144 (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",element,
145 DirectorySeparator,MagickURLFilename);
146 if (IsPathAccessible(path) != MagickFalse)
147 return(ConstantString(path));
148 element=(const char *) GetNextValueInLinkedList(paths);
150 return(ConstantString(MagickHomeURL));
154 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158 % G e t M a g i c k P a c k a g e N a m e %
162 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 % GetMagickPackageName() returns the ImageMagick package name.
166 % The format of the GetMagickName method is:
168 % const char *GetMagickName(void)
170 % No parameters are required.
173 MagickExport const char *GetMagickPackageName(void)
175 return(MagickPackageName);
179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
183 % G e t M a g i c k Q u a n t u m D e p t h %
187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189 % GetMagickQuantumDepth() returns the ImageMagick quantum depth.
191 % The format of the GetMagickQuantumDepth method is:
193 % const char *GetMagickQuantumDepth(size_t *depth)
195 % A description of each parameter follows:
197 % o depth: the quantum depth is returned as a number.
200 MagickExport const char *GetMagickQuantumDepth(size_t *depth)
202 if (depth != (size_t *) NULL)
203 *depth=(size_t) MAGICKCORE_QUANTUM_DEPTH;
204 return(MagickQuantumDepth);
208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212 % G e t M a g i c k Q u a n t u m R a n g e %
216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
218 % GetMagickQuantumRange() returns the ImageMagick quantum range.
220 % The format of the GetMagickQuantumRange method is:
222 % const char *GetMagickQuantumRange(size_t *range)
224 % A description of each parameter follows:
226 % o range: the quantum range is returned as a number.
229 MagickExport const char *GetMagickQuantumRange(size_t *range)
231 if (range != (size_t *) NULL)
232 *range=(size_t) QuantumRange;
233 return(MagickQuantumRange);
237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
241 % G e t M a g i c k R e l e a s e D a t e %
245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
247 % GetMagickReleaseDate() returns the ImageMagick release date.
249 % The format of the GetMagickReleaseDate method is:
251 % const char *GetMagickReleaseDate(void)
253 % No parameters are required.
256 MagickExport const char *GetMagickReleaseDate(void)
258 return(MagickReleaseDate);
262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 % G e t M a g i c k V e r s i o n %
270 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
272 % GetMagickVersion() returns the ImageMagick API version as a string and
275 % The format of the GetMagickVersion method is:
277 % const char *GetMagickVersion(size_t *version)
279 % A description of each parameter follows:
281 % o version: the ImageMagick version is returned as a number.
284 MagickExport const char *GetMagickVersion(size_t *version)
286 if (version != (size_t *) NULL)
287 *version=MagickLibVersion;
288 return(MagickVersion);