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