magick-property.c

Go to the documentation of this file.
00001 /*
00002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00003 %                                                                             %
00004 %                                                                             %
00005 %                                                                             %
00006 %                 M   M   AAA    GGGG  IIIII   CCCC  K   K                    %
00007 %                 MM MM  A   A  G        I    C      K  K                     %
00008 %                 M M M  AAAAA  G GGG    I    C      KKK                      %
00009 %                 M   M  A   A  G   G    I    C      K  K                     %
00010 %                 M   M  A   A   GGGG  IIIII   CCCC  K   K                    %
00011 %                                                                             %
00012 %           PPPP    RRRR     OOO   PPPP   EEEEE  RRRR   TTTTT  Y   Y          %
00013 %           P   P   R   R   O   O  P   P  E      R   R    T     Y Y           %
00014 %           PPPP    RRRR    O   O  PPPP   EEE    RRRR     T      Y            %
00015 %           P       R R     O   O  P      E      R R      T      Y            %
00016 %           P       R  R     OOO   P      EEEEE  R  R     T      Y            %
00017 %                                                                             %
00018 %                                                                             %
00019 %            Set or Get MagickWand Properties, Options, or Profiles           %
00020 %                                                                             %
00021 %                               Software Design                               %
00022 %                                 John Cristy                                 %
00023 %                                 August 2003                                 %
00024 %                                                                             %
00025 %                                                                             %
00026 %  Copyright 1999-2008 ImageMagick Studio LLC, a non-profit organization      %
00027 %  dedicated to making software imaging solutions freely available.           %
00028 %                                                                             %
00029 %  You may not use this file except in compliance with the License.  You may  %
00030 %  obtain a copy of the License at                                            %
00031 %                                                                             %
00032 %    http://www.imagemagick.org/script/license.php                            %
00033 %                                                                             %
00034 %  Unless required by applicable law or agreed to in writing, software        %
00035 %  distributed under the License is distributed on an "AS IS" BASIS,          %
00036 %  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   %
00037 %  See the License for the specific language governing permissions and        %
00038 %  limitations under the License.                                             %
00039 %                                                                             %
00040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00041 %
00042 %
00043 %
00044 */
00045 
00046 /*
00047   Include declarations.
00048 */
00049 #include "wand/studio.h"
00050 #include "wand/MagickWand.h"
00051 #include "wand/magick-wand-private.h"
00052 #include "wand/wand.h"
00053 
00054 /*
00055   Define declarations.
00056 */
00057 #define ThrowWandException(severity,tag,context) \
00058 { \
00059   (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
00060     tag,"`%s'",context); \
00061   return(MagickFalse); \
00062 }
00063 
00064 /*
00065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00066 %                                                                             %
00067 %                                                                             %
00068 %                                                                             %
00069 %   M a g i c k D e l e t e I m a g e P r o p e r t y                         %
00070 %                                                                             %
00071 %                                                                             %
00072 %                                                                             %
00073 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00074 %
00075 %  MagickDeleteImageProperty() deletes a wand property.
00076 %
00077 %  The format of the MagickDeleteImageProperty method is:
00078 %
00079 %      MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
00080 %        const char *property)
00081 %
00082 %  A description of each parameter follows:
00083 %
00084 %    o image: the image.
00085 %
00086 %    o property: the image property.
00087 %
00088 */
00089 WandExport MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
00090   const char *property)
00091 {
00092   assert(wand != (MagickWand *) NULL);
00093   assert(wand->signature == WandSignature);
00094   if (wand->debug != MagickFalse)
00095     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00096   if (wand->images == (Image *) NULL)
00097     {
00098       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00099         "ContainsNoImages","`%s'",wand->name);
00100       return(MagickFalse);
00101     }
00102   return(DeleteImageProperty(wand->images,property));
00103 }
00104 
00105 /*
00106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00107 %                                                                             %
00108 %                                                                             %
00109 %                                                                             %
00110 %   M a g i c k D e l e t e O p t i o n                                       %
00111 %                                                                             %
00112 %                                                                             %
00113 %                                                                             %
00114 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00115 %
00116 %  MagickDeleteOption() deletes a wand option.
00117 %
00118 %  The format of the MagickDeleteOption method is:
00119 %
00120 %      MagickBooleanType MagickDeleteOption(MagickWand *wand,
00121 %        const char *option)
00122 %
00123 %  A description of each parameter follows:
00124 %
00125 %    o image: the image.
00126 %
00127 %    o option: the image option.
00128 %
00129 */
00130 WandExport MagickBooleanType MagickDeleteOption(MagickWand *wand,
00131   const char *option)
00132 {
00133   assert(wand != (MagickWand *) NULL);
00134   assert(wand->signature == WandSignature);
00135   if (wand->debug != MagickFalse)
00136     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00137   return(DeleteImageOption(wand->image_info,option));
00138 }
00139 
00140 /*
00141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00142 %                                                                             %
00143 %                                                                             %
00144 %                                                                             %
00145 %   M a g i c k G e t A n t i a l i a s                                       %
00146 %                                                                             %
00147 %                                                                             %
00148 %                                                                             %
00149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00150 %
00151 %  MagickGetAntialias() returns the antialias property associated with the
00152 %  wand.
00153 %
00154 %  The format of the MagickGetAntialias method is:
00155 %
00156 %      MagickBooleanType MagickGetAntialias(const MagickWand *wand)
00157 %
00158 %  A description of each parameter follows:
00159 %
00160 %    o wand: the magick wand.
00161 %
00162 */
00163 WandExport MagickBooleanType MagickGetAntialias(const MagickWand *wand)
00164 {
00165   assert(wand != (const MagickWand *) NULL);
00166   assert(wand->signature == WandSignature);
00167   if (wand->debug != MagickFalse)
00168     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00169   return(wand->image_info->antialias);
00170 }
00171 
00172 /*
00173 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00174 %                                                                             %
00175 %                                                                             %
00176 %                                                                             %
00177 %   M a g i c k G e t B a c k g r o u n d C o l o r                           %
00178 %                                                                             %
00179 %                                                                             %
00180 %                                                                             %
00181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00182 %
00183 %  MagickGetBackgroundColor() returns the wand background color.
00184 %
00185 %  The format of the MagickGetBackgroundColor method is:
00186 %
00187 %      PixelWand *MagickGetBackgroundColor(MagickWand *wand)
00188 %
00189 %  A description of each parameter follows:
00190 %
00191 %    o wand: the magick wand.
00192 %
00193 */
00194 WandExport PixelWand *MagickGetBackgroundColor(MagickWand *wand)
00195 {
00196   PixelWand
00197     *background_color;
00198 
00199   assert(wand != (MagickWand *) NULL);
00200   assert(wand->signature == WandSignature);
00201   if (wand->debug != MagickFalse)
00202     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00203   background_color=NewPixelWand();
00204   PixelSetQuantumColor(background_color,&wand->image_info->background_color);
00205   return(background_color);
00206 }
00207 
00208 /*
00209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00210 %                                                                             %
00211 %                                                                             %
00212 %                                                                             %
00213 %   M a g i c k G e t C o m p r e s s i o n                                   %
00214 %                                                                             %
00215 %                                                                             %
00216 %                                                                             %
00217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00218 %
00219 %  MagickGetCompression() gets the wand compression type.
00220 %
00221 %  The format of the MagickGetCompression method is:
00222 %
00223 %      CompressionType MagickGetCompression(MagickWand *wand)
00224 %
00225 %  A description of each parameter follows:
00226 %
00227 %    o wand: the magick wand.
00228 %
00229 */
00230 WandExport CompressionType MagickGetCompression(MagickWand *wand)
00231 {
00232   assert(wand != (MagickWand *) NULL);
00233   assert(wand->signature == WandSignature);
00234   if (wand->debug != MagickFalse)
00235     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00236   return(wand->image_info->compression);
00237 }
00238 
00239 /*
00240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00241 %                                                                             %
00242 %                                                                             %
00243 %                                                                             %
00244 %   M a g i c k G e t C o m p r e s s i o n Q u a l i t y                     %
00245 %                                                                             %
00246 %                                                                             %
00247 %                                                                             %
00248 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00249 %
00250 %  MagickGetCompressionQuality() gets the wand compression quality.
00251 %
00252 %  The format of the MagickGetCompressionQuality method is:
00253 %
00254 %      unsigned long MagickGetCompressionQuality(MagickWand *wand)
00255 %
00256 %  A description of each parameter follows:
00257 %
00258 %    o wand: the magick wand.
00259 %
00260 */
00261 WandExport unsigned long MagickGetCompressionQuality(MagickWand *wand)
00262 {
00263   assert(wand != (MagickWand *) NULL);
00264   assert(wand->signature == WandSignature);
00265   if (wand->debug != MagickFalse)
00266     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00267   return(wand->image_info->quality);
00268 }
00269 
00270 /*
00271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00272 %                                                                             %
00273 %                                                                             %
00274 %                                                                             %
00275 %   M a g i c k G e t C o p y r i g h t                                       %
00276 %                                                                             %
00277 %                                                                             %
00278 %                                                                             %
00279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00280 %
00281 %  MagickGetCopyright() returns the ImageMagick API copyright as a string
00282 %  constant.
00283 %
00284 %  The format of the MagickGetCopyright method is:
00285 %
00286 %      const char *MagickGetCopyright(void)
00287 %
00288 */
00289 WandExport const char *MagickGetCopyright(void)
00290 {
00291   return(GetMagickCopyright());
00292 }
00293 
00294 /*
00295 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00296 %                                                                             %
00297 %                                                                             %
00298 %                                                                             %
00299 %   M a g i c k G e t F i l e n a m e                                         %
00300 %                                                                             %
00301 %                                                                             %
00302 %                                                                             %
00303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00304 %
00305 %  MagickGetFilename() returns the filename associated with an image sequence.
00306 %
00307 %  The format of the MagickGetFilename method is:
00308 %
00309 %      const char *MagickGetFilename(const MagickWand *wand)
00310 %
00311 %  A description of each parameter follows:
00312 %
00313 %    o wand: the magick wand.
00314 %
00315 */
00316 WandExport char *MagickGetFilename(const MagickWand *wand)
00317 {
00318   assert(wand != (const MagickWand *) NULL);
00319   assert(wand->signature == WandSignature);
00320   if (wand->debug != MagickFalse)
00321     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00322   return(AcquireString(wand->image_info->filename));
00323 }
00324 
00325 /*
00326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00327 %                                                                             %
00328 %                                                                             %
00329 %                                                                             %
00330 %   M a g i c k G e t F o n t                                                 %
00331 %                                                                             %
00332 %                                                                             %
00333 %                                                                             %
00334 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00335 %
00336 %  MagickGetFont() returns the font associated with the MagickWand.
00337 %
00338 %  The format of the MagickGetFont method is:
00339 %
00340 %      char *MagickGetFont(MagickWand *wand)
00341 %
00342 %  A description of each parameter follows:
00343 %
00344 %    o wand: the magick wand.
00345 %
00346 */
00347 WandExport char *MagickGetFont(MagickWand *wand)
00348 {
00349   assert(wand != (MagickWand *) NULL);
00350   assert(wand->signature == WandSignature);
00351   if (wand->debug != MagickFalse)
00352     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00353   if (wand->image_info->font == (char *) NULL)
00354     return((char *) NULL);
00355   return(AcquireString(wand->image_info->font));
00356 }
00357 
00358 /*
00359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00360 %                                                                             %
00361 %                                                                             %
00362 %                                                                             %
00363 %   M a g i c k G e t F o r m a t                                             %
00364 %                                                                             %
00365 %                                                                             %
00366 %                                                                             %
00367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00368 %
00369 %  MagickGetFormat() returns the format of the magick wand.
00370 %
00371 %  The format of the MagickGetFormat method is:
00372 %
00373 %      const char MagickGetFormat(MagickWand *wand)
00374 %
00375 %  A description of each parameter follows:
00376 %
00377 %    o wand: the magick wand.
00378 %
00379 */
00380 WandExport char *MagickGetFormat(MagickWand *wand)
00381 {
00382   assert(wand != (MagickWand *) NULL);
00383   assert(wand->signature == WandSignature);
00384   if (wand->debug != MagickFalse)
00385     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00386   return(AcquireString(wand->image_info->magick));
00387 }
00388 
00389 /*
00390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00391 %                                                                             %
00392 %                                                                             %
00393 %                                                                             %
00394 %   M a g i c k G e t G r a v i t y                                           %
00395 %                                                                             %
00396 %                                                                             %
00397 %                                                                             %
00398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00399 %
00400 %  MagickGetGravity() gets the wand gravity.
00401 %
00402 %  The format of the MagickGetGravity method is:
00403 %
00404 %      GravityType MagickGetGravity(MagickWand *wand)
00405 %
00406 %  A description of each parameter follows:
00407 %
00408 %    o wand: the magick wand.
00409 %
00410 */
00411 WandExport GravityType MagickGetGravity(MagickWand *wand)
00412 {
00413   const char
00414     *option;
00415 
00416   GravityType
00417     type;
00418 
00419   assert(wand != (MagickWand *) NULL);
00420   assert(wand->signature == WandSignature);
00421   if (wand->debug != MagickFalse)
00422     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00423   option=GetImageOption(wand->image_info,"gravity");
00424   if (option == (const char *) NULL)
00425     return(UndefinedGravity);
00426   type=(GravityType) ParseMagickOption(MagickGravityOptions,MagickFalse,option);
00427   return(type);
00428 }
00429 
00430 /*
00431 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00432 %                                                                             %
00433 %                                                                             %
00434 %                                                                             %
00435 %   M a g i c k G e t H o m e U R L                                           %
00436 %                                                                             %
00437 %                                                                             %
00438 %                                                                             %
00439 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00440 %
00441 %  MagickGetHomeURL() returns the ImageMagick home URL.
00442 %
00443 %  The format of the MagickGetHomeURL method is:
00444 %
00445 %      char *MagickGetHomeURL(void)
00446 %
00447 */
00448 WandExport char *MagickGetHomeURL(void)
00449 {
00450   return(GetMagickHomeURL());
00451 }
00452 
00453 /*
00454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00455 %                                                                             %
00456 %                                                                             %
00457 %                                                                             %
00458 %   M a g i c k G e t I m a g e P r o f i l e                                 %
00459 %                                                                             %
00460 %                                                                             %
00461 %                                                                             %
00462 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00463 %
00464 %  MagickGetImageProfile() returns the named image profile.
00465 %
00466 %  The format of the MagickGetImageProfile method is:
00467 %
00468 %      unsigned char *MagickGetImageProfile(MagickWand *wand,const char *name,
00469 %        size_t *length)
00470 %
00471 %  A description of each parameter follows:
00472 %
00473 %    o wand: the magick wand.
00474 %
00475 %    o name: Name of profile to return: ICC, IPTC, or generic profile.
00476 %
00477 %    o length: the length of the profile.
00478 %
00479 */
00480 WandExport unsigned char *MagickGetImageProfile(MagickWand *wand,
00481   const char *name,size_t *length)
00482 {
00483   const StringInfo
00484     *profile;
00485 
00486   unsigned char
00487     *datum;
00488 
00489   assert(wand != (MagickWand *) NULL);
00490   assert(wand->signature == WandSignature);
00491   if (wand->debug != MagickFalse)
00492     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00493   if (wand->images == (Image *) NULL)
00494     {
00495       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00496         "ContainsNoImages","`%s'",wand->name);
00497       return((unsigned char *) NULL);
00498     }
00499   *length=0;
00500   if (wand->images->profiles == (SplayTreeInfo *) NULL)
00501     return((unsigned char *) NULL);
00502   profile=GetImageProfile(wand->images,name);
00503   if (profile == (StringInfo *) NULL)
00504     return((unsigned char *) NULL);
00505   datum=(unsigned char *) AcquireQuantumMemory(GetStringInfoLength(profile),
00506     sizeof(*datum));
00507   if (datum == (unsigned char *) NULL)
00508     return((unsigned char *) NULL);
00509   (void) CopyMagickMemory(datum,GetStringInfoDatum(profile),
00510     GetStringInfoLength(profile));
00511   *length=(unsigned long) GetStringInfoLength(profile);
00512   return(datum);
00513 }
00514 
00515 /*
00516 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00517 %                                                                             %
00518 %                                                                             %
00519 %                                                                             %
00520 %   M a g i c k G e t I m a g e P r o f i l e s                               %
00521 %                                                                             %
00522 %                                                                             %
00523 %                                                                             %
00524 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00525 %
00526 %  MagickGetImageProfiles() returns all the profile names that match the
00527 %  specified pattern associated with a wand.  Use MagickGetImageProfile() to
00528 %  return the value of a particular property.  Use MagickRelinquishMemory() to
00529 %  free the value when you are finished with it.
00530 %
00531 %  The format of the MagickGetImageProfiles method is:
00532 %
00533 %      char *MagickGetImageProfiles(MagickWand *wand,
00534 %        unsigned long *number_profiles)
00535 %
00536 %  A description of each parameter follows:
00537 %
00538 %    o wand: the magick wand.
00539 %
00540 %    o pattern: Specifies a pointer to a text string containing a pattern.
00541 %
00542 %    o number_profiles: the number profiles associated with this wand.
00543 %
00544 */
00545 WandExport char **MagickGetImageProfiles(MagickWand *wand,const char *pattern,
00546   unsigned long *number_profiles)
00547 {
00548   char
00549     **profiles;
00550 
00551   const char
00552     *property;
00553 
00554   register long
00555     i;
00556 
00557   size_t
00558     length;
00559 
00560   assert(wand != (MagickWand *) NULL);
00561   assert(wand->signature == WandSignature);
00562   if (wand->debug != MagickFalse)
00563     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00564   if (wand->images == (Image *) NULL)
00565     {
00566       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00567         "ContainsNoImages","`%s'",wand->name);
00568       return((char **) NULL);
00569     }
00570   (void) GetImageProfile(wand->images,"exif:*");
00571   length=1024;
00572   profiles=(char **) AcquireQuantumMemory(length,sizeof(*profiles));
00573   if (profiles == (char **) NULL)
00574     return((char **) NULL);
00575   ResetImageProfileIterator(wand->images);
00576   property=GetNextImageProfile(wand->images);
00577   for (i=0; property != (const char *) NULL; )
00578   {
00579     if ((*property != '[') &&
00580         (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
00581       {
00582         if ((i+1) >= (long) length)
00583           {
00584             length<<=1;
00585             profiles=(char **) ResizeQuantumMemory(profiles,length,
00586               sizeof(*profiles));
00587             if (profiles == (char **) NULL)
00588               {
00589                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00590                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00591                   wand->name);
00592                 return((char **) NULL);
00593               }
00594           }
00595         profiles[i]=ConstantString(property);
00596         i++;
00597       }
00598     property=GetNextImageProfile(wand->images);
00599   }
00600   profiles[i]=(char *) NULL;
00601   *number_profiles=(unsigned long) i;
00602   return(profiles);
00603 }
00604 
00605 /*
00606 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00607 %                                                                             %
00608 %                                                                             %
00609 %                                                                             %
00610 %   M a g i c k G e t I m a g e P r o p e r t y                               %
00611 %                                                                             %
00612 %                                                                             %
00613 %                                                                             %
00614 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00615 %
00616 %  MagickGetImageProperty() returns a value associated with the specified
00617 %  property.  Use MagickRelinquishMemory() to free the value when you are
00618 %  finished with it.
00619 %
00620 %  The format of the MagickGetImageProperty method is:
00621 %
00622 %      char *MagickGetImageProperty(MagickWand *wand,const char *property)
00623 %
00624 %  A description of each parameter follows:
00625 %
00626 %    o wand: the magick wand.
00627 %
00628 %    o property: the property.
00629 %
00630 */
00631 WandExport char *MagickGetImageProperty(MagickWand *wand,const char *property)
00632 {
00633   const char
00634     *value;
00635 
00636   assert(wand != (MagickWand *) NULL);
00637   assert(wand->signature == WandSignature);
00638   if (wand->debug != MagickFalse)
00639     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00640   if (wand->images == (Image *) NULL)
00641     {
00642       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00643         "ContainsNoImages","`%s'",wand->name);
00644       return((char *) NULL);
00645     }
00646   value=GetImageProperty(wand->images,property);
00647   if (value == (const char *) NULL)
00648     return((char *) NULL);
00649   return(ConstantString(value));
00650 }
00651 
00652 /*
00653 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00654 %                                                                             %
00655 %                                                                             %
00656 %                                                                             %
00657 %   M a g i c k G e t I m a g e P r o p e r t i e s                           %
00658 %                                                                             %
00659 %                                                                             %
00660 %                                                                             %
00661 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00662 %
00663 %  MagickGetImageProperties() returns all the property names that match the
00664 %  specified pattern associated with a wand.  Use MagickGetImageProperty() to
00665 %  return the value of a particular property.  Use MagickRelinquishMemory() to
00666 %  free the value when you are finished with it.
00667 %
00668 %  The format of the MagickGetImageProperties method is:
00669 %
00670 %      char *MagickGetImageProperties(MagickWand *wand,
00671 %        const char *pattern,unsigned long *number_properties)
00672 %
00673 %  A description of each parameter follows:
00674 %
00675 %    o wand: the magick wand.
00676 %
00677 %    o pattern: Specifies a pointer to a text string containing a pattern.
00678 %
00679 %    o number_properties: the number properties associated with this wand.
00680 %
00681 */
00682 WandExport char **MagickGetImageProperties(MagickWand *wand,
00683   const char *pattern,unsigned long *number_properties)
00684 {
00685   char
00686     **properties;
00687 
00688   const char
00689     *property;
00690 
00691   register long
00692     i;
00693 
00694   size_t
00695     length;
00696 
00697   assert(wand != (MagickWand *) NULL);
00698   assert(wand->signature == WandSignature);
00699   if (wand->debug != MagickFalse)
00700     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00701   if (wand->images == (Image *) NULL)
00702     {
00703       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00704         "ContainsNoImages","`%s'",wand->name);
00705       return((char **) NULL);
00706     }
00707   (void) GetImageProperty(wand->images,"exif:*");
00708   length=1024;
00709   properties=(char **) AcquireQuantumMemory(length,sizeof(*properties));
00710   if (properties == (char **) NULL)
00711     return((char **) NULL);
00712   ResetImagePropertyIterator(wand->images);
00713   property=GetNextImageProperty(wand->images);
00714   for (i=0; property != (const char *) NULL; )
00715   {
00716     if ((*property != '[') &&
00717         (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
00718       {
00719         if ((i+1) >= (long) length)
00720           {
00721             length<<=1;
00722             properties=(char **) ResizeQuantumMemory(properties,length,
00723               sizeof(*properties));
00724             if (properties == (char **) NULL)
00725               {
00726                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00727                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00728                   wand->name);
00729                 return((char **) NULL);
00730               }
00731           }
00732         properties[i]=ConstantString(property);
00733         i++;
00734       }
00735     property=GetNextImageProperty(wand->images);
00736   }
00737   properties[i]=(char *) NULL;
00738   *number_properties=(unsigned long) i;
00739   return(properties);
00740 }
00741 
00742 /*
00743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00744 %                                                                             %
00745 %                                                                             %
00746 %                                                                             %
00747 %   M a g i c k G e t I n t e r l a c e S c h e m e                           %
00748 %                                                                             %
00749 %                                                                             %
00750 %                                                                             %
00751 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00752 %
00753 %  MagickGetInterlaceScheme() gets the wand interlace scheme.
00754 %
00755 %  The format of the MagickGetInterlaceScheme method is:
00756 %
00757 %      InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
00758 %
00759 %  A description of each parameter follows:
00760 %
00761 %    o wand: the magick wand.
00762 %
00763 */
00764 WandExport InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
00765 {
00766   assert(wand != (MagickWand *) NULL);
00767   assert(wand->signature == WandSignature);
00768   if (wand->debug != MagickFalse)
00769     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00770   return(wand->image_info->interlace);
00771 }
00772 
00773 /*
00774 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00775 %                                                                             %
00776 %                                                                             %
00777 %                                                                             %
00778 %   M a g i c k G e t I n t e r p o l a t e M e t h o d                       %
00779 %                                                                             %
00780 %                                                                             %
00781 %                                                                             %
00782 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00783 %
00784 %  MagickGetInterpolateMethod() gets the wand compression.
00785 %
00786 %  The format of the MagickGetInterpolateMethod method is:
00787 %
00788 %      InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
00789 %
00790 %  A description of each parameter follows:
00791 %
00792 %    o wand: the magick wand.
00793 %
00794 */
00795 WandExport InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
00796 {
00797   const char
00798     *option;
00799 
00800   InterpolatePixelMethod
00801     method;
00802 
00803   assert(wand != (MagickWand *) NULL);
00804   assert(wand->signature == WandSignature);
00805   if (wand->debug != MagickFalse)
00806     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00807   option=GetImageOption(wand->image_info,"interpolate");
00808   if (option == (const char *) NULL)
00809     return(UndefinedInterpolatePixel);
00810   method=(InterpolatePixelMethod) ParseMagickOption(MagickInterpolateOptions,
00811     MagickFalse,option);
00812   return(method);
00813 }
00814 
00815 /*
00816 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00817 %                                                                             %
00818 %                                                                             %
00819 %                                                                             %
00820 %   M a g i c k G e t O p t i o n                                             %
00821 %                                                                             %
00822 %                                                                             %
00823 %                                                                             %
00824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00825 %
00826 %  MagickGetOption() returns a value associated with a wand and the specified
00827 %  key.  Use MagickRelinquishMemory() to free the value when you are finished
00828 %  with it.
00829 %
00830 %  The format of the MagickGetOption method is:
00831 %
00832 %      char *MagickGetOption(MagickWand *wand,const char *key)
00833 %
00834 %  A description of each parameter follows:
00835 %
00836 %    o wand: the magick wand.
00837 %
00838 %    o key: the key.
00839 %
00840 */
00841 WandExport char *MagickGetOption(MagickWand *wand,const char *key)
00842 {
00843   const char
00844     *option;
00845 
00846   assert(wand != (MagickWand *) NULL);
00847   assert(wand->signature == WandSignature);
00848   if (wand->debug != MagickFalse)
00849     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00850   option=GetImageOption(wand->image_info,key);
00851   return(ConstantString(option));
00852 }
00853 
00854 /*
00855 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00856 %                                                                             %
00857 %                                                                             %
00858 %                                                                             %
00859 %   M a g i c k G e t O p t i o n                                             %
00860 %                                                                             %
00861 %                                                                             %
00862 %                                                                             %
00863 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00864 %
00865 %  MagickGetOptions() returns all the option names that match the specified
00866 %  pattern associated with a wand.  Use MagickGetOption() to return the value
00867 %  of a particular option.  Use MagickRelinquishMemory() to free the value
00868 %  when you are finished with it.
00869 %
00870 %  The format of the MagickGetOptions method is:
00871 %
00872 %      char *MagickGetOptions(MagickWand *wand,unsigned long *number_options)
00873 %
00874 %  A description of each parameter follows:
00875 %
00876 %    o wand: the magick wand.
00877 %
00878 %    o pattern: Specifies a pointer to a text string containing a pattern.
00879 %
00880 %    o number_options: the number options associated with this wand.
00881 %
00882 */
00883 WandExport char **MagickGetOptions(MagickWand *wand,const char *pattern,
00884   unsigned long *number_options)
00885 {
00886   char
00887     **options;
00888 
00889   const char
00890     *option;
00891 
00892   register long
00893     i;
00894 
00895   size_t
00896     length;
00897 
00898   assert(wand != (MagickWand *) NULL);
00899   assert(wand->signature == WandSignature);
00900   if (wand->debug != MagickFalse)
00901     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00902   if (wand->images == (Image *) NULL)
00903     {
00904       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00905         "ContainsNoImages","`%s'",wand->name);
00906       return((char **) NULL);
00907     }
00908   length=1024;
00909   options=(char **) AcquireQuantumMemory(length,sizeof(*options));
00910   if (options == (char **) NULL)
00911     return((char **) NULL);
00912   ResetImageOptionIterator(wand->image_info);
00913   option=GetNextImageOption(wand->image_info);
00914   for (i=0; option != (const char *) NULL; )
00915   {
00916     if ((*option != '[') &&
00917         (GlobExpression(option,pattern,MagickFalse) != MagickFalse))
00918       {
00919         if ((i+1) >= (long) length)
00920           {
00921             length<<=1;
00922             options=(char **) ResizeQuantumMemory(options,length,
00923               sizeof(*options));
00924             if (options == (char **) NULL)
00925               {
00926                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00927                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00928                   wand->name);
00929                 return((char **) NULL);
00930               }
00931           }
00932         options[i]=ConstantString(option);
00933         i++;
00934       }
00935     option=GetNextImageOption(wand->image_info);
00936   }
00937   options[i]=(char *) NULL;
00938   *number_options=(unsigned long) i;
00939   return(options);
00940 }
00941 
00942 /*
00943 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00944 %                                                                             %
00945 %                                                                             %
00946 %                                                                             %
00947 %   M a g i c k G e t O r i e n t a t i o n                                   %
00948 %                                                                             %
00949 %                                                                             %
00950 %                                                                             %
00951 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00952 %
00953 %  MagickGetOrientation() gets the wand orientation type.
00954 %
00955 %  The format of the MagickGetOrientation method is:
00956 %
00957 %      OrientationType MagickGetOrientation(MagickWand *wand)
00958 %
00959 %  A description of each parameter follows:
00960 %
00961 %    o wand: the magick wand.
00962 %
00963 */
00964 WandExport OrientationType MagickGetOrientation(MagickWand *wand)
00965 {
00966   assert(wand != (MagickWand *) NULL);
00967   assert(wand->signature == WandSignature);
00968   if (wand->debug != MagickFalse)
00969     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00970   return(wand->image_info->orientation);
00971 }
00972 
00973 /*
00974 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00975 %                                                                             %
00976 %                                                                             %
00977 %                                                                             %
00978 %   M a g i c k G e t P a c k a g e N a m e                                   %
00979 %                                                                             %
00980 %                                                                             %
00981 %                                                                             %
00982 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00983 %
00984 %  MagickGetPackageName() returns the ImageMagick package name as a string
00985 %  constant.
00986 %
00987 %  The format of the MagickGetPackageName method is:
00988 %
00989 %      const char *MagickGetPackageName(void)
00990 %
00991 %
00992 */
00993 WandExport const char *MagickGetPackageName(void)
00994 {
00995   return(GetMagickPackageName());
00996 }
00997 
00998 /*
00999 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01000 %                                                                             %
01001 %                                                                             %
01002 %                                                                             %
01003 %   M a g i c k G e t P a g e                                                 %
01004 %                                                                             %
01005 %                                                                             %
01006 %                                                                             %
01007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01008 %
01009 %  MagickGetPage() returns the page geometry associated with the magick wand.
01010 %
01011 %  The format of the MagickGetPage method is:
01012 %
01013 %      MagickBooleanType MagickGetPage(const MagickWand *wand,
01014 %        unsigned long *width,unsigned long *height,long *x,long *y)
01015 %
01016 %  A description of each parameter follows:
01017 %
01018 %    o wand: the magick wand.
01019 %
01020 %    o width: the page width.
01021 %
01022 %    o height: page height.
01023 %
01024 %    o x: the page x-offset.
01025 %
01026 %    o y: the page y-offset.
01027 %
01028 */
01029 WandExport MagickBooleanType MagickGetPage(const MagickWand *wand,
01030   unsigned long *width,unsigned long *height,long *x,long *y)
01031 {
01032   RectangleInfo
01033     geometry;
01034 
01035   assert(wand != (const MagickWand *) NULL);
01036   assert(wand->signature == WandSignature);
01037   if (wand->debug != MagickFalse)
01038     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01039   (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
01040   (void) ParseAbsoluteGeometry(wand->image_info->page,&geometry);
01041   *width=geometry.width;
01042   *height=geometry.height;
01043   *x=geometry.x;
01044   *y=geometry.y;
01045   return(MagickTrue);
01046 }
01047 
01048 /*
01049 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01050 %                                                                             %
01051 %                                                                             %
01052 %                                                                             %
01053 %   M a g i c k G e t P o i n t s i z e                                       %
01054 %                                                                             %
01055 %                                                                             %
01056 %                                                                             %
01057 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01058 %
01059 %  MagickGetPointsize() returns the font pointsize associated with the
01060 %  MagickWand.
01061 %
01062 %  The format of the MagickGetPointsize method is:
01063 %
01064 %      double MagickGetPointsize(MagickWand *wand)
01065 %
01066 %  A description of each parameter follows:
01067 %
01068 %    o wand: the magick wand.
01069 %
01070 */
01071 WandExport double MagickGetPointsize(MagickWand *wand)
01072 {
01073   assert(wand != (MagickWand *) NULL);
01074   assert(wand->signature == WandSignature);
01075   if (wand->debug != MagickFalse)
01076     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01077   return(wand->image_info->pointsize);
01078 }
01079 
01080 /*
01081 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01082 %                                                                             %
01083 %                                                                             %
01084 %                                                                             %
01085 %   M a g i c k G e t Q u a n t u m D e p t h                                 %
01086 %                                                                             %
01087 %                                                                             %
01088 %                                                                             %
01089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01090 %
01091 %  MagickGetQuantumDepth() returns the ImageMagick quantum depth as a string
01092 %  constant.
01093 %
01094 %  The format of the MagickGetQuantumDepth method is:
01095 %
01096 %      const char *MagickGetQuantumDepth(unsigned long *depth)
01097 %
01098 %  A description of each parameter follows:
01099 %
01100 %    o depth: the quantum depth is returned as a number.
01101 %
01102 */
01103 WandExport const char *MagickGetQuantumDepth(unsigned long *depth)
01104 {
01105   return(GetMagickQuantumDepth(depth));
01106 }
01107 
01108 /*
01109 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01110 %                                                                             %
01111 %                                                                             %
01112 %                                                                             %
01113 %   M a g i c k G e t Q u a n t u m R a n g e                                 %
01114 %                                                                             %
01115 %                                                                             %
01116 %                                                                             %
01117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01118 %
01119 %  MagickGetQuantumRange() returns the ImageMagick quantum range as a string
01120 %  constant.
01121 %
01122 %  The format of the MagickGetQuantumRange method is:
01123 %
01124 %      const char *MagickGetQuantumRange(unsigned long *range)
01125 %
01126 %  A description of each parameter follows:
01127 %
01128 %    o range: the quantum range is returned as a number.
01129 %
01130 */
01131 WandExport const char *MagickGetQuantumRange(unsigned long *range)
01132 {
01133   return(GetMagickQuantumRange(range));
01134 }
01135 
01136 /*
01137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01138 %                                                                             %
01139 %                                                                             %
01140 %                                                                             %
01141 %   M a g i c k G e t R e l e a s e D a t e                                   %
01142 %                                                                             %
01143 %                                                                             %
01144 %                                                                             %
01145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01146 %
01147 %  MagickGetReleaseDate() returns the ImageMagick release date as a string
01148 %  constant.
01149 %
01150 %  The format of the MagickGetReleaseDate method is:
01151 %
01152 %      const char *MagickGetReleaseDate(void)
01153 %
01154 */
01155 WandExport const char *MagickGetReleaseDate(void)
01156 {
01157   return(GetMagickReleaseDate());
01158 }
01159 
01160 /*
01161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01162 %                                                                             %
01163 %                                                                             %
01164 %                                                                             %
01165 %   M a g i c k G e t R e s o u r c e                                         %
01166 %                                                                             %
01167 %                                                                             %