/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % V V EEEEE RRRR SSSSS IIIII OOO N N % % V V E R R SS I O O NN N % % V V EEE RRRR SSS I O O N N N % % V V E R R SS I O O N NN % % V EEEEE R R SSSSS IIIII OOO N N % % % % % % ImageMagick Version and Copyright Methods % % % % Software Design % % John Cristy % % September 2002 % % % % % % Copyright 1999-2007 ImageMagick Studio LLC, a non-profit organization % % dedicated to making software imaging solutions freely available. % % % % You may not use this file except in compliance with the License. You may % % obtain a copy of the License at % % % % http://www.imagemagick.org/script/license.php % % % % Unless required by applicable law or agreed to in writing, software % % distributed under the License is distributed on an "AS IS" BASIS, % % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % % See the License for the specific language governing permissions and % % limitations under the License. % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % */ #include "magick/studio.h" #include "magick/configure.h" #include "magick/exception.h" #include "magick/exception-private.h" #include "magick/hashmap.h" #include "magick/option.h" #include "magick/string_.h" #include "magick/utility.h" #include "magick/version.h" /* Define declarations. */ #define MagickURLFilename "index.html" /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k C o p y r i g h t % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickCopyright() returns the ImageMagick API copyright as a string. % % The format of the GetMagickCopyright method is: % % const char *GetMagickCopyright(void) % */ MagickExport const char *GetMagickCopyright(void) { return(MagickCopyright); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k H o m e U R L % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickHomeURL() returns the ImageMagick home URL. % % The format of the GetMagickHomeURL method is: % % char *GetMagickHomeURL(void) % */ MagickExport char *GetMagickHomeURL(void) { char path[MaxTextExtent]; const char *element; ExceptionInfo *exception; LinkedListInfo *paths; exception=AcquireExceptionInfo(); paths=GetConfigurePaths(MagickURLFilename,exception); exception=DestroyExceptionInfo(exception); if (paths == (LinkedListInfo *) NULL) return(ConstantString(MagickHomeURL)); element=(const char *) GetNextValueInLinkedList(paths); while (element != (const char *) NULL) { (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",element, DirectorySeparator,MagickURLFilename); if (IsAccessible(path) != MagickFalse) return(ConstantString(path)); element=(const char *) GetNextValueInLinkedList(paths); } return(ConstantString(MagickHomeURL)); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k P a c k a g e N a m e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickPackageName() returns the ImageMagick package name. % % The format of the GetMagickName method is: % % const char *GetMagickName(void) % % No parameters are required. % */ MagickExport const char *GetMagickPackageName(void) { return(MagickPackageName); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k Q u a n t u m D e p t h % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickQuantumDepth() returns the ImageMagick quantum depth. % % The format of the GetMagickQuantumDepth method is: % % const char *GetMagickQuantumDepth(unsigned long *depth) % % A description of each parameter follows: % % o depth: The quantum depth is returned as a number. % */ MagickExport const char *GetMagickQuantumDepth(unsigned long *depth) { if (depth != (unsigned long *) NULL) *depth=(unsigned long) QuantumDepth; return(MagickQuantumDepth); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k Q u a n t u m R a n g e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickQuantumRange() returns the ImageMagick quantum range. % % The format of the GetMagickQuantumRange method is: % % const char *GetMagickQuantumRange(unsigned long *range) % % A description of each parameter follows: % % o range: The quantum range is returned as a number. % */ MagickExport const char *GetMagickQuantumRange(unsigned long *range) { if (range != (unsigned long *) NULL) *range=(unsigned long) QuantumRange; return(MagickQuantumRange); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k R e l e a s e D a t e % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickReleaseDate() returns the ImageMagick release date. % % The format of the GetMagickReleaseDate method is: % % const char *GetMagickReleaseDate(void) % % No parameters are required. % */ MagickExport const char *GetMagickReleaseDate(void) { return(MagickReleaseDate); } /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % % G e t M a g i c k V e r s i o n % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % GetMagickVersion() returns the ImageMagick API version as a string and % as a number. % % The format of the GetMagickVersion method is: % % const char *GetMagickVersion(unsigned long *version) % % A description of each parameter follows: % % o version: The ImageMagick version is returned as a number. % */ MagickExport const char *GetMagickVersion(unsigned long *version) { if (version != (unsigned long *) NULL) *version=MagickLibVersion; return(MagickVersion); }