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-2010 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 #include "magick/string-private.h"
00054 
00055 /*
00056   Define declarations.
00057 */
00058 #define ThrowWandException(severity,tag,context) \
00059 { \
00060   (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
00061     tag,"`%s'",context); \
00062   return(MagickFalse); \
00063 }
00064 
00065 /*
00066 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00067 %                                                                             %
00068 %                                                                             %
00069 %                                                                             %
00070 %   M a g i c k D e l e t e I m a g e A r t i f a c t                         %
00071 %                                                                             %
00072 %                                                                             %
00073 %                                                                             %
00074 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00075 %
00076 %  MagickDeleteImageArtifact() deletes a wand artifact.
00077 %
00078 %  The format of the MagickDeleteImageArtifact method is:
00079 %
00080 %      MagickBooleanType MagickDeleteImageArtifact(MagickWand *wand,
00081 %        const char *artifact)
00082 %
00083 %  A description of each parameter follows:
00084 %
00085 %    o image: the image.
00086 %
00087 %    o artifact: the image artifact.
00088 %
00089 */
00090 WandExport MagickBooleanType MagickDeleteImageArtifact(MagickWand *wand,
00091   const char *artifact)
00092 {
00093   assert(wand != (MagickWand *) NULL);
00094   assert(wand->signature == WandSignature);
00095   if (wand->debug != MagickFalse)
00096     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00097   if (wand->images == (Image *) NULL)
00098     {
00099       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00100         "ContainsNoImages","`%s'",wand->name);
00101       return(MagickFalse);
00102     }
00103   return(DeleteImageArtifact(wand->images,artifact));
00104 }
00105 
00106 /*
00107 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00108 %                                                                             %
00109 %                                                                             %
00110 %                                                                             %
00111 %   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                         %
00112 %                                                                             %
00113 %                                                                             %
00114 %                                                                             %
00115 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00116 %
00117 %  MagickDeleteImageProperty() deletes a wand property.
00118 %
00119 %  The format of the MagickDeleteImageProperty method is:
00120 %
00121 %      MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
00122 %        const char *property)
00123 %
00124 %  A description of each parameter follows:
00125 %
00126 %    o image: the image.
00127 %
00128 %    o property: the image property.
00129 %
00130 */
00131 WandExport MagickBooleanType MagickDeleteImageProperty(MagickWand *wand,
00132   const char *property)
00133 {
00134   assert(wand != (MagickWand *) NULL);
00135   assert(wand->signature == WandSignature);
00136   if (wand->debug != MagickFalse)
00137     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00138   if (wand->images == (Image *) NULL)
00139     {
00140       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00141         "ContainsNoImages","`%s'",wand->name);
00142       return(MagickFalse);
00143     }
00144   return(DeleteImageProperty(wand->images,property));
00145 }
00146 
00147 /*
00148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00149 %                                                                             %
00150 %                                                                             %
00151 %                                                                             %
00152 %   M a g i c k D e l e t e O p t i o n                                       %
00153 %                                                                             %
00154 %                                                                             %
00155 %                                                                             %
00156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00157 %
00158 %  MagickDeleteOption() deletes a wand option.
00159 %
00160 %  The format of the MagickDeleteOption method is:
00161 %
00162 %      MagickBooleanType MagickDeleteOption(MagickWand *wand,
00163 %        const char *option)
00164 %
00165 %  A description of each parameter follows:
00166 %
00167 %    o image: the image.
00168 %
00169 %    o option: the image option.
00170 %
00171 */
00172 WandExport MagickBooleanType MagickDeleteOption(MagickWand *wand,
00173   const char *option)
00174 {
00175   assert(wand != (MagickWand *) NULL);
00176   assert(wand->signature == WandSignature);
00177   if (wand->debug != MagickFalse)
00178     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00179   return(DeleteImageOption(wand->image_info,option));
00180 }
00181 
00182 /*
00183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00184 %                                                                             %
00185 %                                                                             %
00186 %                                                                             %
00187 %   M a g i c k G e t A n t i a l i a s                                       %
00188 %                                                                             %
00189 %                                                                             %
00190 %                                                                             %
00191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00192 %
00193 %  MagickGetAntialias() returns the antialias property associated with the
00194 %  wand.
00195 %
00196 %  The format of the MagickGetAntialias method is:
00197 %
00198 %      MagickBooleanType MagickGetAntialias(const MagickWand *wand)
00199 %
00200 %  A description of each parameter follows:
00201 %
00202 %    o wand: the magick wand.
00203 %
00204 */
00205 WandExport MagickBooleanType MagickGetAntialias(const MagickWand *wand)
00206 {
00207   assert(wand != (const MagickWand *) NULL);
00208   assert(wand->signature == WandSignature);
00209   if (wand->debug != MagickFalse)
00210     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00211   return(wand->image_info->antialias);
00212 }
00213 
00214 /*
00215 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00216 %                                                                             %
00217 %                                                                             %
00218 %                                                                             %
00219 %   M a g i c k G e t B a c k g r o u n d C o l o r                           %
00220 %                                                                             %
00221 %                                                                             %
00222 %                                                                             %
00223 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00224 %
00225 %  MagickGetBackgroundColor() returns the wand background color.
00226 %
00227 %  The format of the MagickGetBackgroundColor method is:
00228 %
00229 %      PixelWand *MagickGetBackgroundColor(MagickWand *wand)
00230 %
00231 %  A description of each parameter follows:
00232 %
00233 %    o wand: the magick wand.
00234 %
00235 */
00236 WandExport PixelWand *MagickGetBackgroundColor(MagickWand *wand)
00237 {
00238   PixelWand
00239     *background_color;
00240 
00241   assert(wand != (MagickWand *) NULL);
00242   assert(wand->signature == WandSignature);
00243   if (wand->debug != MagickFalse)
00244     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00245   background_color=NewPixelWand();
00246   PixelSetQuantumColor(background_color,&wand->image_info->background_color);
00247   return(background_color);
00248 }
00249 
00250 /*
00251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00252 %                                                                             %
00253 %                                                                             %
00254 %                                                                             %
00255 %   M a g i c k G e t C o l o r s p a c e                                     %
00256 %                                                                             %
00257 %                                                                             %
00258 %                                                                             %
00259 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00260 %
00261 %  MagickGetColorspace() gets the wand colorspace type.
00262 %
00263 %  The format of the MagickGetColorspace method is:
00264 %
00265 %      ColorspaceType MagickGetColorspace(MagickWand *wand)
00266 %
00267 %  A description of each parameter follows:
00268 %
00269 %    o wand: the magick wand.
00270 %
00271 */
00272 WandExport ColorspaceType MagickGetColorspace(MagickWand *wand)
00273 {
00274   assert(wand != (MagickWand *) NULL);
00275   assert(wand->signature == WandSignature);
00276   if (wand->debug != MagickFalse)
00277     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00278   return(wand->image_info->colorspace);
00279 }
00280 
00281 /*
00282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00283 %                                                                             %
00284 %                                                                             %
00285 %                                                                             %
00286 %   M a g i c k G e t C o m p r e s s i o n                                   %
00287 %                                                                             %
00288 %                                                                             %
00289 %                                                                             %
00290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00291 %
00292 %  MagickGetCompression() gets the wand compression type.
00293 %
00294 %  The format of the MagickGetCompression method is:
00295 %
00296 %      CompressionType MagickGetCompression(MagickWand *wand)
00297 %
00298 %  A description of each parameter follows:
00299 %
00300 %    o wand: the magick wand.
00301 %
00302 */
00303 WandExport CompressionType MagickGetCompression(MagickWand *wand)
00304 {
00305   assert(wand != (MagickWand *) NULL);
00306   assert(wand->signature == WandSignature);
00307   if (wand->debug != MagickFalse)
00308     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00309   return(wand->image_info->compression);
00310 }
00311 
00312 /*
00313 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00314 %                                                                             %
00315 %                                                                             %
00316 %                                                                             %
00317 %   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                     %
00318 %                                                                             %
00319 %                                                                             %
00320 %                                                                             %
00321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00322 %
00323 %  MagickGetCompressionQuality() gets the wand compression quality.
00324 %
00325 %  The format of the MagickGetCompressionQuality method is:
00326 %
00327 %      unsigned long MagickGetCompressionQuality(MagickWand *wand)
00328 %
00329 %  A description of each parameter follows:
00330 %
00331 %    o wand: the magick wand.
00332 %
00333 */
00334 WandExport unsigned long MagickGetCompressionQuality(MagickWand *wand)
00335 {
00336   assert(wand != (MagickWand *) NULL);
00337   assert(wand->signature == WandSignature);
00338   if (wand->debug != MagickFalse)
00339     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00340   return(wand->image_info->quality);
00341 }
00342 
00343 /*
00344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00345 %                                                                             %
00346 %                                                                             %
00347 %                                                                             %
00348 %   M a g i c k G e t C o p y r i g h t                                       %
00349 %                                                                             %
00350 %                                                                             %
00351 %                                                                             %
00352 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00353 %
00354 %  MagickGetCopyright() returns the ImageMagick API copyright as a string
00355 %  constant.
00356 %
00357 %  The format of the MagickGetCopyright method is:
00358 %
00359 %      const char *MagickGetCopyright(void)
00360 %
00361 */
00362 WandExport const char *MagickGetCopyright(void)
00363 {
00364   return(GetMagickCopyright());
00365 }
00366 
00367 /*
00368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00369 %                                                                             %
00370 %                                                                             %
00371 %                                                                             %
00372 %   M a g i c k G e t F i l e n a m e                                         %
00373 %                                                                             %
00374 %                                                                             %
00375 %                                                                             %
00376 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00377 %
00378 %  MagickGetFilename() returns the filename associated with an image sequence.
00379 %
00380 %  The format of the MagickGetFilename method is:
00381 %
00382 %      const char *MagickGetFilename(const MagickWand *wand)
00383 %
00384 %  A description of each parameter follows:
00385 %
00386 %    o wand: the magick wand.
00387 %
00388 */
00389 WandExport char *MagickGetFilename(const MagickWand *wand)
00390 {
00391   assert(wand != (const MagickWand *) NULL);
00392   assert(wand->signature == WandSignature);
00393   if (wand->debug != MagickFalse)
00394     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00395   return(AcquireString(wand->image_info->filename));
00396 }
00397 
00398 /*
00399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00400 %                                                                             %
00401 %                                                                             %
00402 %                                                                             %
00403 %   M a g i c k G e t F o n t                                                 %
00404 %                                                                             %
00405 %                                                                             %
00406 %                                                                             %
00407 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00408 %
00409 %  MagickGetFont() returns the font associated with the MagickWand.
00410 %
00411 %  The format of the MagickGetFont method is:
00412 %
00413 %      char *MagickGetFont(MagickWand *wand)
00414 %
00415 %  A description of each parameter follows:
00416 %
00417 %    o wand: the magick wand.
00418 %
00419 */
00420 WandExport char *MagickGetFont(MagickWand *wand)
00421 {
00422   assert(wand != (MagickWand *) NULL);
00423   assert(wand->signature == WandSignature);
00424   if (wand->debug != MagickFalse)
00425     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00426   if (wand->image_info->font == (char *) NULL)
00427     return((char *) NULL);
00428   return(AcquireString(wand->image_info->font));
00429 }
00430 
00431 /*
00432 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00433 %                                                                             %
00434 %                                                                             %
00435 %                                                                             %
00436 %   M a g i c k G e t F o r m a t                                             %
00437 %                                                                             %
00438 %                                                                             %
00439 %                                                                             %
00440 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00441 %
00442 %  MagickGetFormat() returns the format of the magick wand.
00443 %
00444 %  The format of the MagickGetFormat method is:
00445 %
00446 %      const char MagickGetFormat(MagickWand *wand)
00447 %
00448 %  A description of each parameter follows:
00449 %
00450 %    o wand: the magick wand.
00451 %
00452 */
00453 WandExport char *MagickGetFormat(MagickWand *wand)
00454 {
00455   assert(wand != (MagickWand *) NULL);
00456   assert(wand->signature == WandSignature);
00457   if (wand->debug != MagickFalse)
00458     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00459   return(AcquireString(wand->image_info->magick));
00460 }
00461 
00462 /*
00463 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00464 %                                                                             %
00465 %                                                                             %
00466 %                                                                             %
00467 %   M a g i c k G e t G r a v i t y                                           %
00468 %                                                                             %
00469 %                                                                             %
00470 %                                                                             %
00471 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00472 %
00473 %  MagickGetGravity() gets the wand gravity.
00474 %
00475 %  The format of the MagickGetGravity method is:
00476 %
00477 %      GravityType MagickGetGravity(MagickWand *wand)
00478 %
00479 %  A description of each parameter follows:
00480 %
00481 %    o wand: the magick wand.
00482 %
00483 */
00484 WandExport GravityType MagickGetGravity(MagickWand *wand)
00485 {
00486   const char
00487     *option;
00488 
00489   GravityType
00490     type;
00491 
00492   assert(wand != (MagickWand *) NULL);
00493   assert(wand->signature == WandSignature);
00494   if (wand->debug != MagickFalse)
00495     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00496   option=GetImageOption(wand->image_info,"gravity");
00497   if (option == (const char *) NULL)
00498     return(UndefinedGravity);
00499   type=(GravityType) ParseMagickOption(MagickGravityOptions,MagickFalse,option);
00500   return(type);
00501 }
00502 
00503 /*
00504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00505 %                                                                             %
00506 %                                                                             %
00507 %                                                                             %
00508 %   M a g i c k G e t H o m e U R L                                           %
00509 %                                                                             %
00510 %                                                                             %
00511 %                                                                             %
00512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00513 %
00514 %  MagickGetHomeURL() returns the ImageMagick home URL.
00515 %
00516 %  The format of the MagickGetHomeURL method is:
00517 %
00518 %      char *MagickGetHomeURL(void)
00519 %
00520 */
00521 WandExport char *MagickGetHomeURL(void)
00522 {
00523   return(GetMagickHomeURL());
00524 }
00525 
00526 /*
00527 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00528 %                                                                             %
00529 %                                                                             %
00530 %                                                                             %
00531 %   M a g i c k G e t I m a g e A r t i f a c t                               %
00532 %                                                                             %
00533 %                                                                             %
00534 %                                                                             %
00535 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00536 %
00537 %  MagickGetImageArtifact() returns a value associated with the specified
00538 %  artifact.  Use MagickRelinquishMemory() to free the value when you are
00539 %  finished with it.
00540 %
00541 %  The format of the MagickGetImageArtifact method is:
00542 %
00543 %      char *MagickGetImageArtifact(MagickWand *wand,const char *artifact)
00544 %
00545 %  A description of each parameter follows:
00546 %
00547 %    o wand: the magick wand.
00548 %
00549 %    o artifact: the artifact.
00550 %
00551 */
00552 WandExport char *MagickGetImageArtifact(MagickWand *wand,const char *artifact)
00553 {
00554   const char
00555     *value;
00556 
00557   assert(wand != (MagickWand *) NULL);
00558   assert(wand->signature == WandSignature);
00559   if (wand->debug != MagickFalse)
00560     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00561   if (wand->images == (Image *) NULL)
00562     {
00563       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00564         "ContainsNoImages","`%s'",wand->name);
00565       return((char *) NULL);
00566     }
00567   value=GetImageArtifact(wand->images,artifact);
00568   if (value == (const char *) NULL)
00569     return((char *) NULL);
00570   return(ConstantString(value));
00571 }
00572 
00573 /*
00574 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00575 %                                                                             %
00576 %                                                                             %
00577 %                                                                             %
00578 %   M a g i c k G e t I m a g e P r o p e r t i e s                           %
00579 %                                                                             %
00580 %                                                                             %
00581 %                                                                             %
00582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00583 %
00584 %  MagickGetImageArtifacts() returns all the artifact names that match the
00585 %  specified pattern associated with a wand.  Use MagickGetImageProperty() to
00586 %  return the value of a particular artifact.  Use MagickRelinquishMemory() to
00587 %  free the value when you are finished with it.
00588 %
00589 %  The format of the MagickGetImageArtifacts method is:
00590 %
00591 %      char *MagickGetImageArtifacts(MagickWand *wand,
00592 %        const char *pattern,unsigned long *number_artifacts)
00593 %
00594 %  A description of each parameter follows:
00595 %
00596 %    o wand: the magick wand.
00597 %
00598 %    o pattern: Specifies a pointer to a text string containing a pattern.
00599 %
00600 %    o number_artifacts: the number artifacts associated with this wand.
00601 %
00602 */
00603 WandExport char **MagickGetImageArtifacts(MagickWand *wand,
00604   const char *pattern,unsigned long *number_artifacts)
00605 {
00606   char
00607     **artifacts;
00608 
00609   const char
00610     *artifact;
00611 
00612   register long
00613     i;
00614 
00615   size_t
00616     length;
00617 
00618   assert(wand != (MagickWand *) NULL);
00619   assert(wand->signature == WandSignature);
00620   if (wand->debug != MagickFalse)
00621     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00622   if (wand->images == (Image *) NULL)
00623     {
00624       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00625         "ContainsNoImages","`%s'",wand->name);
00626       return((char **) NULL);
00627     }
00628   (void) GetImageProperty(wand->images,"exif:*");
00629   length=1024;
00630   artifacts=(char **) AcquireQuantumMemory(length,sizeof(*artifacts));
00631   if (artifacts == (char **) NULL)
00632     return((char **) NULL);
00633   ResetImagePropertyIterator(wand->images);
00634   artifact=GetNextImageProperty(wand->images);
00635   for (i=0; artifact != (const char *) NULL; )
00636   {
00637     if ((*artifact != '[') &&
00638         (GlobExpression(artifact,pattern,MagickFalse) != MagickFalse))
00639       {
00640         if ((i+1) >= (long) length)
00641           {
00642             length<<=1;
00643             artifacts=(char **) ResizeQuantumMemory(artifacts,length,
00644               sizeof(*artifacts));
00645             if (artifacts == (char **) NULL)
00646               {
00647                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00648                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00649                   wand->name);
00650                 return((char **) NULL);
00651               }
00652           }
00653         artifacts[i]=ConstantString(artifact);
00654         i++;
00655       }
00656     artifact=GetNextImageProperty(wand->images);
00657   }
00658   artifacts[i]=(char *) NULL;
00659   *number_artifacts=(unsigned long) i;
00660   return(artifacts);
00661 }
00662 
00663 /*
00664 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00665 %                                                                             %
00666 %                                                                             %
00667 %                                                                             %
00668 %   M a g i c k G e t I m a g e P r o f i l e                                 %
00669 %                                                                             %
00670 %                                                                             %
00671 %                                                                             %
00672 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00673 %
00674 %  MagickGetImageProfile() returns the named image profile.
00675 %
00676 %  The format of the MagickGetImageProfile method is:
00677 %
00678 %      unsigned char *MagickGetImageProfile(MagickWand *wand,const char *name,
00679 %        size_t *length)
00680 %
00681 %  A description of each parameter follows:
00682 %
00683 %    o wand: the magick wand.
00684 %
00685 %    o name: Name of profile to return: ICC, IPTC, or generic profile.
00686 %
00687 %    o length: the length of the profile.
00688 %
00689 */
00690 WandExport unsigned char *MagickGetImageProfile(MagickWand *wand,
00691   const char *name,size_t *length)
00692 {
00693   const StringInfo
00694     *profile;
00695 
00696   unsigned char
00697     *datum;
00698 
00699   assert(wand != (MagickWand *) NULL);
00700   assert(wand->signature == WandSignature);
00701   if (wand->debug != MagickFalse)
00702     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00703   if (wand->images == (Image *) NULL)
00704     {
00705       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00706         "ContainsNoImages","`%s'",wand->name);
00707       return((unsigned char *) NULL);
00708     }
00709   *length=0;
00710   if (wand->images->profiles == (SplayTreeInfo *) NULL)
00711     return((unsigned char *) NULL);
00712   profile=GetImageProfile(wand->images,name);
00713   if (profile == (StringInfo *) NULL)
00714     return((unsigned char *) NULL);
00715   datum=(unsigned char *) AcquireQuantumMemory(GetStringInfoLength(profile),
00716     sizeof(*datum));
00717   if (datum == (unsigned char *) NULL)
00718     return((unsigned char *) NULL);
00719   (void) CopyMagickMemory(datum,GetStringInfoDatum(profile),
00720     GetStringInfoLength(profile));
00721   *length=(unsigned long) GetStringInfoLength(profile);
00722   return(datum);
00723 }
00724 
00725 /*
00726 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00727 %                                                                             %
00728 %                                                                             %
00729 %                                                                             %
00730 %   M a g i c k G e t I m a g e P r o f i l e s                               %
00731 %                                                                             %
00732 %                                                                             %
00733 %                                                                             %
00734 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00735 %
00736 %  MagickGetImageProfiles() returns all the profile names that match the
00737 %  specified pattern associated with a wand.  Use MagickGetImageProfile() to
00738 %  return the value of a particular property.  Use MagickRelinquishMemory() to
00739 %  free the value when you are finished with it.
00740 %
00741 %  The format of the MagickGetImageProfiles method is:
00742 %
00743 %      char *MagickGetImageProfiles(MagickWand *wand,
00744 %        unsigned long *number_profiles)
00745 %
00746 %  A description of each parameter follows:
00747 %
00748 %    o wand: the magick wand.
00749 %
00750 %    o pattern: Specifies a pointer to a text string containing a pattern.
00751 %
00752 %    o number_profiles: the number profiles associated with this wand.
00753 %
00754 */
00755 WandExport char **MagickGetImageProfiles(MagickWand *wand,const char *pattern,
00756   unsigned long *number_profiles)
00757 {
00758   char
00759     **profiles;
00760 
00761   const char
00762     *property;
00763 
00764   register long
00765     i;
00766 
00767   size_t
00768     length;
00769 
00770   assert(wand != (MagickWand *) NULL);
00771   assert(wand->signature == WandSignature);
00772   if (wand->debug != MagickFalse)
00773     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00774   if (wand->images == (Image *) NULL)
00775     {
00776       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00777         "ContainsNoImages","`%s'",wand->name);
00778       return((char **) NULL);
00779     }
00780   (void) GetImageProfile(wand->images,"exif:*");
00781   length=1024;
00782   profiles=(char **) AcquireQuantumMemory(length,sizeof(*profiles));
00783   if (profiles == (char **) NULL)
00784     return((char **) NULL);
00785   ResetImageProfileIterator(wand->images);
00786   property=GetNextImageProfile(wand->images);
00787   for (i=0; property != (const char *) NULL; )
00788   {
00789     if ((*property != '[') &&
00790         (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
00791       {
00792         if ((i+1) >= (long) length)
00793           {
00794             length<<=1;
00795             profiles=(char **) ResizeQuantumMemory(profiles,length,
00796               sizeof(*profiles));
00797             if (profiles == (char **) NULL)
00798               {
00799                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00800                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00801                   wand->name);
00802                 return((char **) NULL);
00803               }
00804           }
00805         profiles[i]=ConstantString(property);
00806         i++;
00807       }
00808     property=GetNextImageProfile(wand->images);
00809   }
00810   profiles[i]=(char *) NULL;
00811   *number_profiles=(unsigned long) i;
00812   return(profiles);
00813 }
00814 
00815 /*
00816 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00817 %                                                                             %
00818 %                                                                             %
00819 %                                                                             %
00820 %   M a g i c k G e t I m a g e P r o p e r t y                               %
00821 %                                                                             %
00822 %                                                                             %
00823 %                                                                             %
00824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00825 %
00826 %  MagickGetImageProperty() returns a value associated with the specified
00827 %  property.  Use MagickRelinquishMemory() to free the value when you are
00828 %  finished with it.
00829 %
00830 %  The format of the MagickGetImageProperty method is:
00831 %
00832 %      char *MagickGetImageProperty(MagickWand *wand,const char *property)
00833 %
00834 %  A description of each parameter follows:
00835 %
00836 %    o wand: the magick wand.
00837 %
00838 %    o property: the property.
00839 %
00840 */
00841 WandExport char *MagickGetImageProperty(MagickWand *wand,const char *property)
00842 {
00843   const char
00844     *value;
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   if (wand->images == (Image *) NULL)
00851     {
00852       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00853         "ContainsNoImages","`%s'",wand->name);
00854       return((char *) NULL);
00855     }
00856   value=GetImageProperty(wand->images,property);
00857   if (value == (const char *) NULL)
00858     return((char *) NULL);
00859   return(ConstantString(value));
00860 }
00861 
00862 /*
00863 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00864 %                                                                             %
00865 %                                                                             %
00866 %                                                                             %
00867 %   M a g i c k G e t I m a g e P r o p e r t i e s                           %
00868 %                                                                             %
00869 %                                                                             %
00870 %                                                                             %
00871 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00872 %
00873 %  MagickGetImageProperties() returns all the property names that match the
00874 %  specified pattern associated with a wand.  Use MagickGetImageProperty() to
00875 %  return the value of a particular property.  Use MagickRelinquishMemory() to
00876 %  free the value when you are finished with it.
00877 %
00878 %  The format of the MagickGetImageProperties method is:
00879 %
00880 %      char *MagickGetImageProperties(MagickWand *wand,
00881 %        const char *pattern,unsigned long *number_properties)
00882 %
00883 %  A description of each parameter follows:
00884 %
00885 %    o wand: the magick wand.
00886 %
00887 %    o pattern: Specifies a pointer to a text string containing a pattern.
00888 %
00889 %    o number_properties: the number properties associated with this wand.
00890 %
00891 */
00892 WandExport char **MagickGetImageProperties(MagickWand *wand,
00893   const char *pattern,unsigned long *number_properties)
00894 {
00895   char
00896     **properties;
00897 
00898   const char
00899     *property;
00900 
00901   register long
00902     i;
00903 
00904   size_t
00905     length;
00906 
00907   assert(wand != (MagickWand *) NULL);
00908   assert(wand->signature == WandSignature);
00909   if (wand->debug != MagickFalse)
00910     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00911   if (wand->images == (Image *) NULL)
00912     {
00913       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00914         "ContainsNoImages","`%s'",wand->name);
00915       return((char **) NULL);
00916     }
00917   (void) GetImageProperty(wand->images,"exif:*");
00918   length=1024;
00919   properties=(char **) AcquireQuantumMemory(length,sizeof(*properties));
00920   if (properties == (char **) NULL)
00921     return((char **) NULL);
00922   ResetImagePropertyIterator(wand->images);
00923   property=GetNextImageProperty(wand->images);
00924   for (i=0; property != (const char *) NULL; )
00925   {
00926     if ((*property != '[') &&
00927         (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
00928       {
00929         if ((i+1) >= (long) length)
00930           {
00931             length<<=1;
00932             properties=(char **) ResizeQuantumMemory(properties,length,
00933               sizeof(*properties));
00934             if (properties == (char **) NULL)
00935               {
00936                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
00937                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
00938                   wand->name);
00939                 return((char **) NULL);
00940               }
00941           }
00942         properties[i]=ConstantString(property);
00943         i++;
00944       }
00945     property=GetNextImageProperty(wand->images);
00946   }
00947   properties[i]=(char *) NULL;
00948   *number_properties=(unsigned long) i;
00949   return(properties);
00950 }
00951 
00952 /*
00953 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00954 %                                                                             %
00955 %                                                                             %
00956 %                                                                             %
00957 %   M a g i c k G e t I n t e r l a c e S c h e m e                           %
00958 %                                                                             %
00959 %                                                                             %
00960 %                                                                             %
00961 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00962 %
00963 %  MagickGetInterlaceScheme() gets the wand interlace scheme.
00964 %
00965 %  The format of the MagickGetInterlaceScheme method is:
00966 %
00967 %      InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
00968 %
00969 %  A description of each parameter follows:
00970 %
00971 %    o wand: the magick wand.
00972 %
00973 */
00974 WandExport InterlaceType MagickGetInterlaceScheme(MagickWand *wand)
00975 {
00976   assert(wand != (MagickWand *) NULL);
00977   assert(wand->signature == WandSignature);
00978   if (wand->debug != MagickFalse)
00979     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00980   return(wand->image_info->interlace);
00981 }
00982 
00983 /*
00984 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00985 %                                                                             %
00986 %                                                                             %
00987 %                                                                             %
00988 %   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                       %
00989 %                                                                             %
00990 %                                                                             %
00991 %                                                                             %
00992 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00993 %
00994 %  MagickGetInterpolateMethod() gets the wand compression.
00995 %
00996 %  The format of the MagickGetInterpolateMethod method is:
00997 %
00998 %      InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
00999 %
01000 %  A description of each parameter follows:
01001 %
01002 %    o wand: the magick wand.
01003 %
01004 */
01005 WandExport InterpolatePixelMethod MagickGetInterpolateMethod(MagickWand *wand)
01006 {
01007   const char
01008     *option;
01009 
01010   InterpolatePixelMethod
01011     method;
01012 
01013   assert(wand != (MagickWand *) NULL);
01014   assert(wand->signature == WandSignature);
01015   if (wand->debug != MagickFalse)
01016     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01017   option=GetImageOption(wand->image_info,"interpolate");
01018   if (option == (const char *) NULL)
01019     return(UndefinedInterpolatePixel);
01020   method=(InterpolatePixelMethod) ParseMagickOption(MagickInterpolateOptions,
01021     MagickFalse,option);
01022   return(method);
01023 }
01024 
01025 /*
01026 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01027 %                                                                             %
01028 %                                                                             %
01029 %                                                                             %
01030 %   M a g i c k G e t O p t i o n                                             %
01031 %                                                                             %
01032 %                                                                             %
01033 %                                                                             %
01034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01035 %
01036 %  MagickGetOption() returns a value associated with a wand and the specified
01037 %  key.  Use MagickRelinquishMemory() to free the value when you are finished
01038 %  with it.
01039 %
01040 %  The format of the MagickGetOption method is:
01041 %
01042 %      char *MagickGetOption(MagickWand *wand,const char *key)
01043 %
01044 %  A description of each parameter follows:
01045 %
01046 %    o wand: the magick wand.
01047 %
01048 %    o key: the key.
01049 %
01050 */
01051 WandExport char *MagickGetOption(MagickWand *wand,const char *key)
01052 {
01053   const char
01054     *option;
01055 
01056   assert(wand != (MagickWand *) NULL);
01057   assert(wand->signature == WandSignature);
01058   if (wand->debug != MagickFalse)
01059     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01060   option=GetImageOption(wand->image_info,key);
01061   return(ConstantString(option));
01062 }
01063 
01064 /*
01065 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01066 %                                                                             %
01067 %                                                                             %
01068 %                                                                             %
01069 %   M a g i c k G e t O p t i o n                                             %
01070 %                                                                             %
01071 %                                                                             %
01072 %                                                                             %
01073 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01074 %
01075 %  MagickGetOptions() returns all the option names that match the specified
01076 %  pattern associated with a wand.  Use MagickGetOption() to return the value
01077 %  of a particular option.  Use MagickRelinquishMemory() to free the value
01078 %  when you are finished with it.
01079 %
01080 %  The format of the MagickGetOptions method is:
01081 %
01082 %      char *MagickGetOptions(MagickWand *wand,unsigned long *number_options)
01083 %
01084 %  A description of each parameter follows:
01085 %
01086 %    o wand: the magick wand.
01087 %
01088 %    o pattern: Specifies a pointer to a text string containing a pattern.
01089 %
01090 %    o number_options: the number options associated with this wand.
01091 %
01092 */
01093 WandExport char **MagickGetOptions(MagickWand *wand,const char *pattern,
01094   unsigned long *number_options)
01095 {
01096   char
01097     **options;
01098 
01099   const char
01100     *option;
01101 
01102   register long
01103     i;
01104 
01105   size_t
01106     length;
01107 
01108   assert(wand != (MagickWand *) NULL);
01109   assert(wand->signature == WandSignature);
01110   if (wand->debug != MagickFalse)
01111     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01112   if (wand->images == (Image *) NULL)
01113     {
01114       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
01115         "ContainsNoImages","`%s'",wand->name);
01116       return((char **) NULL);
01117     }
01118   length=1024;
01119   options=(char **) AcquireQuantumMemory(length,sizeof(*options));
01120   if (options == (char **) NULL)
01121     return((char **) NULL);
01122   ResetImageOptionIterator(wand->image_info);
01123   option=GetNextImageOption(wand->image_info);
01124   for (i=0; option != (const char *) NULL; )
01125   {
01126     if ((*option != '[') &&
01127         (GlobExpression(option,pattern,MagickFalse) != MagickFalse))
01128       {
01129         if ((i+1) >= (long) length)
01130           {
01131             length<<=1;
01132             options=(char **) ResizeQuantumMemory(options,length,
01133               sizeof(*options));
01134             if (options == (char **) NULL)
01135               {
01136                 (void) ThrowMagickException(wand->exception,GetMagickModule(),
01137                   ResourceLimitError,"MemoryAllocationFailed","`%s'",
01138                   wand->name);
01139                 return((char **) NULL);
01140               }
01141           }
01142         options[i]=ConstantString(option);
01143         i++;
01144       }
01145     option=GetNextImageOption(wand->image_info);
01146   }
01147   options[i]=(char *) NULL;
01148   *number_options=(unsigned long) i;
01149   return(options);
01150 }
01151 
01152 /*
01153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01154 %                                                                             %
01155 %                                                                             %
01156 %                                                                             %
01157 %   M a g i c k G e t O r i e n t a t i o n                                   %
01158 %                                                                             %
01159 %                                                                             %
01160 %                                                                             %
01161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01162 %
01163 %  MagickGetOrientation() gets the wand orientation type.
01164 %
01165 %  The format of the MagickGetOrientation method is:
01166 %
01167 %      OrientationType MagickGetOrientation(MagickWand *wand)
01168 %
01169 %  A description of each parameter follows:
01170 %
01171 %    o wand: the magick wand.
01172 %
01173 */
01174 WandExport OrientationType MagickGetOrientation(MagickWand *wand)
01175 {
01176   assert(wand != (MagickWand *) NULL);
01177   assert(wand->signature == WandSignature);
01178   if (wand->debug != MagickFalse)
01179     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01180   return(wand->image_info->orientation);
01181 }
01182 
01183 /*
01184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01185 %                                                                             %
01186 %                                                                             %
01187 %                                                                             %
01188 %   M a g i c k G e t P a c k a g e N a m e                                   %
01189 %                                                                             %
01190 %                                                                             %
01191 %                                                                             %
01192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01193 %
01194 %  MagickGetPackageName() returns the ImageMagick package name as a string
01195 %  constant.
01196 %
01197 %  The format of the MagickGetPackageName method is:
01198 %
01199 %      const char *MagickGetPackageName(void)
01200 %
01201 %
01202 */
01203 WandExport const char *MagickGetPackageName(void)
01204 {
01205   return(GetMagickPackageName());
01206 }
01207 
01208 /*
01209 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01210 %                                                                             %
01211 %                                                                             %
01212 %                                                                             %
01213 %   M a g i c k G e t P a g e                                                 %
01214 %                                                                             %
01215 %                                                                             %
01216 %                                                                             %
01217 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01218 %
01219 %  MagickGetPage() returns the page geometry associated with the magick wand.
01220 %
01221 %  The format of the MagickGetPage method is:
01222 %
01223 %      MagickBooleanType MagickGetPage(const MagickWand *wand,
01224 %        unsigned long *width,unsigned long *height,long *x,long *y)
01225 %
01226 %  A description of each parameter follows:
01227 %
01228 %    o wand: the magick wand.
01229 %
01230 %    o width: the page width.
01231 %
01232 %    o height: page height.
01233 %
01234 %    o x: the page x-offset.
01235 %
01236 %    o y: the page y-offset.
01237 %
01238 */
01239 WandExport MagickBooleanType MagickGetPage(const MagickWand *wand,
01240   unsigned long *width,unsigned long *height,long *x,long *y)
01241 {
01242   RectangleInfo
01243     geometry;
01244 
01245   assert(wand != (const MagickWand *) NULL);
01246   assert(wand->signature == WandSignature);
01247   if (wand->debug != MagickFalse)
01248     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01249   (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
01250   (void) ParseAbsoluteGeometry(wand->image_info->page,&geometry);
01251   *width=geometry.width;
01252   *height=geometry.height;
01253   *x=geometry.x;
01254   *y=geometry.y;
01255   return(MagickTrue);
01256 }
01257 
01258 /*
01259 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01260 %                                                                             %
01261 %                                                                             %
01262 %                                                                             %
01263 %   M a g i c k G e t P o i n t s i z e                                       %
01264 %                                                                             %
01265 %                                                                             %
01266 %                                                                             %
01267 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01268 %
01269 %  MagickGetPointsize() returns the font pointsize associated with the
01270 %  MagickWand.
01271 %
01272 %  The format of the MagickGetPointsize method is:
01273 %
01274 %      double MagickGetPointsize(MagickWand *wand)
01275 %
01276 %  A description of each parameter follows:
01277 %
01278 %    o wand: the magick wand.
01279 %
01280 */
01281 WandExport double MagickGetPointsize(MagickWand *wand)
01282 {
01283   assert(wand != (MagickWand *) NULL);
01284   assert(wand->signature == WandSignature);
01285   if (wand->debug != MagickFalse)
01286     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01287   return(wand->image_info->pointsize);
01288 }
01289 
01290 /*
01291 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01292 %                                                                             %
01293 %                                                                             %
01294 %                                                                             %
01295 %   M a g i c k G e t Q u a n t u m D e p t h                                 %
01296 %                                                                             %
01297 %                                                                             %
01298 %                                                                             %
01299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01300 %
01301 %  MagickGetQuantumDepth() returns the ImageMagick quantum depth as a string
01302 %  constant.
01303 %
01304 %  The format of the MagickGetQuantumDepth method is:
01305 %
01306 %      const char *MagickGetQuantumDepth(unsigned long *depth)
01307 %
01308 %  A description of each parameter follows:
01309 %
01310 %    o depth: the quantum depth is returned as a number.
01311 %
01312 */
01313 WandExport const char *MagickGetQuantumDepth(unsigned long *depth)
01314 {
01315   return(GetMagickQuantumDepth(depth));
01316 }
01317 
01318 /*
01319 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01320 %                                                                             %
01321 %                                                                             %
01322 %                                                                             %
01323 %   M a g i c k G e t Q u a n t u m R a n g e                                 %
01324 %                                                                             %
01325 %                                                                             %
01326 %                                                                             %
01327 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01328 %
01329 %  MagickGetQuantumRange() returns the ImageMagick quantum range as a string
01330 %  constant.
01331 %
01332 %  The format of the MagickGetQuantumRange method is:
01333 %
01334 %      const char *MagickGetQuantumRange(unsigned long *range)
01335 %
01336 %  A description of each parameter follows:
01337 %
01338 %    o range: the quantum range is returned as a number.
01339 %
01340 */
01341 WandExport const char *MagickGetQuantumRange(unsigned long *range)
01342 {
01343   return(GetMagickQuantumRange(range));
01344 }
01345 
01346 /*
01347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01348 %                                                                             %
01349 %                                                                             %
01350 %                                                                             %
01351 %   M a g i c k G e t R e l e a s e D a t e                                   %
01352 %                                                                             %
01353 %                                                                             %
01354 %                                                                             %
01355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01356 %
01357 %  MagickGetReleaseDate() returns the ImageMagick release date as a string
01358 %  constant.
01359 %
01360 %  The format of the MagickGetReleaseDate method is:
01361 %
01362 %      const char *MagickGetReleaseDate(void)
01363 %
01364 */
01365 WandExport const char *MagickGetReleaseDate(void)
01366 {
01367   return(GetMagickReleaseDate());
01368 }
01369 
01370 /*
01371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01372 %                                                                             %
01373 %                                                                             %
01374 %                                                                             %
01375 %   M a g i c k G e t R e s o u r c e                                         %
01376 %                                                                             %
01377 %                                                                             %
01378 %                                                                             %
01379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01380 %
01381 %  MagickGetResource() returns the specified resource in megabytes.
01382 %
01383 %  The format of the MagickGetResource method is:
01384 %
01385 %      MagickSizeType MagickGetResource(const ResourceType type)
01386 %
01387 %  A description of each parameter follows:
01388 %
01389 %    o wand: the magick wand.
01390 %
01391 */
01392 WandExport MagickSizeType MagickGetResource(const ResourceType type)
01393 {
01394   return(GetMagickResource(type));
01395 }
01396 
01397 /*
01398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01399 %                                                                             %
01400 %                                                                             %
01401 %                                                                             %
01402 %   M a g i c k G e t R e s o u r c e L i m i t                               %
01403 %                                                                             %
01404 %                                                                             %
01405 %                                                                             %
01406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01407 %
01408 %  MagickGetResourceLimit() returns the specified resource limit in megabytes.
01409 %
01410 %  The format of the MagickGetResourceLimit method is:
01411 %
01412 %      MagickSizeType MagickGetResourceLimit(const ResourceType type)
01413 %
01414 %  A description of each parameter follows:
01415 %
01416 %    o wand: the magick wand.
01417 %
01418 */
01419 WandExport MagickSizeType MagickGetResourceLimit(const ResourceType type)
01420 {
01421   return(GetMagickResourceLimit(type));
01422 }
01423 
01424 /*
01425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01426 %                                                                             %
01427 %                                                                             %
01428 %                                                                             %
01429 %   M a g i c k G e t S a m p l i n g F a c t o r s                           %
01430 %                                                                             %
01431 %                                                                             %
01432 %                                                                             %
01433 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01434 %
01435 %  MagickGetSamplingFactors() gets the horizontal and vertical sampling factor.
01436 %
01437 %  The format of the MagickGetSamplingFactors method is:
01438 %
01439 %      double *MagickGetSamplingFactor(MagickWand *wand,
01440 %        unsigned long *number_factors)
01441 %
01442 %  A description of each parameter follows:
01443 %
01444 %    o wand: the magick wand.
01445 %
01446 %    o number_factors: the number of factors in the returned array.
01447 %
01448 */
01449 WandExport double *MagickGetSamplingFactors(MagickWand *wand,
01450   unsigned long *number_factors)
01451 {
01452   double
01453     *sampling_factors;
01454 
01455   register const char
01456     *p;
01457 
01458   register long
01459     i;
01460 
01461   assert(wand != (MagickWand *) NULL);
01462   assert(wand->signature == WandSignature);
01463   if (wand->debug != MagickFalse)
01464     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01465   *number_factors=0;
01466   sampling_factors=(double *) NULL;
01467   if (wand->image_info->sampling_factor == (char *) NULL)
01468     return(sampling_factors);
01469   i=0;
01470   for (p=wand->image_info->sampling_factor; p != (char *) NULL; p=strchr(p,','))
01471   {
01472     while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
01473            (*p == ',')))
01474       p++;
01475     i++;
01476   }
01477   sampling_factors=(double *) AcquireQuantumMemory((size_t) i,
01478     sizeof(*sampling_factors));
01479   if (sampling_factors == (double *) NULL)
01480     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
01481       wand->image_info->filename);
01482   i=0;
01483   for (p=wand->image_info->sampling_factor; p != (char *) NULL; p=strchr(p,','))
01484   {
01485     while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
01486            (*p == ',')))
01487       p++;
01488     sampling_factors[i]=StringToDouble(p);
01489     i++;
01490   }
01491   *number_factors=(unsigned long) i;
01492   return(sampling_factors);
01493 }
01494 
01495 /*
01496 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01497 %                                                                             %
01498 %                                                                             %
01499 %                                                                             %
01500 %   M a g i c k G e t S i z e                                                 %
01501 %                                                                             %
01502 %                                                                             %
01503 %                                                                             %
01504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01505 %
01506 %  MagickGetSize() returns the size associated with the magick wand.
01507 %
01508 %  The format of the MagickGetSize method is:
01509 %
01510 %      MagickBooleanType MagickGetSize(const MagickWand *wand,
01511 %        unsigned long *columns,unsigned long *rows)
01512 %
01513 %  A description of each parameter follows:
01514 %
01515 %    o wand: the magick wand.
01516 %
01517 %    o columns: the width in pixels.
01518 %
01519 %    o height: the height in pixels.
01520 %
01521 */
01522 WandExport MagickBooleanType MagickGetSize(const MagickWand *wand,
01523   unsigned long *columns,unsigned long *rows)
01524 {
01525   RectangleInfo
01526     geometry;
01527 
01528   assert(wand != (const MagickWand *) NULL);
01529   assert(wand->signature == WandSignature);
01530   if (wand->debug != MagickFalse)
01531     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01532   (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
01533   (void) ParseAbsoluteGeometry(wand->image_info->size,&geometry);
01534   *columns=geometry.width;
01535   *rows=geometry.height;
01536   return(MagickTrue);
01537 }
01538 
01539 /*
01540 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01541 %                                                                             %
01542 %                                                                             %
01543 %                                                                             %
01544 %   M a g i c k G e t S i z e O f f s e t                                     %
01545 %                                                                             %
01546 %                                                                             %
01547 %                                                                             %
01548 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01549 %
01550 %  MagickGetSizeOffset() returns the size offset associated with the magick
01551 %  wand.
01552 %
01553 %  The format of the MagickGetSizeOffset method is:
01554 %
01555 %      MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
01556 %        long *offset)
01557 %
01558 %  A description of each parameter follows:
01559 %
01560 %    o wand: the magick wand.
01561 %
01562 %    o offset: the image offset.
01563 %
01564 */
01565 WandExport MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
01566   long *offset)
01567 {
01568   RectangleInfo
01569     geometry;
01570 
01571   assert(wand != (const MagickWand *) NULL);
01572   assert(wand->signature == WandSignature);
01573   if (wand->debug != MagickFalse)
01574     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01575   (void) ResetMagickMemory(&geometry,0,sizeof(geometry));
01576   (void) ParseAbsoluteGeometry(wand->image_info->size,&geometry);
01577   *offset=geometry.x;
01578   return(MagickTrue);
01579 }
01580 
01581 /*
01582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01583 %                                                                             %
01584 %                                                                             %
01585 %                                                                             %
01586 %   M a g i c k G e t T y p e                                                 %
01587 %                                                                             %
01588 %                                                                             %
01589 %                                                                             %
01590 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01591 %
01592 %  MagickGetType() returns the wand type.
01593 %
01594 %  The format of the MagickGetType method is:
01595 %
01596 %      ImageType MagickGetType(MagickWand *wand)
01597 %
01598 %  A description of each parameter follows:
01599 %
01600 %    o wand: the magick wand.
01601 %
01602 */
01603 WandExport ImageType MagickGetType(MagickWand *wand)
01604 {
01605   assert(wand != (MagickWand *) NULL);
01606   assert(wand->signature == WandSignature);
01607   if (wand->debug != MagickFalse)
01608     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01609   return(wand->image_info->type);
01610 }
01611 
01612 /*
01613 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01614 %                                                                             %
01615 %                                                                             %
01616 %                                                                             %
01617 %   M a g i c k G e t V e r s i o n                                           %
01618 %                                                                             %
01619 %                                                                             %
01620 %                                                                             %
01621 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01622 %
01623 %  MagickGetVersion() returns the ImageMagick API version as a string constant
01624 %  and as a number.
01625 %
01626 %  The format of the MagickGetVersion method is:
01627 %
01628 %      const char *MagickGetVersion(unsigned long *version)
01629 %
01630 %  A description of each parameter follows:
01631 %
01632 %    o version: the ImageMagick version is returned as a number.
01633 %
01634 */
01635 WandExport const char *MagickGetVersion(unsigned long *version)
01636 {
01637   return(GetMagickVersion(version));
01638 }
01639 
01640 /*
01641 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01642 %                                                                             %
01643 %                                                                             %
01644 %                                                                             %
01645 %   M a g i c k P r o f i l e I m a g e                                       %
01646 %                                                                             %
01647 %                                                                             %
01648 %                                                                             %
01649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01650 %
01651 %  MagickProfileImage() adds or removes a ICC, IPTC, or generic profile
01652 %  from an image.  If the profile is NULL, it is removed from the image
01653 %  otherwise added.  Use a name of '*' and a profile of NULL to remove all
01654 %  profiles from the image.
01655 %
01656 %  The format of the MagickProfileImage method is:
01657 %
01658 %      MagickBooleanType MagickProfileImage(MagickWand *wand,const char *name,
01659 %        const void *profile,const size_t length)
01660 %
01661 %  A description of each parameter follows:
01662 %
01663 %    o wand: the magick wand.
01664 %
01665 %    o name: Name of profile to add or remove: ICC, IPTC, or generic profile.
01666 %
01667 %    o profile: the profile.
01668 %
01669 %    o length: the length of the profile.
01670 %
01671 */
01672 WandExport MagickBooleanType MagickProfileImage(MagickWand *wand,
01673   const char *name,const void *profile,const size_t length)
01674 {
01675   MagickBooleanType
01676     status;
01677 
01678   assert(wand != (MagickWand *) NULL);
01679   assert(wand->signature == WandSignature);
01680   if (wand->debug != MagickFalse)
01681     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01682   if (wand->images == (Image *) NULL)
01683     ThrowWandException(WandError,"ContainsNoImages",wand->name);
01684   status=ProfileImage(wand->images,name,profile,length,MagickTrue);
01685   if (status == MagickFalse)
01686     InheritException(wand->exception,&wand->images->exception);
01687   return(status);
01688 }
01689 
01690 /*
01691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01692 %                                                                             %
01693 %                                                                             %
01694 %                                                                             %
01695 %   M a g i c k R e m o v e I m a g e P r o f i l e                           %
01696 %                                                                             %
01697 %                                                                             %
01698 %                                                                             %
01699 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01700 %
01701 %  MagickRemoveImageProfile() removes the named image profile and returns it.
01702 %
01703 %  The format of the MagickRemoveImageProfile method is:
01704 %
01705 %      unsigned char *MagickRemoveImageProfile(MagickWand *wand,
01706 %        const char *name,size_t *length)
01707 %
01708 %  A description of each parameter follows:
01709 %
01710 %    o wand: the magick wand.
01711 %
01712 %    o name: Name of profile to return: ICC, IPTC, or generic profile.
01713 %
01714 %    o length: the length of the profile.
01715 %
01716 */
01717 WandExport unsigned char *MagickRemoveImageProfile(MagickWand *wand,
01718   const char *name,size_t *length)
01719 {
01720   StringInfo
01721     *profile;
01722 
01723   unsigned char
01724     *datum;
01725 
01726   assert(wand != (MagickWand *) NULL);
01727   assert(wand->signature == WandSignature);
01728   if (wand->debug != MagickFalse)
01729     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01730   if (wand->images == (Image *) NULL)
01731     {
01732       (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
01733         "ContainsNoImages","`%s'",wand->name);
01734       return((unsigned char *) NULL);
01735     }
01736   *length=0;
01737   profile=RemoveImageProfile(wand->images,name);
01738   if (profile == (StringInfo *) NULL)
01739     return((unsigned char *) NULL);
01740   datum=(unsigned char *) AcquireQuantumMemory(GetStringInfoLength(profile),
01741     sizeof(*datum));
01742   if (datum == (unsigned char *) NULL)
01743     return((unsigned char *) NULL);
01744   (void) CopyMagickMemory(datum,GetStringInfoDatum(profile),
01745     GetStringInfoLength(profile));
01746   *length=GetStringInfoLength(profile);
01747   profile=DestroyStringInfo(profile);
01748   return(datum);
01749 }
01750 
01751 /*
01752 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01753 %                                                                             %
01754 %                                                                             %
01755 %                                                                             %
01756 %   M a g i c k S e t A n t i a l i a s                                       %
01757 %                                                                             %
01758 %                                                                             %
01759 %                                                                             %
01760 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01761 %
01762 %  MagickSetAntialias() sets the antialias propery of the wand.
01763 %
01764 %  The format of the MagickSetAntialias method is:
01765 %
01766 %      MagickBooleanType MagickSetAntialias(MagickWand *wand,
01767 %        const MagickBooleanType antialias)
01768 %
01769 %  A description of each parameter follows:
01770 %
01771 %    o wand: the magick wand.
01772 %
01773 %    o antialias: the antialias property.
01774 %
01775 */
01776 WandExport MagickBooleanType MagickSetAntialias(MagickWand *wand,
01777   const MagickBooleanType antialias)
01778 {
01779   assert(wand != (MagickWand *) NULL);
01780   assert(wand->signature == WandSignature);
01781   if (wand->debug != MagickFalse)
01782     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01783   wand->image_info->antialias=antialias;
01784   return(MagickTrue);
01785 }
01786 
01787 /*
01788 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01789 %                                                                             %
01790 %                                                                             %
01791 %                                                                             %
01792 %   M a g i c k S e t B a c k g r o u n d C o l o r                           %
01793 %                                                                             %
01794 %                                                                             %
01795 %                                                                             %
01796 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01797 %
01798 %  MagickSetBackgroundColor() sets the wand background color.
01799 %
01800 %  The format of the MagickSetBackgroundColor method is:
01801 %
01802 %      MagickBooleanType MagickSetBackgroundColor(MagickWand *wand,
01803 %        const PixelWand *background)
01804 %
01805 %  A description of each parameter follows:
01806 %
01807 %    o wand: the magick wand.
01808 %
01809 %    o background: the background pixel wand.
01810 %
01811 */
01812 WandExport MagickBooleanType MagickSetBackgroundColor(MagickWand *wand,
01813   const PixelWand *background)
01814 {
01815   assert(wand != (MagickWand *) NULL);
01816   assert(wand->signature == WandSignature);
01817   if (wand->debug != MagickFalse)
01818     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01819   PixelGetQuantumColor(background,&wand->image_info->background_color);
01820   return(MagickTrue);
01821 }
01822 
01823 /*
01824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01825 %                                                                             %
01826 %                                                                             %
01827 %                                                                             %
01828 %   M a g i c k S e t C o l o r s p a c e                                     %
01829 %                                                                             %
01830 %                                                                             %
01831 %                                                                             %
01832 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01833 %
01834 %  MagickSetColorspace() sets the wand colorspace type.
01835 %
01836 %  The format of the MagickSetColorspace method is:
01837 %
01838 %      MagickBooleanType MagickSetColorspace(MagickWand *wand,
01839 %        const ColorspaceType colorspace)
01840 %
01841 %  A description of each parameter follows:
01842 %
01843 %    o wand: the magick wand.
01844 %
01845 %    o colorspace: the wand colorspace.
01846 %
01847 */
01848 WandExport MagickBooleanType MagickSetColorspace(MagickWand *wand,
01849   const ColorspaceType colorspace)
01850 {
01851   assert(wand != (MagickWand *) NULL);
01852   assert(wand->signature == WandSignature);
01853   if (wand->debug != MagickFalse)
01854     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01855   wand->image_info->colorspace=colorspace;
01856   return(MagickTrue);
01857 }
01858 
01859 /*
01860 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01861 %                                                                             %
01862 %                                                                             %
01863 %                                                                             %
01864 %   M a g i c k S e t C o m p r e s s i o n                                   %
01865 %                                                                             %
01866 %                                                                             %
01867 %                                                                             %
01868 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01869 %
01870 %  MagickSetCompression() sets the wand compression type.
01871 %
01872 %  The format of the MagickSetCompression method is:
01873 %
01874 %      MagickBooleanType MagickSetCompression(MagickWand *wand,
01875 %        const CompressionType compression)
01876 %
01877 %  A description of each parameter follows:
01878 %
01879 %    o wand: the magick wand.
01880 %
01881 %    o compression: the wand compression.
01882 %
01883 */
01884 WandExport MagickBooleanType MagickSetCompression(MagickWand *wand,
01885   const CompressionType compression)
01886 {
01887   assert(wand != (MagickWand *) NULL);
01888   assert(wand->signature == WandSignature);
01889   if (wand->debug != MagickFalse)
01890     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01891   wand->image_info->compression=compression;
01892   return(MagickTrue);
01893 }
01894 
01895 /*
01896 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01897 %                                                                             %
01898 %                                                                             %
01899 %                                                                             %
01900 %   M a g i c k S e t C o m p r e s s i o n Q u a l i t y                     %
01901 %                                                                             %
01902 %                                                                             %
01903 %                                                                             %
01904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01905 %
01906 %  MagickSetCompressionQuality() sets the wand compression quality.
01907 %
01908 %  The format of the MagickSetCompressionQuality method is:
01909 %
01910 %      MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
01911 %        const unsigned long quality)
01912 %
01913 %  A description of each parameter follows:
01914 %
01915 %    o wand: the magick wand.
01916 %
01917 %    o quality: the wand compression quality.
01918 %
01919 */
01920 WandExport MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
01921   const unsigned long quality)
01922 {
01923   assert(wand != (MagickWand *) NULL);
01924   assert(wand->signature == WandSignature);
01925   if (wand->debug != MagickFalse)
01926     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01927   wand->image_info->quality=quality;
01928   return(MagickTrue);
01929 }
01930 
01931 /*
01932 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01933 %                                                                             %
01934 %                                                                             %
01935 %                                                                             %
01936 %   M a g i c k S e t D e p t h                                               %
01937 %                                                                             %
01938 %                                                                             %
01939 %                                                                             %
01940 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01941 %
01942 %  MagickSetDepth() sets the wand pixel depth.
01943 %
01944 %  The format of the MagickSetDepth method is:
01945 %
01946 %      MagickBooleanType MagickSetDepth(MagickWand *wand,
01947 %        const unsigned long depth)
01948 %
01949 %  A description of each parameter follows:
01950 %
01951 %    o wand: the magick wand.
01952 %
01953 %    o depth: the wand pixel depth.
01954 %
01955 */
01956 WandExport MagickBooleanType MagickSetDepth(MagickWand *wand,
01957   const unsigned long depth)
01958 {
01959   assert(wand != (MagickWand *) NULL);
01960   assert(wand->signature == WandSignature);
01961   if (wand->debug != MagickFalse)
01962     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01963   wand->image_info->depth=depth;
01964   return(MagickTrue);
01965 }
01966 
01967 /*
01968 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01969 %                                                                             %
01970 %                                                                             %
01971 %                                                                             %
01972 %   M a g i c k S e t E x t r a c t                                           %
01973 %                                                                             %
01974 %                                                                             %
01975 %                                                                             %
01976 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
01977 %
01978 %  MagickSetExtract() sets the extract geometry before you read or write an
01979 %  image file.  Use it for inline cropping (e.g. 200x200+0+0) or resizing
01980 %  (e.g.200x200).
01981 %
01982 %  The format of the MagickSetExtract method is:
01983 %
01984 %      MagickBooleanType MagickSetExtract(MagickWand *wand,
01985 %        const char *geometry)
01986 %
01987 %  A description of each parameter follows:
01988 %
01989 %    o wand: the magick wand.
01990 %
01991 %    o geometry: the extract geometry.
01992 %
01993 */
01994 WandExport MagickBooleanType MagickSetExtract(MagickWand *wand,
01995   const char *geometry)
01996 {
01997   assert(wand != (MagickWand *) NULL);
01998   assert(wand->signature == WandSignature);
01999   if (wand->debug != MagickFalse)
02000     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02001   if (geometry != (const char *) NULL)
02002     (void) CopyMagickString(wand->image_info->extract,geometry,MaxTextExtent);
02003   return(MagickTrue);
02004 }
02005 
02006 /*
02007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02008 %                                                                             %
02009 %                                                                             %
02010 %                                                                             %
02011 %   M a g i c k S e t F i l e n a m e                                         %
02012 %                                                                             %
02013 %                                                                             %
02014 %                                                                             %
02015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02016 %
02017 %  MagickSetFilename() sets the filename before you read or write an image file.
02018 %
02019 %  The format of the MagickSetFilename method is:
02020 %
02021 %      MagickBooleanType MagickSetFilename(MagickWand *wand,
02022 %        const char *filename)
02023 %
02024 %  A description of each parameter follows:
02025 %
02026 %    o wand: the magick wand.
02027 %
02028 %    o filename: the image filename.
02029 %
02030 */
02031 WandExport MagickBooleanType MagickSetFilename(MagickWand *wand,
02032   const char *filename)
02033 {
02034   assert(wand != (MagickWand *) NULL);
02035   assert(wand->signature == WandSignature);
02036   if (wand->debug != MagickFalse)
02037     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02038   if (filename != (const char *) NULL)
02039     (void) CopyMagickString(wand->image_info->filename,filename,MaxTextExtent);
02040   return(MagickTrue);
02041 }
02042 
02043 /*
02044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02045 %                                                                             %
02046 %                                                                             %
02047 %                                                                             %
02048 %   M a g i c k S e t F o n t                                                 %
02049 %                                                                             %
02050 %                                                                             %
02051 %                                                                             %
02052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02053 %
02054 %  MagickSetFont() sets the font associated with the MagickWand.
02055 %
02056 %  The format of the MagickSetFont method is:
02057 %
02058 %      MagickBooleanType MagickSetFont(MagickWand *wand, const char *font)
02059 %
02060 %  A description of each parameter follows:
02061 %
02062 %    o wand: the magick wand.
02063 %
02064 %    o font: the font
02065 %
02066 */
02067 WandExport MagickBooleanType MagickSetFont(MagickWand *wand,const char *font)
02068 {
02069   if ((font == (const char *) NULL) || (*font == '\0'))
02070     return(MagickFalse);
02071   assert(wand != (MagickWand *) NULL);
02072   assert(wand->signature == WandSignature);
02073   if (wand->debug != MagickFalse)
02074     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02075   (void) CloneString(&wand->image_info->font,font);
02076   return(MagickTrue);
02077 }
02078 
02079 /*
02080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02081 %                                                                             %
02082 %                                                                             %
02083 %                                                                             %
02084 %   M a g i c k S e t F o r m a t                                             %
02085 %                                                                             %
02086 %                                                                             %
02087 %                                                                             %
02088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02089 %
02090 %  MagickSetFormat() sets the format of the magick wand.
02091 %
02092 %  The format of the MagickSetFormat method is:
02093 %
02094 %      MagickBooleanType MagickSetFormat(MagickWand *wand,const char *format)
02095 %
02096 %  A description of each parameter follows:
02097 %
02098 %    o wand: the magick wand.
02099 %
02100 %    o format: the image format.
02101 %
02102 */
02103 WandExport MagickBooleanType MagickSetFormat(MagickWand *wand,
02104   const char *format)
02105 {
02106   const MagickInfo
02107     *magick_info;
02108 
02109   assert(wand != (MagickWand *) NULL);
02110   assert(wand->signature == WandSignature);
02111   if (wand->debug != MagickFalse)
02112     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02113   if ((format == (char *) NULL) || (*format == '\0'))
02114     {
02115       *wand->image_info->magick='\0';
02116       return(MagickTrue);
02117     }
02118   magick_info=GetMagickInfo(format,wand->exception);
02119   if (magick_info == (const MagickInfo *) NULL)
02120     return(MagickFalse);
02121   ClearMagickException(wand->exception);
02122   (void) CopyMagickString(wand->image_info->magick,format,MaxTextExtent);
02123   return(MagickTrue);
02124 }
02125 
02126 /*
02127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02128 %                                                                             %
02129 %                                                                             %
02130 %                                                                             %
02131 %   M a g i c k S e t G r a v i t y                                           %
02132 %                                                                             %
02133 %                                                                             %
02134 %                                                                             %
02135 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02136 %
02137 %  MagickSetGravity() sets the gravity type.
02138 %
02139 %  The format of the MagickSetGravity type is:
02140 %
02141 %      MagickBooleanType MagickSetGravity(MagickWand *wand,
02142 %        const GravityType type)
02143 %
02144 %  A description of each parameter follows:
02145 %
02146 %    o wand: the magick wand.
02147 %
02148 %    o type: the gravity type.
02149 %
02150 */
02151 WandExport MagickBooleanType MagickSetGravity(MagickWand *wand,
02152   const GravityType type)
02153 {
02154   MagickBooleanType
02155     status;
02156 
02157   assert(wand != (MagickWand *) NULL);
02158   assert(wand->signature == WandSignature);
02159   if (wand->debug != MagickFalse)
02160     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02161   status=SetImageOption(wand->image_info,"gravity",MagickOptionToMnemonic(
02162     MagickGravityOptions,(long) type));
02163   return(status);
02164 }
02165 
02166 /*
02167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02168 %                                                                             %
02169 %                                                                             %
02170 %                                                                             %
02171 %   M a g i c k S e t I m a g e A r t i f r c t                               %
02172 %                                                                             %
02173 %                                                                             %
02174 %                                                                             %
02175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02176 %
02177 %  MagickSetImageArtifact() associates a artifact with an image.
02178 %
02179 %  The format of the MagickSetImageArtifact method is:
02180 %
02181 %      MagickBooleanType MagickSetImageArtifact(MagickWand *wand,
02182 %        const char *artifact,const char *value)
02183 %
02184 %  A description of each parameter follows:
02185 %
02186 %    o wand: the magick wand.
02187 %
02188 %    o artifact: the artifact.
02189 %
02190 %    o value: the value.
02191 %
02192 */
02193 WandExport MagickBooleanType MagickSetImageArtifact(MagickWand *wand,
02194   const char *artifact,const char *value)
02195 {
02196   MagickBooleanType
02197     status;
02198 
02199   assert(wand != (MagickWand *) NULL);
02200   assert(wand->signature == WandSignature);
02201   if (wand->debug != MagickFalse)
02202     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02203   if (wand->images == (Image *) NULL)
02204     ThrowWandException(WandError,"ContainsNoImages",wand->name);
02205   status=SetImageArtifact(wand->images,artifact,value);
02206   if (status == MagickFalse)
02207     InheritException(wand->exception,&wand->images->exception);
02208   return(status);
02209 }
02210 
02211 /*
02212 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02213 %                                                                             %
02214 %                                                                             %
02215 %                                                                             %
02216 %   M a g i c k S e t P r o f i l e I m a g e                                 %
02217 %                                                                             %
02218 %                                                                             %
02219 %                                                                             %
02220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02221 %
02222 %  MagickSetImageProfile() adds a named profile to the magick wand.  If a
02223 %  profile with the same name already exists, it is replaced.  This method
02224 %  differs from the MagickProfileImage() method in that it does not apply any
02225 %  CMS color profiles.
02226 %
02227 %  The format of the MagickSetImageProfile method is:
02228 %
02229 %      MagickBooleanType MagickSetImageProfile(MagickWand *wand,
02230 %        const char *name,const void *profile,const size_t length)
02231 %
02232 %  A description of each parameter follows:
02233 %
02234 %    o wand: the magick wand.
02235 %
02236 %    o name: Name of profile to add or remove: ICC, IPTC, or generic profile.
02237 %
02238 %    o profile: the profile.
02239 %
02240 %    o length: the length of the profile.
02241 %
02242 */
02243 WandExport MagickBooleanType MagickSetImageProfile(MagickWand *wand,
02244   const char *name,const void *profile,const size_t length)
02245 {
02246   MagickBooleanType
02247     status;
02248 
02249   StringInfo
02250     *profile_info;
02251 
02252   assert(wand != (MagickWand *) NULL);
02253   assert(wand->signature == WandSignature);
02254   if (wand->debug != MagickFalse)
02255     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02256   if (wand->images == (Image *) NULL)
02257     ThrowWandException(WandError,"ContainsNoImages",wand->name);
02258   profile_info=AcquireStringInfo((size_t) length);
02259   SetStringInfoDatum(profile_info,(unsigned char *) profile);
02260   status=SetImageProfile(wand->images,name,profile_info);
02261   profile_info=DestroyStringInfo(profile_info);
02262   if (status == MagickFalse)
02263     InheritException(wand->exception,&wand->images->exception);
02264   return(status);
02265 }
02266 
02267 /*
02268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02269 %                                                                             %
02270 %                                                                             %
02271 %                                                                             %
02272 %   M a g i c k S e t I m a g e P r o p e r t y                               %
02273 %                                                                             %
02274 %                                                                             %
02275 %                                                                             %
02276 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02277 %
02278 %  MagickSetImageProperty() associates a property with an image.
02279 %
02280 %  The format of the MagickSetImageProperty method is:
02281 %
02282 %      MagickBooleanType MagickSetImageProperty(MagickWand *wand,
02283 %        const char *property,const char *value)
02284 %
02285 %  A description of each parameter follows:
02286 %
02287 %    o wand: the magick wand.
02288 %
02289 %    o property: the property.
02290 %
02291 %    o value: the value.
02292 %
02293 */
02294 WandExport MagickBooleanType MagickSetImageProperty(MagickWand *wand,
02295   const char *property,const char *value)
02296 {
02297   MagickBooleanType
02298     status;
02299 
02300   assert(wand != (MagickWand *) NULL);
02301   assert(wand->signature == WandSignature);
02302   if (wand->debug != MagickFalse)
02303     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02304   if (wand->images == (Image *) NULL)
02305     ThrowWandException(WandError,"ContainsNoImages",wand->name);
02306   status=SetImageProperty(wand->images,property,value);
02307   if (status == MagickFalse)
02308     InheritException(wand->exception,&wand->images->exception);
02309   return(status);
02310 }
02311 
02312 /*
02313 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02314 %                                                                             %
02315 %                                                                             %
02316 %                                                                             %
02317 %   M a g i c k S e t I n t e r l a c e S c h e m e                           %
02318 %                                                                             %
02319 %                                                                             %
02320 %                                                                             %
02321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02322 %
02323 %  MagickSetInterlaceScheme() sets the image compression.
02324 %
02325 %  The format of the MagickSetInterlaceScheme method is:
02326 %
02327 %      MagickBooleanType MagickSetInterlaceScheme(MagickWand *wand,
02328 %        const InterlaceType interlace_scheme)
02329 %
02330 %  A description of each parameter follows:
02331 %
02332 %    o wand: the magick wand.
02333 %
02334 %    o interlace_scheme: the image interlace scheme: NoInterlace, LineInterlace,
02335 %      PlaneInterlace, PartitionInterlace.
02336 %
02337 */
02338 WandExport MagickBooleanType MagickSetInterlaceScheme(MagickWand *wand,
02339   const InterlaceType interlace_scheme)
02340 {
02341   assert(wand != (MagickWand *) NULL);
02342   assert(wand->signature == WandSignature);
02343   if (wand->debug != MagickFalse)
02344     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02345   wand->image_info->interlace=interlace_scheme;
02346   return(MagickTrue);
02347 }
02348 
02349 /*
02350 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02351 %                                                                             %
02352 %                                                                             %
02353 %                                                                             %
02354 %   M a g i c k S e t I n t e r p o l a t e M e t h o d                       %
02355 %                                                                             %
02356 %                                                                             %
02357 %                                                                             %
02358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02359 %
02360 %  MagickSetInterpolateMethod() sets the interpolate pixel method.
02361 %
02362 %  The format of the MagickSetInterpolateMethod method is:
02363 %
02364 %      MagickBooleanType MagickSetInterpolateMethod(MagickWand *wand,
02365 %        const InterpolateMethodPixel method)
02366 %
02367 %  A description of each parameter follows:
02368 %
02369 %    o wand: the magick wand.
02370 %
02371 %    o method: the interpolate pixel method.
02372 %
02373 */
02374 WandExport MagickBooleanType MagickSetInterpolateMethod(MagickWand *wand,
02375   const InterpolatePixelMethod method)
02376 {
02377   MagickBooleanType
02378     status;
02379 
02380   assert(wand != (MagickWand *) NULL);
02381   assert(wand->signature == WandSignature);
02382   if (wand->debug != MagickFalse)
02383     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02384   status=SetImageOption(wand->image_info,"interpolate",
02385     MagickOptionToMnemonic(MagickInterpolateOptions,(long) method));
02386   return(status);
02387 }
02388 
02389 /*
02390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02391 %                                                                             %
02392 %                                                                             %
02393 %                                                                             %
02394 %   M a g i c k S e t O p t i o n                                             %
02395 %                                                                             %
02396 %                                                                             %
02397 %                                                                             %
02398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02399 %
02400 %  MagickSetOption() associates one or options with the wand (.e.g
02401 %  MagickSetOption(wand,"jpeg:perserve","yes")).
02402 %
02403 %  The format of the MagickSetOption method is:
02404 %
02405 %      MagickBooleanType MagickSetOption(MagickWand *wand,const char *key,
02406 %        const char *value)
02407 %
02408 %  A description of each parameter follows:
02409 %
02410 %    o wand: the magick wand.
02411 %
02412 %    o key:  The key.
02413 %
02414 %    o value:  The value.
02415 %
02416 */
02417 WandExport MagickBooleanType MagickSetOption(MagickWand *wand,const char *key,
02418   const char *value)
02419 {
02420   assert(wand != (MagickWand *) NULL);
02421   assert(wand->signature == WandSignature);
02422   if (wand->debug != MagickFalse)
02423     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02424   return(SetImageOption(wand->image_info,key,value));
02425 }
02426 
02427 /*
02428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02429 %                                                                             %
02430 %                                                                             %
02431 %                                                                             %
02432 %   M a g i c k S e t O r i e n t a t i o n                                   %
02433 %                                                                             %
02434 %                                                                             %
02435 %                                                                             %
02436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02437 %
02438 %  MagickSetOrientation() sets the wand orientation type.
02439 %
02440 %  The format of the MagickSetOrientation method is:
02441 %
02442 %      MagickBooleanType MagickSetOrientation(MagickWand *wand,
02443 %        const OrientationType orientation)
02444 %
02445 %  A description of each parameter follows:
02446 %
02447 %    o wand: the magick wand.
02448 %
02449 %    o orientation: the wand orientation.
02450 %
02451 */
02452 WandExport MagickBooleanType MagickSetOrientation(MagickWand *wand,
02453   const OrientationType orientation)
02454 {
02455   assert(wand != (MagickWand *) NULL);
02456   assert(wand->signature == WandSignature);
02457   if (wand->debug != MagickFalse)
02458     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02459   wand->image_info->orientation=orientation;
02460   return(MagickTrue);
02461 }
02462 
02463 /*
02464 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02465 %                                                                             %
02466 %                                                                             %
02467 %                                                                             %
02468 %   M a g i c k S e t P a g e                                                 %
02469 %                                                                             %
02470 %                                                                             %
02471 %                                                                             %
02472 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02473 %
02474 %  MagickSetPage() sets the page geometry of the magick wand.
02475 %
02476 %  The format of the MagickSetPage method is:
02477 %
02478 %      MagickBooleanType MagickSetPage(MagickWand *wand,
02479 %        const unsigned long width,const unsigned long height,const long x,
02480 %        const long y)
02481 %
02482 %  A description of each parameter follows:
02483 %
02484 %    o wand: the magick wand.
02485 %
02486 %    o width: the page width.
02487 %
02488 %    o height: the page height.
02489 %
02490 %    o x: the page x-offset.
02491 %
02492 %    o y: the page y-offset.
02493 %
02494 */
02495 WandExport MagickBooleanType MagickSetPage(MagickWand *wand,
02496   const unsigned long width,const unsigned long height,const long x,
02497   const long y)
02498 {
02499   char
02500     geometry[MaxTextExtent];
02501 
02502   assert(wand != (MagickWand *) NULL);
02503   assert(wand->signature == WandSignature);
02504   if (wand->debug != MagickFalse)
02505     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02506   (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
02507     width,height,x,y);
02508   (void) CloneString(&wand->image_info->page,geometry);
02509   return(MagickTrue);
02510 }
02511 
02512 /*
02513 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02514 %                                                                             %
02515 %                                                                             %
02516 %                                                                             %
02517 %   M a g i c k S e t P a s s p h r a s e                                     %
02518 %                                                                             %
02519 %                                                                             %
02520 %                                                                             %
02521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02522 %
02523 %  MagickSetPassphrase() sets the passphrase.
02524 %
02525 %  The format of the MagickSetPassphrase method is:
02526 %
02527 %      MagickBooleanType MagickSetPassphrase(MagickWand *wand,
02528 %        const char *passphrase)
02529 %
02530 %  A description of each parameter follows:
02531 %
02532 %    o wand: the magick wand.
02533 %
02534 %    o passphrase: the passphrase.
02535 %
02536 */
02537 WandExport MagickBooleanType MagickSetPassphrase(MagickWand *wand,
02538   const char *passphrase)
02539 {
02540   assert(wand != (MagickWand *) NULL);
02541   assert(wand->signature == WandSignature);
02542   if (wand->debug != MagickFalse)
02543     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02544   (void) CloneString(&wand->image_info->authenticate,passphrase);
02545   return(MagickTrue);
02546 }
02547 
02548 /*
02549 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02550 %                                                                             %
02551 %                                                                             %
02552 %                                                                             %
02553 %   M a g i c k S e t P o i n t s i z e                                       %
02554 %                                                                             %
02555 %                                                                             %
02556 %                                                                             %
02557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02558 %
02559 %  MagickSetPointsize() sets the font pointsize associated with the MagickWand.
02560 %
02561 %  The format of the MagickSetPointsize method is:
02562 %
02563 %      MagickBooleanType MagickSetPointsize(MagickWand *wand,
02564 %        const double pointsize)
02565 %
02566 %  A description of each parameter follows:
02567 %
02568 %    o wand: the magick wand.
02569 %
02570 %    o pointsize: the size of the font
02571 %
02572 */
02573 WandExport MagickBooleanType MagickSetPointsize(MagickWand *wand,
02574   const double pointsize)
02575 {
02576   assert(wand != (MagickWand *) NULL);
02577   assert(wand->signature == WandSignature);
02578   if (wand->debug != MagickFalse)
02579     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02580   wand->image_info->pointsize=pointsize;
02581   return(MagickTrue);
02582 }
02583 
02584 /*
02585 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02586 %                                                                             %
02587 %                                                                             %
02588 %                                                                             %
02589 %   M a g i c k S e t P r o g r e s s M o n i t o r                           %
02590 %                                                                             %
02591 %                                                                             %
02592 %                                                                             %
02593 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02594 %
02595 %  MagickSetProgressMonitor() sets the wand progress monitor to the specified
02596 %  method and returns the previous progress monitor if any.  The progress
02597 %  monitor method looks like this:
02598 %
02599 %    MagickBooleanType MagickProgressMonitor(const char *text,
02600 %      const MagickOffsetType offset,const MagickSizeType span,
02601 %      void *client_data)
02602 %
02603 %  If the progress monitor returns MagickFalse, the current operation is
02604 %  interrupted.
02605 %
02606 %  The format of the MagickSetProgressMonitor method is:
02607 %
02608 %      MagickProgressMonitor MagickSetProgressMonitor(MagickWand *wand
02609 %        const MagickProgressMonitor progress_monitor,void *client_data)
02610 %
02611 %  A description of each parameter follows:
02612 %
02613 %    o wand: the magick wand.
02614 %
02615 %    o progress_monitor: Specifies a pointer to a method to monitor progress
02616 %      of an image operation.
02617 %
02618 %    o client_data: Specifies a pointer to any client data.
02619 %
02620 */
02621 WandExport MagickProgressMonitor MagickSetProgressMonitor(MagickWand *wand,
02622   const MagickProgressMonitor progress_monitor,void *client_data)
02623 {
02624   MagickProgressMonitor
02625     previous_monitor;
02626 
02627   assert(wand != (MagickWand *) NULL);
02628   assert(wand->signature == WandSignature);
02629   if (wand->debug != MagickFalse)
02630     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02631   previous_monitor=SetImageInfoProgressMonitor(wand->image_info,
02632     progress_monitor,client_data);
02633   return(previous_monitor);
02634 }
02635 
02636 /*
02637 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02638 %                                                                             %
02639 %                                                                             %
02640 %                                                                             %
02641 %   M a g i c k S e t R e s o u r c e L i m i t                               %
02642 %                                                                             %
02643 %                                                                             %
02644 %                                                                             %
02645 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02646 %
02647 %  MagickSetResourceLimit() sets the limit for a particular resource in
02648 %  megabytes.
02649 %
02650 %  The format of the MagickSetResourceLimit method is:
02651 %
02652 %      MagickBooleanType MagickSetResourceLimit(const ResourceType type,
02653 %        const MagickSizeType limit)
02654 %
02655 %  A description of each parameter follows:
02656 %
02657 %    o type: the type of resource: AreaResource, MemoryResource, MapResource,
02658 %      DiskResource, FileResource.
02659 %
02660 %    o The maximum limit for the resource.
02661 %
02662 */
02663 WandExport MagickBooleanType MagickSetResourceLimit(const ResourceType type,
02664   const MagickSizeType limit)
02665 {
02666   return(SetMagickResourceLimit(type,limit));
02667 }
02668 
02669 /*
02670 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02671 %                                                                             %
02672 %                                                                             %
02673 %                                                                             %
02674 %   M a g i c k S e t R e s o l u t i o n                                     %
02675 %                                                                             %
02676 %                                                                             %
02677 %                                                                             %
02678 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02679 %
02680 %  MagickSetResolution() sets the image resolution.
02681 %
02682 %  The format of the MagickSetResolution method is:
02683 %
02684 %      MagickBooleanType MagickSetResolution(MagickWand *wand,
02685 %        const double x_resolution,const doubtl y_resolution)
02686 %
02687 %  A description of each parameter follows:
02688 %
02689 %    o wand: the magick wand.
02690 %
02691 %    o x_resolution: the image x resolution.
02692 %
02693 %    o y_resolution: the image y resolution.
02694 %
02695 */
02696 WandExport MagickBooleanType MagickSetResolution(MagickWand *wand,
02697   const double x_resolution,const double y_resolution)
02698 {
02699   char
02700     density[MaxTextExtent];
02701 
02702   assert(wand != (MagickWand *) NULL);
02703   assert(wand->signature == WandSignature);
02704   if (wand->debug != MagickFalse)
02705     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02706   (void) FormatMagickString(density,MaxTextExtent,"%gx%g",x_resolution,
02707     y_resolution);
02708   (void) CloneString(&wand->image_info->density,density);
02709   return(MagickTrue);
02710 }
02711 
02712 /*
02713 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02714 %                                                                             %
02715 %                                                                             %
02716 %                                                                             %
02717 %   M a g i c k S e t S a m p l i n g F a c t o r s                           %
02718 %                                                                             %
02719 %                                                                             %
02720 %                                                                             %
02721 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02722 %
02723 %  MagickSetSamplingFactors() sets the image sampling factors.
02724 %
02725 %  The format of the MagickSetSamplingFactors method is:
02726 %
02727 %      MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
02728 %        const unsigned long number_factors,const double *sampling_factors)
02729 %
02730 %  A description of each parameter follows:
02731 %
02732 %    o wand: the magick wand.
02733 %
02734 %    o number_factoes: the number of factors.
02735 %
02736 %    o sampling_factors: An array of doubles representing the sampling factor
02737 %      for each color component (in RGB order).
02738 %
02739 */
02740 WandExport MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
02741   const unsigned long number_factors,const double *sampling_factors)
02742 {
02743   char
02744     sampling_factor[MaxTextExtent];
02745 
02746   register long
02747     i;
02748 
02749   assert(wand != (MagickWand *) NULL);
02750   assert(wand->signature == WandSignature);
02751   if (wand->debug != MagickFalse)
02752     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02753   if (wand->image_info->sampling_factor != (char *) NULL)
02754     wand->image_info->sampling_factor=(char *)
02755       RelinquishMagickMemory(wand->image_info->sampling_factor);
02756   if (number_factors == 0)
02757     return(MagickTrue);
02758   for (i=0; i < (long) (number_factors-1); i++)
02759   {
02760     (void) FormatMagickString(sampling_factor,MaxTextExtent,"%g,",
02761       sampling_factors[i]);
02762     (void) ConcatenateString(&wand->image_info->sampling_factor,
02763       sampling_factor);
02764   }
02765   (void) FormatMagickString(sampling_factor,MaxTextExtent,"%g",
02766     sampling_factors[i]);
02767   (void) ConcatenateString(&wand->image_info->sampling_factor,sampling_factor);
02768   return(MagickTrue);
02769 }
02770 
02771 /*
02772 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02773 %                                                                             %
02774 %                                                                             %
02775 %                                                                             %
02776 %   M a g i c k S e t S i z e                                                 %
02777 %                                                                             %
02778 %                                                                             %
02779 %                                                                             %
02780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02781 %
02782 %  MagickSetSize() sets the size of the magick wand.  Set it before you
02783 %  read a raw image format such as RGB, GRAY, or CMYK.
02784 %
02785 %  The format of the MagickSetSize method is:
02786 %
02787 %      MagickBooleanType MagickSetSize(MagickWand *wand,
02788 %        const unsigned long columns,const unsigned long rows)
02789 %
02790 %  A description of each parameter follows:
02791 %
02792 %    o wand: the magick wand.
02793 %
02794 %    o columns: the width in pixels.
02795 %
02796 %    o rows: the rows in pixels.
02797 %
02798 */
02799 WandExport MagickBooleanType MagickSetSize(MagickWand *wand,
02800   const unsigned long columns,const unsigned long rows)
02801 {
02802   char
02803     geometry[MaxTextExtent];
02804 
02805   assert(wand != (MagickWand *) NULL);
02806   assert(wand->signature == WandSignature);
02807   if (wand->debug != MagickFalse)
02808     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02809   (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",columns,rows);
02810   (void) CloneString(&wand->image_info->size,geometry);
02811   return(MagickTrue);
02812 }
02813 
02814 /*
02815 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02816 %                                                                             %
02817 %                                                                             %
02818 %                                                                             %
02819 %   M a g i c k S e t S i z e O f f s e t                                     %
02820 %                                                                             %
02821 %                                                                             %
02822 %                                                                             %
02823 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02824 %
02825 %  MagickSetSizeOffset() sets the size and offset of the magick wand.  Set it
02826 %  before you read a raw image format such as RGB, GRAY, or CMYK.
02827 %
02828 %  The format of the MagickSetSizeOffset method is:
02829 %
02830 %      MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
02831 %        const unsigned long columns,const unsigned long rows,
02832 %        const long offset)
02833 %
02834 %  A description of each parameter follows:
02835 %
02836 %    o wand: the magick wand.
02837 %
02838 %    o columns: the image width in pixels.
02839 %
02840 %    o rows: the image rows in pixels.
02841 %
02842 %    o offset: the image offset.
02843 %
02844 */
02845 WandExport MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
02846   const unsigned long columns,const unsigned long rows,const long offset)
02847 {
02848   char
02849     geometry[MaxTextExtent];
02850 
02851   assert(wand != (MagickWand *) NULL);
02852   assert(wand->signature == WandSignature);
02853   if (wand->debug != MagickFalse)
02854     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02855   (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld",columns,rows,
02856     offset);
02857   (void) CloneString(&wand->image_info->size,geometry);
02858   return(MagickTrue);
02859 }
02860 
02861 /*
02862 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02863 %                                                                             %
02864 %                                                                             %
02865 %                                                                             %
02866 %   M a g i c k S e t T y p e                                                 %
02867 %                                                                             %
02868 %                                                                             %
02869 %                                                                             %
02870 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
02871 %
02872 %  MagickSetType() sets the image type attribute.
02873 %
02874 %  The format of the MagickSetType method is:
02875 %
02876 %      MagickBooleanType MagickSetType(MagickWand *wand,
02877 %        const ImageType image_type)
02878 %
02879 %  A description of each parameter follows:
02880 %
02881 %    o wand: the magick wand.
02882 %
02883 %    o image_type: the image type:   UndefinedType, BilevelType, GrayscaleType,
02884 %      GrayscaleMatteType, PaletteType, PaletteMatteType, TrueColorType,
02885 %      TrueColorMatteType, ColorSeparationType, ColorSeparationMatteType,
02886 %      or OptimizeType.
02887 %
02888 */
02889 WandExport MagickBooleanType MagickSetType(MagickWand *wand,
02890   const ImageType image_type)
02891 {
02892   assert(wand != (MagickWand *) NULL);
02893   assert(wand->signature == WandSignature);
02894   if (wand->debug != MagickFalse)
02895     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
02896   wand->image_info->type=image_type;
02897   return(MagickTrue);
02898 }
Generated by  doxygen 1.6.2-20100208