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

Generated on 19 Nov 2009 for MagickWand by  doxygen 1.6.1