2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 % M M AAA GGGG IIIII CCCC K K %
7 % MM MM A A G I C K K %
8 % M M M AAAAA G GGG I C KKK %
9 % M M A A G G I C K K %
10 % M M A A GGGG IIIII CCCC K K %
12 % IIIII M M AAA GGGG EEEEE %
14 % I M M M AAAAA G GG EEE %
16 % IIIII M M A A GGGG EEEEE %
19 % MagickWand Image Methods %
26 % Copyright 1999-2018 ImageMagick Studio LLC, a non-profit organization %
27 % dedicated to making software imaging solutions freely available. %
29 % You may not use this file except in compliance with the License. You may %
30 % obtain a copy of the License at %
32 % https://www.imagemagick.org/script/license.php %
34 % Unless required by applicable law or agreed to in writing, software %
35 % distributed under the License is distributed on an "AS IS" BASIS, %
36 % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %
37 % See the License for the specific language governing permissions and %
38 % limitations under the License. %
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49 #include "MagickWand/studio.h"
50 #include "MagickWand/MagickWand.h"
51 #include "MagickWand/magick-wand-private.h"
52 #include "MagickWand/wand.h"
53 #include "MagickWand/pixel-wand-private.h"
54 #include "MagickCore/image-private.h"
59 #define MagickWandId "MagickWand"
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 + C l o n e M a g i c k W a n d F r o m I m a g e s %
70 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
72 % CloneMagickWandFromImages() clones the magick wand and inserts a new image
75 % The format of the CloneMagickWandFromImages method is:
77 % MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
80 % A description of each parameter follows:
82 % o wand: the magick wand.
84 % o images: replace the image list with these image(s).
87 static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
93 assert(wand != (MagickWand *) NULL);
94 assert(wand->signature == MagickWandSignature);
95 if (wand->debug != MagickFalse)
96 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
97 clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
98 if (clone_wand == (MagickWand *) NULL)
99 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
101 (void) memset(clone_wand,0,sizeof(*clone_wand));
102 clone_wand->id=AcquireWandId();
103 (void) FormatLocaleString(clone_wand->name,MagickPathExtent,"%s-%.20g",
104 MagickWandId,(double) clone_wand->id);
105 clone_wand->exception=AcquireExceptionInfo();
106 InheritException(clone_wand->exception,wand->exception);
107 clone_wand->image_info=CloneImageInfo(wand->image_info);
108 clone_wand->images=images;
109 clone_wand->debug=IsEventLogging();
110 clone_wand->signature=MagickWandSignature;
111 if (clone_wand->debug != MagickFalse)
112 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
117 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
121 % G e t I m a g e F r o m M a g i c k W a n d %
125 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 % GetImageFromMagickWand() returns the current image from the magick wand.
129 % The format of the GetImageFromMagickWand method is:
131 % Image *GetImageFromMagickWand(const MagickWand *wand)
133 % A description of each parameter follows:
135 % o wand: the magick wand.
138 WandExport Image *GetImageFromMagickWand(const MagickWand *wand)
140 assert(wand != (MagickWand *) NULL);
141 assert(wand->signature == MagickWandSignature);
142 if (wand->debug != MagickFalse)
143 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
144 if (wand->images == (Image *) NULL)
146 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
147 "ContainsNoImages","`%s'",wand->name);
148 return((Image *) NULL);
150 return(wand->images);
154 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
158 % M a g i c k A d a p t i v e S h a r p e n I m a g e %
162 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 % MagickAdaptiveBlurImage() adaptively blurs the image by blurring
165 % less intensely near image edges and more intensely far from edges. We
166 % blur the image with a Gaussian operator of the given radius and standard
167 % deviation (sigma). For reasonable results, radius should be larger than
168 % sigma. Use a radius of 0 and MagickAdaptiveBlurImage() selects a
169 % suitable radius for you.
171 % The format of the MagickAdaptiveBlurImage method is:
173 % MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
174 % const double radius,const double sigma)
176 % A description of each parameter follows:
178 % o wand: the magick wand.
180 % o radius: the radius of the Gaussian, in pixels, not counting the center
183 % o sigma: the standard deviation of the Gaussian, in pixels.
186 WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
187 const double radius,const double sigma)
192 assert(wand != (MagickWand *) NULL);
193 assert(wand->signature == MagickWandSignature);
194 if (wand->debug != MagickFalse)
195 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
196 if (wand->images == (Image *) NULL)
197 ThrowWandException(WandError,"ContainsNoImages",wand->name);
198 sharp_image=AdaptiveBlurImage(wand->images,radius,sigma,wand->exception);
199 if (sharp_image == (Image *) NULL)
201 ReplaceImageInList(&wand->images,sharp_image);
206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
210 % M a g i c k A d a p t i v e R e s i z e I m a g e %
214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
216 % MagickAdaptiveResizeImage() adaptively resize image with data dependent
219 % MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
220 % const size_t columns,const size_t rows)
222 % A description of each parameter follows:
224 % o wand: the magick wand.
226 % o columns: the number of columns in the scaled image.
228 % o rows: the number of rows in the scaled image.
231 WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
232 const size_t columns,const size_t rows)
237 assert(wand != (MagickWand *) NULL);
238 assert(wand->signature == MagickWandSignature);
239 if (wand->debug != MagickFalse)
240 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
241 if (wand->images == (Image *) NULL)
242 ThrowWandException(WandError,"ContainsNoImages",wand->name);
243 resize_image=AdaptiveResizeImage(wand->images,columns,rows,wand->exception);
244 if (resize_image == (Image *) NULL)
246 ReplaceImageInList(&wand->images,resize_image);
251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
255 % M a g i c k A d a p t i v e S h a r p e n I m a g e %
259 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
261 % MagickAdaptiveSharpenImage() adaptively sharpens the image by sharpening
262 % more intensely near image edges and less intensely far from edges. We
263 % sharpen the image with a Gaussian operator of the given radius and standard
264 % deviation (sigma). For reasonable results, radius should be larger than
265 % sigma. Use a radius of 0 and MagickAdaptiveSharpenImage() selects a
266 % suitable radius for you.
268 % The format of the MagickAdaptiveSharpenImage method is:
270 % MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
271 % const double radius,const double sigma)
273 % A description of each parameter follows:
275 % o wand: the magick wand.
277 % o radius: the radius of the Gaussian, in pixels, not counting the center
280 % o sigma: the standard deviation of the Gaussian, in pixels.
283 WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
284 const double radius,const double sigma)
289 assert(wand != (MagickWand *) NULL);
290 assert(wand->signature == MagickWandSignature);
291 if (wand->debug != MagickFalse)
292 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
293 if (wand->images == (Image *) NULL)
294 ThrowWandException(WandError,"ContainsNoImages",wand->name);
295 sharp_image=AdaptiveSharpenImage(wand->images,radius,sigma,wand->exception);
296 if (sharp_image == (Image *) NULL)
298 ReplaceImageInList(&wand->images,sharp_image);
303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
307 % M a g i c k A d a p t i v e T h r e s h o l d I m a g e %
311 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
313 % MagickAdaptiveThresholdImage() selects an individual threshold for each pixel
314 % based on the range of intensity values in its local neighborhood. This
315 % allows for thresholding of an image whose global intensity histogram
316 % doesn't contain distinctive peaks.
318 % The format of the AdaptiveThresholdImage method is:
320 % MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
321 % const size_t width,const size_t height,const double bias)
323 % A description of each parameter follows:
325 % o wand: the magick wand.
327 % o width: the width of the local neighborhood.
329 % o height: the height of the local neighborhood.
331 % o offset: the mean bias.
334 WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
335 const size_t width,const size_t height,const double bias)
340 assert(wand != (MagickWand *) NULL);
341 assert(wand->signature == MagickWandSignature);
342 if (wand->debug != MagickFalse)
343 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
344 if (wand->images == (Image *) NULL)
345 ThrowWandException(WandError,"ContainsNoImages",wand->name);
346 threshold_image=AdaptiveThresholdImage(wand->images,width,height,bias,
348 if (threshold_image == (Image *) NULL)
350 ReplaceImageInList(&wand->images,threshold_image);
355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
359 % M a g i c k A d d I m a g e %
363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
365 % MagickAddImage() adds a clone of the images from the second wand and
366 % inserts them into the first wand.
368 % Use MagickSetLastIterator(), to append new images into an existing wand,
369 % current image will be set to last image so later adds with also be
370 % appened to end of wand.
372 % Use MagickSetFirstIterator() to prepend new images into wand, any more
373 % images added will also be prepended before other images in the wand.
374 % However the order of a list of new images will not change.
376 % Otherwise the new images will be inserted just after the current image,
377 % and any later image will also be added after this current image but
378 % before the previously added images. Caution is advised when multiple
379 % image adds are inserted into the middle of the wand image list.
381 % The format of the MagickAddImage method is:
383 % MagickBooleanType MagickAddImage(MagickWand *wand,
384 % const MagickWand *add_wand)
386 % A description of each parameter follows:
388 % o wand: the magick wand.
390 % o add_wand: A wand that contains the image list to be added
393 static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
396 if (wand->images == (Image *) NULL)
399 No images in wand, just add them, set current as appropriate.
401 if (wand->insert_before != MagickFalse)
402 wand->images=GetFirstImageInList(images);
404 wand->images=GetLastImageInList(images);
407 /* user jumped to first image, so prepend new images - remain active */
408 if ((wand->insert_before != MagickFalse) &&
409 (wand->images->previous == (Image *) NULL))
411 PrependImageToList(&wand->images,images);
412 wand->images=GetFirstImageInList(images);
416 Note you should never have 'insert_before' true when current image is not
417 the first image in the wand! That is no insert before current image, only
420 if (wand->images->next == (Image *) NULL)
423 At last image, append new images.
425 InsertImageInList(&wand->images,images);
426 wand->images=GetLastImageInList(images);
430 Insert new images, just after the current image.
432 InsertImageInList(&wand->images,images);
436 WandExport MagickBooleanType MagickAddImage(MagickWand *wand,
437 const MagickWand *add_wand)
442 assert(wand != (MagickWand *) NULL);
443 assert(wand->signature == MagickWandSignature);
444 if (wand->debug != MagickFalse)
445 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
446 assert(add_wand != (MagickWand *) NULL);
447 assert(add_wand->signature == MagickWandSignature);
448 if (add_wand->images == (Image *) NULL)
449 ThrowWandException(WandError,"ContainsNoImages",add_wand->name);
451 Clone images in second wand, and insert into first.
453 images=CloneImageList(add_wand->images,wand->exception);
454 if (images == (Image *) NULL)
456 return(InsertImageInWand(wand,images));
460 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
464 % M a g i c k A d d N o i s e I m a g e %
468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
470 % MagickAddNoiseImage() adds random noise to the image.
472 % The format of the MagickAddNoiseImage method is:
474 % MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
475 % const NoiseType noise_type,const double attenuate)
477 % A description of each parameter follows:
479 % o wand: the magick wand.
481 % o noise_type: The type of noise: Uniform, Gaussian, Multiplicative,
482 % Impulse, Laplacian, or Poisson.
484 % o attenuate: attenuate the random distribution.
487 WandExport MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
488 const NoiseType noise_type,const double attenuate)
493 assert(wand != (MagickWand *) NULL);
494 assert(wand->signature == MagickWandSignature);
495 if (wand->debug != MagickFalse)
496 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
497 if (wand->images == (Image *) NULL)
498 ThrowWandException(WandError,"ContainsNoImages",wand->name);
499 noise_image=AddNoiseImage(wand->images,noise_type,attenuate,wand->exception);
500 if (noise_image == (Image *) NULL)
502 ReplaceImageInList(&wand->images,noise_image);
507 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
511 % M a g i c k A f f i n e T r a n s f o r m I m a g e %
515 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
517 % MagickAffineTransformImage() transforms an image as dictated by the affine
518 % matrix of the drawing wand.
520 % The format of the MagickAffineTransformImage method is:
522 % MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
523 % const DrawingWand *drawing_wand)
525 % A description of each parameter follows:
527 % o wand: the magick wand.
529 % o drawing_wand: the draw wand.
532 WandExport MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
533 const DrawingWand *drawing_wand)
541 assert(wand != (MagickWand *) NULL);
542 assert(wand->signature == MagickWandSignature);
543 if (wand->debug != MagickFalse)
544 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
545 if (wand->images == (Image *) NULL)
546 ThrowWandException(WandError,"ContainsNoImages",wand->name);
547 draw_info=PeekDrawingWand(drawing_wand);
548 if (draw_info == (DrawInfo *) NULL)
550 affine_image=AffineTransformImage(wand->images,&draw_info->affine,
552 draw_info=DestroyDrawInfo(draw_info);
553 if (affine_image == (Image *) NULL)
555 ReplaceImageInList(&wand->images,affine_image);
560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
564 % M a g i c k A n n o t a t e I m a g e %
568 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
570 % MagickAnnotateImage() annotates an image with text.
572 % The format of the MagickAnnotateImage method is:
574 % MagickBooleanType MagickAnnotateImage(MagickWand *wand,
575 % const DrawingWand *drawing_wand,const double x,const double y,
576 % const double angle,const char *text)
578 % A description of each parameter follows:
580 % o wand: the magick wand.
582 % o drawing_wand: the draw wand.
584 % o x: x ordinate to left of text
586 % o y: y ordinate to text baseline
588 % o angle: rotate text relative to this angle.
590 % o text: text to draw
593 WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand,
594 const DrawingWand *drawing_wand,const double x,const double y,
595 const double angle,const char *text)
598 geometry[MagickPathExtent];
606 assert(wand != (MagickWand *) NULL);
607 assert(wand->signature == MagickWandSignature);
608 if (wand->debug != MagickFalse)
609 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
610 if (wand->images == (Image *) NULL)
611 ThrowWandException(WandError,"ContainsNoImages",wand->name);
612 draw_info=PeekDrawingWand(drawing_wand);
613 if (draw_info == (DrawInfo *) NULL)
615 (void) CloneString(&draw_info->text,text);
616 (void) FormatLocaleString(geometry,MagickPathExtent,"%+g%+g",x,y);
617 draw_info->affine.sx=cos((double) DegreesToRadians(fmod(angle,360.0)));
618 draw_info->affine.rx=sin((double) DegreesToRadians(fmod(angle,360.0)));
619 draw_info->affine.ry=(-sin((double) DegreesToRadians(fmod(angle,360.0))));
620 draw_info->affine.sy=cos((double) DegreesToRadians(fmod(angle,360.0)));
621 (void) CloneString(&draw_info->geometry,geometry);
622 status=AnnotateImage(wand->images,draw_info,wand->exception);
623 draw_info=DestroyDrawInfo(draw_info);
628 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
632 % M a g i c k A n i m a t e I m a g e s %
636 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
638 % MagickAnimateImages() animates an image or image sequence.
640 % The format of the MagickAnimateImages method is:
642 % MagickBooleanType MagickAnimateImages(MagickWand *wand,
643 % const char *server_name)
645 % A description of each parameter follows:
647 % o wand: the magick wand.
649 % o server_name: the X server name.
652 WandExport MagickBooleanType MagickAnimateImages(MagickWand *wand,
653 const char *server_name)
658 assert(wand != (MagickWand *) NULL);
659 assert(wand->signature == MagickWandSignature);
660 if (wand->debug != MagickFalse)
661 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
662 (void) CloneString(&wand->image_info->server_name,server_name);
663 status=AnimateImages(wand->image_info,wand->images,wand->exception);
668 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672 % M a g i c k A p p e n d I m a g e s %
676 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
678 % MagickAppendImages() append the images in a wand from the current image
679 % onwards, creating a new wand with the single image result. This is
680 % affected by the gravity and background settings of the first image.
682 % Typically you would call either MagickResetIterator() or
683 % MagickSetFirstImage() before calling this function to ensure that all
684 % the images in the wand's image list will be appended together.
686 % The format of the MagickAppendImages method is:
688 % MagickWand *MagickAppendImages(MagickWand *wand,
689 % const MagickBooleanType stack)
691 % A description of each parameter follows:
693 % o wand: the magick wand.
695 % o stack: By default, images are stacked left-to-right. Set stack to
696 % MagickTrue to stack them top-to-bottom.
699 WandExport MagickWand *MagickAppendImages(MagickWand *wand,
700 const MagickBooleanType stack)
705 assert(wand != (MagickWand *) NULL);
706 assert(wand->signature == MagickWandSignature);
707 if (wand->debug != MagickFalse)
708 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
709 if (wand->images == (Image *) NULL)
710 return((MagickWand *) NULL);
711 append_image=AppendImages(wand->images,stack,wand->exception);
712 if (append_image == (Image *) NULL)
713 return((MagickWand *) NULL);
714 return(CloneMagickWandFromImages(wand,append_image));
718 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
722 % M a g i c k A u t o G a m m a I m a g e %
726 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
728 % MagickAutoGammaImage() extracts the 'mean' from the image and adjust the
729 % image to try make set its gamma appropriatally.
731 % The format of the MagickAutoGammaImage method is:
733 % MagickBooleanType MagickAutoGammaImage(MagickWand *wand)
735 % A description of each parameter follows:
737 % o wand: the magick wand.
740 WandExport MagickBooleanType MagickAutoGammaImage(MagickWand *wand)
745 assert(wand != (MagickWand *) NULL);
746 assert(wand->signature == MagickWandSignature);
747 if (wand->debug != MagickFalse)
748 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
749 if (wand->images == (Image *) NULL)
750 ThrowWandException(WandError,"ContainsNoImages",wand->name);
751 status=AutoGammaImage(wand->images,wand->exception);
756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
760 % M a g i c k A u t o L e v e l I m a g e %
764 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
766 % MagickAutoLevelImage() adjusts the levels of a particular image channel by
767 % scaling the minimum and maximum values to the full quantum range.
769 % The format of the MagickAutoLevelImage method is:
771 % MagickBooleanType MagickAutoLevelImage(MagickWand *wand)
773 % A description of each parameter follows:
775 % o wand: the magick wand.
778 WandExport MagickBooleanType MagickAutoLevelImage(MagickWand *wand)
783 assert(wand != (MagickWand *) NULL);
784 assert(wand->signature == MagickWandSignature);
785 if (wand->debug != MagickFalse)
786 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
787 if (wand->images == (Image *) NULL)
788 ThrowWandException(WandError,"ContainsNoImages",wand->name);
789 status=AutoLevelImage(wand->images,wand->exception);
794 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
798 % M a g i c k A u t o O r i e n t I m a g e %
802 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
804 % MagickAutoOrientImage() adjusts an image so that its orientation is suitable
805 $ for viewing (i.e. top-left orientation).
807 % The format of the MagickAutoOrientImage method is:
809 % MagickBooleanType MagickAutoOrientImage(MagickWand *image)
811 % A description of each parameter follows:
813 % o wand: the magick wand.
816 WandExport MagickBooleanType MagickAutoOrientImage(MagickWand *wand)
822 assert(wand != (MagickWand *) NULL);
823 assert(wand->signature == MagickWandSignature);
824 if (wand->debug != MagickFalse)
825 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
826 if (wand->images == (Image *) NULL)
827 ThrowWandException(WandError,"ContainsNoImages",wand->name);
828 orient_image=AutoOrientImage(wand->images,wand->images->orientation,
830 if (orient_image == (Image *) NULL)
832 ReplaceImageInList(&wand->images,orient_image);
837 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
841 % M a g i c k B l a c k T h r e s h o l d I m a g e %
845 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
847 % MagickBlackThresholdImage() is like MagickThresholdImage() but forces all
848 % pixels below the threshold into black while leaving all pixels above the
849 % threshold unchanged.
851 % The format of the MagickBlackThresholdImage method is:
853 % MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
854 % const PixelWand *threshold)
856 % A description of each parameter follows:
858 % o wand: the magick wand.
860 % o threshold: the pixel wand.
863 WandExport MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
864 const PixelWand *threshold)
867 thresholds[MagickPathExtent];
872 assert(wand != (MagickWand *) NULL);
873 assert(wand->signature == MagickWandSignature);
874 if (wand->debug != MagickFalse)
875 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
876 if (wand->images == (Image *) NULL)
877 ThrowWandException(WandError,"ContainsNoImages",wand->name);
878 (void) FormatLocaleString(thresholds,MagickPathExtent,
879 QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
880 PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
881 PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
882 status=BlackThresholdImage(wand->images,thresholds,wand->exception);
887 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
891 % M a g i c k B l u e S h i f t I m a g e %
895 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
897 % MagickBlueShiftImage() mutes the colors of the image to simulate a scene at
898 % nighttime in the moonlight.
900 % The format of the MagickBlueShiftImage method is:
902 % MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
903 % const double factor)
905 % A description of each parameter follows:
907 % o wand: the magick wand.
909 % o factor: the blue shift factor (default 1.5)
912 WandExport MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
918 assert(wand != (MagickWand *) NULL);
919 assert(wand->signature == MagickWandSignature);
920 if (wand->debug != MagickFalse)
921 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
922 if (wand->images == (Image *) NULL)
923 ThrowWandException(WandError,"ContainsNoImages",wand->name);
924 shift_image=BlueShiftImage(wand->images,factor,wand->exception);
925 if (shift_image == (Image *) NULL)
927 ReplaceImageInList(&wand->images,shift_image);
932 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
936 % M a g i c k B l u r I m a g e %
940 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
942 % MagickBlurImage() blurs an image. We convolve the image with a
943 % gaussian operator of the given radius and standard deviation (sigma).
944 % For reasonable results, the radius should be larger than sigma. Use a
945 % radius of 0 and BlurImage() selects a suitable radius for you.
947 % The format of the MagickBlurImage method is:
949 % MagickBooleanType MagickBlurImage(MagickWand *wand,const double radius,
950 % const double sigma)
952 % A description of each parameter follows:
954 % o wand: the magick wand.
956 % o radius: the radius of the , in pixels, not counting the center
959 % o sigma: the standard deviation of the , in pixels.
962 WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
963 const double radius,const double sigma)
968 assert(wand != (MagickWand *) NULL);
969 assert(wand->signature == MagickWandSignature);
970 if (wand->debug != MagickFalse)
971 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
972 if (wand->images == (Image *) NULL)
973 ThrowWandException(WandError,"ContainsNoImages",wand->name);
974 blur_image=BlurImage(wand->images,radius,sigma,wand->exception);
975 if (blur_image == (Image *) NULL)
977 ReplaceImageInList(&wand->images,blur_image);
982 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
986 % M a g i c k B o r d e r I m a g e %
990 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
992 % MagickBorderImage() surrounds the image with a border of the color defined
993 % by the bordercolor pixel wand.
995 % The format of the MagickBorderImage method is:
997 % MagickBooleanType MagickBorderImage(MagickWand *wand,
998 % const PixelWand *bordercolor,const size_t width,
999 % const size_t height,const CompositeOperator compose)
1001 % A description of each parameter follows:
1003 % o wand: the magick wand.
1005 % o bordercolor: the border color pixel wand.
1007 % o width: the border width.
1009 % o height: the border height.
1011 % o compose: the composite operator.
1014 WandExport MagickBooleanType MagickBorderImage(MagickWand *wand,
1015 const PixelWand *bordercolor,const size_t width,const size_t height,
1016 const CompositeOperator compose)
1024 assert(wand != (MagickWand *) NULL);
1025 assert(wand->signature == MagickWandSignature);
1026 if (wand->debug != MagickFalse)
1027 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1028 if (wand->images == (Image *) NULL)
1029 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1030 border_info.width=width;
1031 border_info.height=height;
1034 PixelGetQuantumPacket(bordercolor,&wand->images->border_color);
1035 border_image=BorderImage(wand->images,&border_info,compose,wand->exception);
1036 if (border_image == (Image *) NULL)
1037 return(MagickFalse);
1038 ReplaceImageInList(&wand->images,border_image);
1043 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1047 % M a g i c k B r i g h t n e s s C o n t r a s t S t r e t c h I m a g e %
1051 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1053 % Use MagickBrightnessContrastImage() to change the brightness and/or contrast
1054 % of an image. It converts the brightness and contrast parameters into slope
1055 % and intercept and calls a polynomical function to apply to the image.
1058 % The format of the MagickBrightnessContrastImage method is:
1060 % MagickBooleanType MagickBrightnessContrastImage(MagickWand *wand,
1061 % const double brightness,const double contrast)
1063 % A description of each parameter follows:
1065 % o wand: the magick wand.
1067 % o brightness: the brightness percent (-100 .. 100).
1069 % o contrast: the contrast percent (-100 .. 100).
1072 WandExport MagickBooleanType MagickBrightnessContrastImage(
1073 MagickWand *wand,const double brightness,const double contrast)
1078 assert(wand != (MagickWand *) NULL);
1079 assert(wand->signature == MagickWandSignature);
1080 if (wand->debug != MagickFalse)
1081 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1082 if (wand->images == (Image *) NULL)
1083 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1084 status=BrightnessContrastImage(wand->images,brightness,contrast,
1090 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1094 % M a g i c k C h a n n e l F x I m a g e %
1098 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1100 % MagickChannelFxImage() applies a channel expression to the specified image.
1101 % The expression consists of one or more channels, either mnemonic or numeric
1102 % (e.g. red, 1), separated by actions as follows:
1104 % <=> exchange two channels (e.g. red<=>blue)
1105 % => transfer a channel to another (e.g. red=>green)
1106 % , separate channel operations (e.g. red, green)
1107 % | read channels from next input image (e.g. red | green)
1108 % ; write channels to next output image (e.g. red; green; blue)
1110 % A channel without a operation symbol implies extract. For example, to create
1111 % 3 grayscale images from the red, green, and blue channels of an image, use:
1113 % -channel-fx "red; green; blue"
1115 % The format of the MagickChannelFxImage method is:
1117 % MagickWand *MagickChannelFxImage(MagickWand *wand,const char *expression)
1119 % A description of each parameter follows:
1121 % o wand: the magick wand.
1123 % o expression: the expression.
1126 WandExport MagickWand *MagickChannelFxImage(MagickWand *wand,
1127 const char *expression)
1132 assert(wand != (MagickWand *) NULL);
1133 assert(wand->signature == MagickWandSignature);
1134 if (wand->debug != MagickFalse)
1135 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1136 if (wand->images == (Image *) NULL)
1137 return((MagickWand *) NULL);
1138 fx_image=ChannelFxImage(wand->images,expression,wand->exception);
1139 if (fx_image == (Image *) NULL)
1140 return((MagickWand *) NULL);
1141 return(CloneMagickWandFromImages(wand,fx_image));
1145 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1149 % M a g i c k C h a r c o a l I m a g e %
1153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1155 % MagickCharcoalImage() simulates a charcoal drawing.
1157 % The format of the MagickCharcoalImage method is:
1159 % MagickBooleanType MagickCharcoalImage(MagickWand *wand,
1160 % const double radius,const double sigma)
1162 % A description of each parameter follows:
1164 % o wand: the magick wand.
1166 % o radius: the radius of the Gaussian, in pixels, not counting the center
1169 % o sigma: the standard deviation of the Gaussian, in pixels.
1172 WandExport MagickBooleanType MagickCharcoalImage(MagickWand *wand,
1173 const double radius,const double sigma)
1178 assert(wand != (MagickWand *) NULL);
1179 assert(wand->signature == MagickWandSignature);
1180 if (wand->debug != MagickFalse)
1181 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1182 if (wand->images == (Image *) NULL)
1183 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1184 charcoal_image=CharcoalImage(wand->images,radius,sigma,wand->exception);
1185 if (charcoal_image == (Image *) NULL)
1186 return(MagickFalse);
1187 ReplaceImageInList(&wand->images,charcoal_image);
1192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1196 % M a g i c k C h o p I m a g e %
1200 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1202 % MagickChopImage() removes a region of an image and collapses the image to
1203 % occupy the removed portion
1205 % The format of the MagickChopImage method is:
1207 % MagickBooleanType MagickChopImage(MagickWand *wand,
1208 % const size_t width,const size_t height,const ssize_t x,
1211 % A description of each parameter follows:
1213 % o wand: the magick wand.
1215 % o width: the region width.
1217 % o height: the region height.
1219 % o x: the region x offset.
1221 % o y: the region y offset.
1225 WandExport MagickBooleanType MagickChopImage(MagickWand *wand,
1226 const size_t width,const size_t height,const ssize_t x,
1235 assert(wand != (MagickWand *) NULL);
1236 assert(wand->signature == MagickWandSignature);
1237 if (wand->debug != MagickFalse)
1238 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1239 if (wand->images == (Image *) NULL)
1240 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1245 chop_image=ChopImage(wand->images,&chop,wand->exception);
1246 if (chop_image == (Image *) NULL)
1247 return(MagickFalse);
1248 ReplaceImageInList(&wand->images,chop_image);
1253 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1257 % M a g i c k C l a m p I m a g e %
1261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1263 % MagickClampImage() restricts the color range from 0 to the quantum depth.
1265 % The format of the MagickClampImage method is:
1267 % MagickBooleanType MagickClampImage(MagickWand *wand)
1269 % A description of each parameter follows:
1271 % o wand: the magick wand.
1273 % o channel: the channel.
1276 WandExport MagickBooleanType MagickClampImage(MagickWand *wand)
1278 assert(wand != (MagickWand *) NULL);
1279 assert(wand->signature == MagickWandSignature);
1280 if (wand->debug != MagickFalse)
1281 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1282 if (wand->images == (Image *) NULL)
1283 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1284 return(ClampImage(wand->images,wand->exception));
1288 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1292 % M a g i c k C l i p I m a g e %
1296 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1298 % MagickClipImage() clips along the first path from the 8BIM profile, if
1301 % The format of the MagickClipImage method is:
1303 % MagickBooleanType MagickClipImage(MagickWand *wand)
1305 % A description of each parameter follows:
1307 % o wand: the magick wand.
1310 WandExport MagickBooleanType MagickClipImage(MagickWand *wand)
1315 assert(wand != (MagickWand *) NULL);
1316 assert(wand->signature == MagickWandSignature);
1317 if (wand->debug != MagickFalse)
1318 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1319 if (wand->images == (Image *) NULL)
1320 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1321 status=ClipImage(wand->images,wand->exception);
1326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1330 % M a g i c k C l i p I m a g e P a t h %
1334 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1336 % MagickClipImagePath() clips along the named paths from the 8BIM profile, if
1337 % present. Later operations take effect inside the path. Id may be a number
1338 % if preceded with #, to work on a numbered path, e.g., "#1" to use the first
1341 % The format of the MagickClipImagePath method is:
1343 % MagickBooleanType MagickClipImagePath(MagickWand *wand,
1344 % const char *pathname,const MagickBooleanType inside)
1346 % A description of each parameter follows:
1348 % o wand: the magick wand.
1350 % o pathname: name of clipping path resource. If name is preceded by #, use
1351 % clipping path numbered by name.
1353 % o inside: if non-zero, later operations take effect inside clipping path.
1354 % Otherwise later operations take effect outside clipping path.
1357 WandExport MagickBooleanType MagickClipImagePath(MagickWand *wand,
1358 const char *pathname,const MagickBooleanType inside)
1363 assert(wand != (MagickWand *) NULL);
1364 assert(wand->signature == MagickWandSignature);
1365 if (wand->debug != MagickFalse)
1366 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1367 if (wand->images == (Image *) NULL)
1368 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1369 status=ClipImagePath(wand->images,pathname,inside,wand->exception);
1374 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1378 % M a g i c k C l u t I m a g e %
1382 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1384 % MagickClutImage() replaces colors in the image from a color lookup table.
1386 % The format of the MagickClutImage method is:
1388 % MagickBooleanType MagickClutImage(MagickWand *wand,
1389 % const MagickWand *clut_wand,const PixelInterpolateMethod method)
1391 % A description of each parameter follows:
1393 % o wand: the magick wand.
1395 % o clut_image: the clut image.
1397 % o method: the pixel interpolation method.
1400 WandExport MagickBooleanType MagickClutImage(MagickWand *wand,
1401 const MagickWand *clut_wand,const PixelInterpolateMethod method)
1406 assert(wand != (MagickWand *) NULL);
1407 assert(wand->signature == MagickWandSignature);
1408 if (wand->debug != MagickFalse)
1409 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1410 if ((wand->images == (Image *) NULL) || (clut_wand->images == (Image *) NULL))
1411 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1412 status=ClutImage(wand->images,clut_wand->images,method,wand->exception);
1417 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1421 % M a g i c k C o a l e s c e I m a g e s %
1425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1427 % MagickCoalesceImages() composites a set of images while respecting any page
1428 % offsets and disposal methods. GIF, MIFF, and MNG animation sequences
1429 % typically start with an image background and each subsequent image
1430 % varies in size and offset. MagickCoalesceImages() returns a new sequence
1431 % where each image in the sequence is the same size as the first and
1432 % composited with the next image in the sequence.
1434 % The format of the MagickCoalesceImages method is:
1436 % MagickWand *MagickCoalesceImages(MagickWand *wand)
1438 % A description of each parameter follows:
1440 % o wand: the magick wand.
1443 WandExport MagickWand *MagickCoalesceImages(MagickWand *wand)
1448 assert(wand != (MagickWand *) NULL);
1449 assert(wand->signature == MagickWandSignature);
1450 if (wand->debug != MagickFalse)
1451 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1452 if (wand->images == (Image *) NULL)
1453 return((MagickWand *) NULL);
1454 coalesce_image=CoalesceImages(wand->images,wand->exception);
1455 if (coalesce_image == (Image *) NULL)
1456 return((MagickWand *) NULL);
1457 return(CloneMagickWandFromImages(wand,coalesce_image));
1461 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1465 % M a g i c k C o l o r D e c i s i o n I m a g e %
1469 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1471 % MagickColorDecisionListImage() accepts a lightweight Color Correction
1472 % Collection (CCC) file which solely contains one or more color corrections
1473 % and applies the color correction to the image. Here is a sample CCC file:
1475 % <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
1476 % <ColorCorrection id="cc03345">
1478 % <Slope> 0.9 1.2 0.5 </Slope>
1479 % <Offset> 0.4 -0.5 0.6 </Offset>
1480 % <Power> 1.0 0.8 1.5 </Power>
1483 % <Saturation> 0.85 </Saturation>
1485 % </ColorCorrection>
1486 % </ColorCorrectionCollection>
1488 % which includes the offset, slope, and power for each of the RGB channels
1489 % as well as the saturation.
1491 % The format of the MagickColorDecisionListImage method is:
1493 % MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
1494 % const char *color_correction_collection)
1496 % A description of each parameter follows:
1498 % o wand: the magick wand.
1500 % o color_correction_collection: the color correction collection in XML.
1503 WandExport MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
1504 const char *color_correction_collection)
1509 assert(wand != (MagickWand *) NULL);
1510 assert(wand->signature == MagickWandSignature);
1511 if (wand->debug != MagickFalse)
1512 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1513 if (wand->images == (Image *) NULL)
1514 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1515 status=ColorDecisionListImage(wand->images,color_correction_collection,
1521 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1525 % M a g i c k C o l o r i z e I m a g e %
1529 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1531 % MagickColorizeImage() blends the fill color with each pixel in the image.
1533 % The format of the MagickColorizeImage method is:
1535 % MagickBooleanType MagickColorizeImage(MagickWand *wand,
1536 % const PixelWand *colorize,const PixelWand *blend)
1538 % A description of each parameter follows:
1540 % o wand: the magick wand.
1542 % o colorize: the colorize pixel wand.
1544 % o alpha: the alpha pixel wand.
1547 WandExport MagickBooleanType MagickColorizeImage(MagickWand *wand,
1548 const PixelWand *colorize,const PixelWand *blend)
1551 percent_blend[MagickPathExtent];
1559 assert(wand != (MagickWand *) NULL);
1560 assert(wand->signature == MagickWandSignature);
1561 if (wand->debug != MagickFalse)
1562 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1563 if (wand->images == (Image *) NULL)
1564 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1565 GetPixelInfo(wand->images,&target);
1566 if (target.colorspace != CMYKColorspace)
1567 (void) FormatLocaleString(percent_blend,MagickPathExtent,
1568 "%g,%g,%g,%g",(double) (100.0*QuantumScale*
1569 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
1570 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
1571 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
1572 PixelGetAlphaQuantum(blend)));
1574 (void) FormatLocaleString(percent_blend,MagickPathExtent,
1575 "%g,%g,%g,%g,%g",(double) (100.0*QuantumScale*
1576 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
1577 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
1578 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
1579 PixelGetBlackQuantum(blend)),(double) (100.0*QuantumScale*
1580 PixelGetAlphaQuantum(blend)));
1581 target=PixelGetPixel(colorize);
1582 colorize_image=ColorizeImage(wand->images,percent_blend,&target,
1584 if (colorize_image == (Image *) NULL)
1585 return(MagickFalse);
1586 ReplaceImageInList(&wand->images,colorize_image);
1591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1595 % M a g i c k C o l o r M a t r i x I m a g e %
1599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1601 % MagickColorMatrixImage() apply color transformation to an image. The method
1602 % permits saturation changes, hue rotation, luminance to alpha, and various
1603 % other effects. Although variable-sized transformation matrices can be used,
1604 % typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA
1605 % (or RGBA with offsets). The matrix is similar to those used by Adobe Flash
1606 % except offsets are in column 6 rather than 5 (in support of CMYKA images)
1607 % and offsets are normalized (divide Flash offset by 255).
1609 % The format of the MagickColorMatrixImage method is:
1611 % MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
1612 % const KernelInfo *color_matrix)
1614 % A description of each parameter follows:
1616 % o wand: the magick wand.
1618 % o color_matrix: the color matrix.
1621 WandExport MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
1622 const KernelInfo *color_matrix)
1627 assert(wand != (MagickWand *) NULL);
1628 assert(wand->signature == MagickWandSignature);
1629 if (wand->debug != MagickFalse)
1630 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1631 if (color_matrix == (const KernelInfo *) NULL)
1632 return(MagickFalse);
1633 if (wand->images == (Image *) NULL)
1634 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1635 color_image=ColorMatrixImage(wand->images,color_matrix,wand->exception);
1636 if (color_image == (Image *) NULL)
1637 return(MagickFalse);
1638 ReplaceImageInList(&wand->images,color_image);
1643 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1647 % M a g i c k C o m b i n e I m a g e s %
1651 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1653 % MagickCombineImages() combines one or more images into a single image. The
1654 % grayscale value of the pixels of each image in the sequence is assigned in
1655 % order to the specified hannels of the combined image. The typical
1656 % ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.
1658 % The format of the MagickCombineImages method is:
1660 % MagickWand *MagickCombineImages(MagickWand *wand,
1661 % const ColorspaceType colorspace)
1663 % A description of each parameter follows:
1665 % o wand: the magick wand.
1667 % o colorspace: the colorspace.
1670 WandExport MagickWand *MagickCombineImages(MagickWand *wand,
1671 const ColorspaceType colorspace)
1676 assert(wand != (MagickWand *) NULL);
1677 assert(wand->signature == MagickWandSignature);
1678 if (wand->debug != MagickFalse)
1679 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1680 if (wand->images == (Image *) NULL)
1681 return((MagickWand *) NULL);
1682 combine_image=CombineImages(wand->images,colorspace,wand->exception);
1683 if (combine_image == (Image *) NULL)
1684 return((MagickWand *) NULL);
1685 return(CloneMagickWandFromImages(wand,combine_image));
1689 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1693 % M a g i c k C o m m e n t I m a g e %
1697 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1699 % MagickCommentImage() adds a comment to your image.
1701 % The format of the MagickCommentImage method is:
1703 % MagickBooleanType MagickCommentImage(MagickWand *wand,
1704 % const char *comment)
1706 % A description of each parameter follows:
1708 % o wand: the magick wand.
1710 % o comment: the image comment.
1713 WandExport MagickBooleanType MagickCommentImage(MagickWand *wand,
1714 const char *comment)
1719 assert(wand != (MagickWand *) NULL);
1720 assert(wand->signature == MagickWandSignature);
1721 if (wand->debug != MagickFalse)
1722 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1723 if (wand->images == (Image *) NULL)
1724 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1725 status=SetImageProperty(wand->images,"comment",comment,wand->exception);
1730 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1734 % M a g i c k C o m p a r e I m a g e L a y e r s %
1738 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1740 % MagickCompareImagesLayers() compares each image with the next in a sequence
1741 % and returns the maximum bounding region of any pixel differences it
1744 % The format of the MagickCompareImagesLayers method is:
1746 % MagickWand *MagickCompareImagesLayers(MagickWand *wand,
1747 % const LayerMethod method)
1749 % A description of each parameter follows:
1751 % o wand: the magick wand.
1753 % o method: the compare method.
1756 WandExport MagickWand *MagickCompareImagesLayers(MagickWand *wand,
1757 const LayerMethod method)
1762 assert(wand != (MagickWand *) NULL);
1763 assert(wand->signature == MagickWandSignature);
1764 if (wand->debug != MagickFalse)
1765 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1766 if (wand->images == (Image *) NULL)
1767 return((MagickWand *) NULL);
1768 layers_image=CompareImagesLayers(wand->images,method,wand->exception);
1769 if (layers_image == (Image *) NULL)
1770 return((MagickWand *) NULL);
1771 return(CloneMagickWandFromImages(wand,layers_image));
1775 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1779 % M a g i c k C o m p a r e I m a g e s %
1783 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1785 % MagickCompareImages() compares an image to a reconstructed image and returns
1786 % the specified difference image.
1788 % The format of the MagickCompareImages method is:
1790 % MagickWand *MagickCompareImages(MagickWand *wand,
1791 % const MagickWand *reference,const MetricType metric,
1792 % double *distortion)
1794 % A description of each parameter follows:
1796 % o wand: the magick wand.
1798 % o reference: the reference wand.
1800 % o metric: the metric.
1802 % o distortion: the computed distortion between the images.
1805 WandExport MagickWand *MagickCompareImages(MagickWand *wand,
1806 const MagickWand *reference,const MetricType metric,double *distortion)
1812 assert(wand != (MagickWand *) NULL);
1813 assert(wand->signature == MagickWandSignature);
1814 if (wand->debug != MagickFalse)
1815 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1816 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
1818 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
1819 "ContainsNoImages","`%s'",wand->name);
1820 return((MagickWand *) NULL);
1822 compare_image=CompareImages(wand->images,reference->images,metric,distortion,
1824 if (compare_image == (Image *) NULL)
1825 return((MagickWand *) NULL);
1826 return(CloneMagickWandFromImages(wand,compare_image));
1830 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1834 % M a g i c k C o m p o s i t e I m a g e %
1838 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1840 % MagickCompositeImage() composite one image onto another at the specified
1843 % The format of the MagickCompositeImage method is:
1845 % MagickBooleanType MagickCompositeImage(MagickWand *wand,
1846 % const MagickWand *source_wand,const CompositeOperator compose,
1847 % const MagickBooleanType clip_to_self,const ssize_t x,const ssize_t y)
1849 % A description of each parameter follows:
1851 % o wand: the magick wand holding the destination images
1853 % o source_image: the magick wand holding source image.
1855 % o compose: This operator affects how the composite is applied to the
1856 % image. The default is Over. These are some of the compose methods
1859 % OverCompositeOp InCompositeOp OutCompositeOp
1860 % AtopCompositeOp XorCompositeOp PlusCompositeOp
1861 % MinusCompositeOp AddCompositeOp SubtractCompositeOp
1862 % DifferenceCompositeOp BumpmapCompositeOp CopyCompositeOp
1863 % DisplaceCompositeOp
1865 % o clip_to_self: set to MagickTrue to limit composition to area composed.
1867 % o x: the column offset of the composited image.
1869 % o y: the row offset of the composited image.
1872 WandExport MagickBooleanType MagickCompositeImage(MagickWand *wand,
1873 const MagickWand *source_wand,const CompositeOperator compose,
1874 const MagickBooleanType clip_to_self,const ssize_t x,const ssize_t y)
1879 assert(wand != (MagickWand *) NULL);
1880 assert(wand->signature == MagickWandSignature);
1881 if (wand->debug != MagickFalse)
1882 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1883 if ((wand->images == (Image *) NULL) ||
1884 (source_wand->images == (Image *) NULL))
1885 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1886 status=CompositeImage(wand->images,source_wand->images,compose,clip_to_self,
1887 x,y,wand->exception);
1892 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1896 % M a g i c k C o m p o s i t e I m a g e G r a v i t y %
1900 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1902 % MagickCompositeImageGravity() composite one image onto another using the
1903 % specified gravity.
1905 % The format of the MagickCompositeImageGravity method is:
1907 % MagickBooleanType MagickCompositeImageGravity(MagickWand *wand,
1908 % const MagickWand *source_wand,const CompositeOperator compose,
1909 % const GravityType gravity)
1911 % A description of each parameter follows:
1913 % o wand: the magick wand holding the destination images
1915 % o source_image: the magick wand holding source image.
1917 % o compose: This operator affects how the composite is applied to the
1918 % image. The default is Over. These are some of the compose methods
1921 % OverCompositeOp InCompositeOp OutCompositeOp
1922 % AtopCompositeOp XorCompositeOp PlusCompositeOp
1923 % MinusCompositeOp AddCompositeOp SubtractCompositeOp
1924 % DifferenceCompositeOp BumpmapCompositeOp CopyCompositeOp
1925 % DisplaceCompositeOp
1927 % o gravity: positioning gravity (NorthWestGravity, NorthGravity,
1928 % NorthEastGravity, WestGravity, CenterGravity,
1929 % EastGravity, SouthWestGravity, SouthGravity,
1933 WandExport MagickBooleanType MagickCompositeImageGravity(MagickWand *wand,
1934 const MagickWand *source_wand,const CompositeOperator compose,
1935 const GravityType gravity)
1943 assert(wand != (MagickWand *) NULL);
1944 assert(wand->signature == MagickWandSignature);
1945 if (wand->debug != MagickFalse)
1946 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1947 if ((wand->images == (Image *) NULL) ||
1948 (source_wand->images == (Image *) NULL))
1949 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1950 SetGeometry(source_wand->images,&geometry);
1951 GravityAdjustGeometry(wand->images->columns,wand->images->rows,gravity,
1953 status=CompositeImage(wand->images,source_wand->images,compose,MagickTrue,
1954 geometry.x,geometry.y,wand->exception);
1959 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1963 % M a g i c k C o m p o s i t e L a y e r s %
1967 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1969 % MagickCompositeLayers() composite the images in the source wand over the
1970 % images in the destination wand in sequence, starting with the current
1971 % image in both lists.
1973 % Each layer from the two image lists are composted together until the end of
1974 % one of the image lists is reached. The offset of each composition is also
1975 % adjusted to match the virtual canvas offsets of each layer. As such the
1976 % given offset is relative to the virtual canvas, and not the actual image.
1978 % Composition uses given x and y offsets, as the 'origin' location of the
1979 % source images virtual canvas (not the real image) allowing you to compose a
1980 % list of 'layer images' into the destiantioni images. This makes it well
1981 % sutiable for directly composing 'Clears Frame Animations' or 'Coaleased
1982 % Animations' onto a static or other 'Coaleased Animation' destination image
1983 % list. GIF disposal handling is not looked at.
1985 % Special case:- If one of the image sequences is the last image (just a
1986 % single image remaining), that image is repeatally composed with all the
1987 % images in the other image list. Either the source or destination lists may
1988 % be the single image, for this situation.
1990 % In the case of a single destination image (or last image given), that image
1991 % will ve cloned to match the number of images remaining in the source image
1994 % This is equivelent to the "-layer Composite" Shell API operator.
1996 % The format of the MagickCompositeLayers method is:
1998 % MagickBooleanType MagickCompositeLayers(MagickWand *wand,
1999 % const MagickWand *source_wand, const CompositeOperator compose,
2000 % const ssize_t x,const ssize_t y)
2002 % A description of each parameter follows:
2004 % o wand: the magick wand holding destaintion images
2006 % o source_wand: the wand holding the source images
2008 % o compose, x, y: composition arguments
2011 WandExport MagickBooleanType MagickCompositeLayers(MagickWand *wand,
2012 const MagickWand *source_wand,const CompositeOperator compose,
2013 const ssize_t x,const ssize_t y)
2018 assert(wand != (MagickWand *) NULL);
2019 assert(wand->signature == MagickWandSignature);
2020 if (wand->debug != MagickFalse)
2021 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2022 if ((wand->images == (Image *) NULL) ||
2023 (source_wand->images == (Image *) NULL))
2024 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2025 CompositeLayers(wand->images,compose,source_wand->images,x,y,wand->exception);
2026 status=MagickTrue; /* FUTURE: determine status from exceptions */
2031 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2035 % M a g i c k C o n t r a s t I m a g e %
2039 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2041 % MagickContrastImage() enhances the intensity differences between the lighter
2042 % and darker elements of the image. Set sharpen to a value other than 0 to
2043 % increase the image contrast otherwise the contrast is reduced.
2045 % The format of the MagickContrastImage method is:
2047 % MagickBooleanType MagickContrastImage(MagickWand *wand,
2048 % const MagickBooleanType sharpen)
2050 % A description of each parameter follows:
2052 % o wand: the magick wand.
2054 % o sharpen: Increase or decrease image contrast.
2058 WandExport MagickBooleanType MagickContrastImage(MagickWand *wand,
2059 const MagickBooleanType sharpen)
2064 assert(wand != (MagickWand *) NULL);
2065 assert(wand->signature == MagickWandSignature);
2066 if (wand->debug != MagickFalse)
2067 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2068 if (wand->images == (Image *) NULL)
2069 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2070 status=ContrastImage(wand->images,sharpen,wand->exception);
2075 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2079 % M a g i c k C o n t r a s t S t r e t c h I m a g e %
2083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2085 % MagickContrastStretchImage() enhances the contrast of a color image by
2086 % adjusting the pixels color to span the entire range of colors available.
2087 % You can also reduce the influence of a particular channel with a gamma
2090 % The format of the MagickContrastStretchImage method is:
2092 % MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
2093 % const double black_point,const double white_point)
2095 % A description of each parameter follows:
2097 % o wand: the magick wand.
2099 % o black_point: the black point.
2101 % o white_point: the white point.
2104 WandExport MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
2105 const double black_point,const double white_point)
2110 assert(wand != (MagickWand *) NULL);
2111 assert(wand->signature == MagickWandSignature);
2112 if (wand->debug != MagickFalse)
2113 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2114 if (wand->images == (Image *) NULL)
2115 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2116 status=ContrastStretchImage(wand->images,black_point,white_point,
2122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2126 % M a g i c k C o n v o l v e I m a g e %
2130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2132 % MagickConvolveImage() applies a custom convolution kernel to the image.
2134 % The format of the MagickConvolveImage method is:
2136 % MagickBooleanType MagickConvolveImage(MagickWand *wand,
2137 % const KernelInfo *kernel)
2139 % A description of each parameter follows:
2141 % o wand: the magick wand.
2143 % o kernel: An array of doubles representing the convolution kernel.
2146 WandExport MagickBooleanType MagickConvolveImage(MagickWand *wand,
2147 const KernelInfo *kernel)
2152 assert(wand != (MagickWand *) NULL);
2153 assert(wand->signature == MagickWandSignature);
2154 if (wand->debug != MagickFalse)
2155 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2156 if (kernel == (const KernelInfo *) NULL)
2157 return(MagickFalse);
2158 if (wand->images == (Image *) NULL)
2159 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2160 filter_image=ConvolveImage(wand->images,kernel,wand->exception);
2161 if (filter_image == (Image *) NULL)
2162 return(MagickFalse);
2163 ReplaceImageInList(&wand->images,filter_image);
2168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2172 % M a g i c k C r o p I m a g e %
2176 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2178 % MagickCropImage() extracts a region of the image.
2180 % The format of the MagickCropImage method is:
2182 % MagickBooleanType MagickCropImage(MagickWand *wand,
2183 % const size_t width,const size_t height,const ssize_t x,const ssize_t y)
2185 % A description of each parameter follows:
2187 % o wand: the magick wand.
2189 % o width: the region width.
2191 % o height: the region height.
2193 % o x: the region x-offset.
2195 % o y: the region y-offset.
2198 WandExport MagickBooleanType MagickCropImage(MagickWand *wand,
2199 const size_t width,const size_t height,const ssize_t x,const ssize_t y)
2207 assert(wand != (MagickWand *) NULL);
2208 assert(wand->signature == MagickWandSignature);
2209 if (wand->debug != MagickFalse)
2210 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2211 if (wand->images == (Image *) NULL)
2212 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2217 crop_image=CropImage(wand->images,&crop,wand->exception);
2218 if (crop_image == (Image *) NULL)
2219 return(MagickFalse);
2220 ReplaceImageInList(&wand->images,crop_image);
2225 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2229 % M a g i c k C y c l e C o l o r m a p I m a g e %
2233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2235 % MagickCycleColormapImage() displaces an image's colormap by a given number
2236 % of positions. If you cycle the colormap a number of times you can produce
2237 % a psychodelic effect.
2239 % The format of the MagickCycleColormapImage method is:
2241 % MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
2242 % const ssize_t displace)
2244 % A description of each parameter follows:
2246 % o wand: the magick wand.
2248 % o pixel_wand: the pixel wand.
2251 WandExport MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
2252 const ssize_t displace)
2257 assert(wand != (MagickWand *) NULL);
2258 assert(wand->signature == MagickWandSignature);
2259 if (wand->debug != MagickFalse)
2260 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2261 if (wand->images == (Image *) NULL)
2262 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2263 status=CycleColormapImage(wand->images,displace,wand->exception);
2268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2272 % M a g i c k C o n s t i t u t e I m a g e %
2276 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2278 % MagickConstituteImage() adds an image to the wand comprised of the pixel
2279 % data you supply. The pixel data must be in scanline order top-to-bottom.
2280 % The data can be char, short int, int, float, or double. Float and double
2281 % require the pixels to be normalized [0..1], otherwise [0..Max], where Max
2282 % is the maximum value the type can accomodate (e.g. 255 for char). For
2283 % example, to create a 640x480 image from unsigned red-green-blue character
2286 % MagickConstituteImage(wand,640,480,"RGB",CharPixel,pixels);
2288 % The format of the MagickConstituteImage method is:
2290 % MagickBooleanType MagickConstituteImage(MagickWand *wand,
2291 % const size_t columns,const size_t rows,const char *map,
2292 % const StorageType storage,void *pixels)
2294 % A description of each parameter follows:
2296 % o wand: the magick wand.
2298 % o columns: width in pixels of the image.
2300 % o rows: height in pixels of the image.
2302 % o map: This string reflects the expected ordering of the pixel array.
2303 % It can be any combination or order of R = red, G = green, B = blue,
2304 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
2305 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
2308 % o storage: Define the data type of the pixels. Float and double types are
2309 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
2310 % these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel,
2311 % LongPixel, QuantumPixel, or ShortPixel.
2313 % o pixels: This array of values contain the pixel components as defined by
2314 % map and type. You must preallocate this array where the expected
2315 % length varies depending on the values of width, height, map, and type.
2319 WandExport MagickBooleanType MagickConstituteImage(MagickWand *wand,
2320 const size_t columns,const size_t rows,const char *map,
2321 const StorageType storage,const void *pixels)
2326 assert(wand != (MagickWand *) NULL);
2327 assert(wand->signature == MagickWandSignature);
2328 if (wand->debug != MagickFalse)
2329 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2330 images=ConstituteImage(columns,rows,map,storage,pixels,wand->exception);
2331 if (images == (Image *) NULL)
2332 return(MagickFalse);
2333 return(InsertImageInWand(wand,images));
2337 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2341 % M a g i c k D e c i p h e r I m a g e %
2345 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2347 % MagickDecipherImage() converts cipher pixels to plain pixels.
2349 % The format of the MagickDecipherImage method is:
2351 % MagickBooleanType MagickDecipherImage(MagickWand *wand,
2352 % const char *passphrase)
2354 % A description of each parameter follows:
2356 % o wand: the magick wand.
2358 % o passphrase: the passphrase.
2361 WandExport MagickBooleanType MagickDecipherImage(MagickWand *wand,
2362 const char *passphrase)
2364 assert(wand != (MagickWand *) NULL);
2365 assert(wand->signature == MagickWandSignature);
2366 if (wand->debug != MagickFalse)
2367 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2368 if (wand->images == (Image *) NULL)
2369 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2370 return(DecipherImage(wand->images,passphrase,wand->exception));
2374 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2378 % M a g i c k D e c o n s t r u c t I m a g e s %
2382 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2384 % MagickDeconstructImages() compares each image with the next in a sequence
2385 % and returns the maximum bounding region of any pixel differences it
2388 % The format of the MagickDeconstructImages method is:
2390 % MagickWand *MagickDeconstructImages(MagickWand *wand)
2392 % A description of each parameter follows:
2394 % o wand: the magick wand.
2397 WandExport MagickWand *MagickDeconstructImages(MagickWand *wand)
2402 assert(wand != (MagickWand *) NULL);
2403 assert(wand->signature == MagickWandSignature);
2404 if (wand->debug != MagickFalse)
2405 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2406 if (wand->images == (Image *) NULL)
2407 return((MagickWand *) NULL);
2408 deconstruct_image=CompareImagesLayers(wand->images,CompareAnyLayer,
2410 if (deconstruct_image == (Image *) NULL)
2411 return((MagickWand *) NULL);
2412 return(CloneMagickWandFromImages(wand,deconstruct_image));
2416 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2420 % M a g i c k D e s k e w I m a g e %
2424 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2426 % MagickDeskewImage() removes skew from the image. Skew is an artifact that
2427 % occurs in scanned images because of the camera being misaligned,
2428 % imperfections in the scanning or surface, or simply because the paper was
2429 % not placed completely flat when scanned.
2431 % The format of the MagickDeskewImage method is:
2433 % MagickBooleanType MagickDeskewImage(MagickWand *wand,
2434 % const double threshold)
2436 % A description of each parameter follows:
2438 % o wand: the magick wand.
2440 % o threshold: separate background from foreground.
2443 WandExport MagickBooleanType MagickDeskewImage(MagickWand *wand,
2444 const double threshold)
2449 assert(wand != (MagickWand *) NULL);
2450 assert(wand->signature == MagickWandSignature);
2451 if (wand->debug != MagickFalse)
2452 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2453 if (wand->images == (Image *) NULL)
2454 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2455 sepia_image=DeskewImage(wand->images,threshold,wand->exception);
2456 if (sepia_image == (Image *) NULL)
2457 return(MagickFalse);
2458 ReplaceImageInList(&wand->images,sepia_image);
2463 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2467 % M a g i c k D e s p e c k l e I m a g e %
2471 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2473 % MagickDespeckleImage() reduces the speckle noise in an image while
2474 % perserving the edges of the original image.
2476 % The format of the MagickDespeckleImage method is:
2478 % MagickBooleanType MagickDespeckleImage(MagickWand *wand)
2480 % A description of each parameter follows:
2482 % o wand: the magick wand.
2485 WandExport MagickBooleanType MagickDespeckleImage(MagickWand *wand)
2490 assert(wand != (MagickWand *) NULL);
2491 assert(wand->signature == MagickWandSignature);
2492 if (wand->debug != MagickFalse)
2493 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2494 if (wand->images == (Image *) NULL)
2495 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2496 despeckle_image=DespeckleImage(wand->images,wand->exception);
2497 if (despeckle_image == (Image *) NULL)
2498 return(MagickFalse);
2499 ReplaceImageInList(&wand->images,despeckle_image);
2504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2508 % M a g i c k D e s t r o y I m a g e %
2512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2514 % MagickDestroyImage() dereferences an image, deallocating memory associated
2515 % with the image if the reference count becomes zero.
2517 % The format of the MagickDestroyImage method is:
2519 % Image *MagickDestroyImage(Image *image)
2521 % A description of each parameter follows:
2523 % o image: the image.
2526 WandExport Image *MagickDestroyImage(Image *image)
2528 return(DestroyImage(image));
2532 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2536 % M a g i c k D i s p l a y I m a g e %
2540 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2542 % MagickDisplayImage() displays an image.
2544 % The format of the MagickDisplayImage method is:
2546 % MagickBooleanType MagickDisplayImage(MagickWand *wand,
2547 % const char *server_name)
2549 % A description of each parameter follows:
2551 % o wand: the magick wand.
2553 % o server_name: the X server name.
2556 WandExport MagickBooleanType MagickDisplayImage(MagickWand *wand,
2557 const char *server_name)
2565 assert(wand != (MagickWand *) NULL);
2566 assert(wand->signature == MagickWandSignature);
2567 if (wand->debug != MagickFalse)
2568 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2569 if (wand->images == (Image *) NULL)
2570 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2571 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
2572 if (image == (Image *) NULL)
2573 return(MagickFalse);
2574 (void) CloneString(&wand->image_info->server_name,server_name);
2575 status=DisplayImages(wand->image_info,image,wand->exception);
2576 image=DestroyImage(image);
2581 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2585 % M a g i c k D i s p l a y I m a g e s %
2589 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2591 % MagickDisplayImages() displays an image or image sequence.
2593 % The format of the MagickDisplayImages method is:
2595 % MagickBooleanType MagickDisplayImages(MagickWand *wand,
2596 % const char *server_name)
2598 % A description of each parameter follows:
2600 % o wand: the magick wand.
2602 % o server_name: the X server name.
2605 WandExport MagickBooleanType MagickDisplayImages(MagickWand *wand,
2606 const char *server_name)
2611 assert(wand != (MagickWand *) NULL);
2612 assert(wand->signature == MagickWandSignature);
2613 if (wand->debug != MagickFalse)
2614 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2615 (void) CloneString(&wand->image_info->server_name,server_name);
2616 status=DisplayImages(wand->image_info,wand->images,wand->exception);
2621 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2625 % M a g i c k D i s t o r t I m a g e %
2629 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2631 % MagickDistortImage() distorts an image using various distortion methods, by
2632 % mapping color lookups of the source image to a new destination image
2633 % usally of the same size as the source image, unless 'bestfit' is set to
2636 % If 'bestfit' is enabled, and distortion allows it, the destination image is
2637 % adjusted to ensure the whole source 'image' will just fit within the final
2638 % destination image, which will be sized and offset accordingly. Also in
2639 % many cases the virtual offset of the source image will be taken into
2640 % account in the mapping.
2642 % The format of the MagickDistortImage method is:
2644 % MagickBooleanType MagickDistortImage(MagickWand *wand,
2645 % const DistortMethod method,const size_t number_arguments,
2646 % const double *arguments,const MagickBooleanType bestfit)
2648 % A description of each parameter follows:
2650 % o image: the image to be distorted.
2652 % o method: the method of image distortion.
2654 % ArcDistortion always ignores the source image offset, and always
2655 % 'bestfit' the destination image with the top left corner offset
2656 % relative to the polar mapping center.
2658 % Bilinear has no simple inverse mapping so it does not allow 'bestfit'
2659 % style of image distortion.
2661 % Affine, Perspective, and Bilinear, do least squares fitting of the
2662 % distortion when more than the minimum number of control point pairs
2665 % Perspective, and Bilinear, falls back to a Affine distortion when less
2666 % that 4 control point pairs are provided. While Affine distortions let
2667 % you use any number of control point pairs, that is Zero pairs is a
2668 % no-Op (viewport only) distrotion, one pair is a translation and two
2669 % pairs of control points do a scale-rotate-translate, without any
2672 % o number_arguments: the number of arguments given for this distortion
2675 % o arguments: the arguments for this distortion method.
2677 % o bestfit: Attempt to resize destination to fit distorted source.
2680 WandExport MagickBooleanType MagickDistortImage(MagickWand *wand,
2681 const DistortMethod method,const size_t number_arguments,
2682 const double *arguments,const MagickBooleanType bestfit)
2687 assert(wand != (MagickWand *) NULL);
2688 assert(wand->signature == MagickWandSignature);
2689 if (wand->debug != MagickFalse)
2690 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2691 if (wand->images == (Image *) NULL)
2692 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2693 distort_image=DistortImage(wand->images,method,number_arguments,arguments,
2694 bestfit,wand->exception);
2695 if (distort_image == (Image *) NULL)
2696 return(MagickFalse);
2697 ReplaceImageInList(&wand->images,distort_image);
2702 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2706 % M a g i c k D r a w I m a g e %
2710 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2712 % MagickDrawImage() renders the drawing wand on the current image.
2714 % The format of the MagickDrawImage method is:
2716 % MagickBooleanType MagickDrawImage(MagickWand *wand,
2717 % const DrawingWand *drawing_wand)
2719 % A description of each parameter follows:
2721 % o wand: the magick wand.
2723 % o drawing_wand: the draw wand.
2726 WandExport MagickBooleanType MagickDrawImage(MagickWand *wand,
2727 const DrawingWand *drawing_wand)
2738 assert(wand != (MagickWand *) NULL);
2739 assert(wand->signature == MagickWandSignature);
2740 if (wand->debug != MagickFalse)
2741 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2742 if (wand->images == (Image *) NULL)
2743 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2744 draw_info=PeekDrawingWand(drawing_wand);
2745 if ((draw_info == (DrawInfo *) NULL) ||
2746 (draw_info->primitive == (char *) NULL))
2747 return(MagickFalse);
2748 primitive=AcquireString(draw_info->primitive);
2749 draw_info=DestroyDrawInfo(draw_info);
2750 draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
2751 draw_info->primitive=primitive;
2752 status=DrawImage(wand->images,draw_info,wand->exception);
2753 draw_info=DestroyDrawInfo(draw_info);
2758 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2762 % M a g i c k E d g e I m a g e %
2766 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2768 % MagickEdgeImage() enhance edges within the image with a convolution filter
2769 % of the given radius. Use a radius of 0 and Edge() selects a suitable
2772 % The format of the MagickEdgeImage method is:
2774 % MagickBooleanType MagickEdgeImage(MagickWand *wand,const double radius)
2776 % A description of each parameter follows:
2778 % o wand: the magick wand.
2780 % o radius: the radius of the pixel neighborhood.
2783 WandExport MagickBooleanType MagickEdgeImage(MagickWand *wand,
2784 const double radius)
2789 assert(wand != (MagickWand *) NULL);
2790 assert(wand->signature == MagickWandSignature);
2791 if (wand->debug != MagickFalse)
2792 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2793 if (wand->images == (Image *) NULL)
2794 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2795 edge_image=EdgeImage(wand->images,radius,wand->exception);
2796 if (edge_image == (Image *) NULL)
2797 return(MagickFalse);
2798 ReplaceImageInList(&wand->images,edge_image);
2803 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2807 % M a g i c k E m b o s s I m a g e %
2811 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2813 % MagickEmbossImage() returns a grayscale image with a three-dimensional
2814 % effect. We convolve the image with a Gaussian operator of the given radius
2815 % and standard deviation (sigma). For reasonable results, radius should be
2816 % larger than sigma. Use a radius of 0 and Emboss() selects a suitable
2819 % The format of the MagickEmbossImage method is:
2821 % MagickBooleanType MagickEmbossImage(MagickWand *wand,const double radius,
2822 % const double sigma)
2824 % A description of each parameter follows:
2826 % o wand: the magick wand.
2828 % o radius: the radius of the Gaussian, in pixels, not counting the center
2831 % o sigma: the standard deviation of the Gaussian, in pixels.
2834 WandExport MagickBooleanType MagickEmbossImage(MagickWand *wand,
2835 const double radius,const double sigma)
2840 assert(wand != (MagickWand *) NULL);
2841 assert(wand->signature == MagickWandSignature);
2842 if (wand->debug != MagickFalse)
2843 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2844 if (wand->images == (Image *) NULL)
2845 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2846 emboss_image=EmbossImage(wand->images,radius,sigma,wand->exception);
2847 if (emboss_image == (Image *) NULL)
2848 return(MagickFalse);
2849 ReplaceImageInList(&wand->images,emboss_image);
2854 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2858 % M a g i c k E n c i p h e r I m a g e %
2862 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2864 % MagickEncipherImage() converts plaint pixels to cipher pixels.
2866 % The format of the MagickEncipherImage method is:
2868 % MagickBooleanType MagickEncipherImage(MagickWand *wand,
2869 % const char *passphrase)
2871 % A description of each parameter follows:
2873 % o wand: the magick wand.
2875 % o passphrase: the passphrase.
2878 WandExport MagickBooleanType MagickEncipherImage(MagickWand *wand,
2879 const char *passphrase)
2881 assert(wand != (MagickWand *) NULL);
2882 assert(wand->signature == MagickWandSignature);
2883 if (wand->debug != MagickFalse)
2884 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2885 if (wand->images == (Image *) NULL)
2886 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2887 return(EncipherImage(wand->images,passphrase,wand->exception));
2891 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2895 % M a g i c k E n h a n c e I m a g e %
2899 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2901 % MagickEnhanceImage() applies a digital filter that improves the quality of a
2904 % The format of the MagickEnhanceImage method is:
2906 % MagickBooleanType MagickEnhanceImage(MagickWand *wand)
2908 % A description of each parameter follows:
2910 % o wand: the magick wand.
2913 WandExport MagickBooleanType MagickEnhanceImage(MagickWand *wand)
2918 assert(wand != (MagickWand *) NULL);
2919 assert(wand->signature == MagickWandSignature);
2920 if (wand->debug != MagickFalse)
2921 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2922 if (wand->images == (Image *) NULL)
2923 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2924 enhance_image=EnhanceImage(wand->images,wand->exception);
2925 if (enhance_image == (Image *) NULL)
2926 return(MagickFalse);
2927 ReplaceImageInList(&wand->images,enhance_image);
2932 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2936 % M a g i c k E q u a l i z e I m a g e %
2940 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2942 % MagickEqualizeImage() equalizes the image histogram.
2944 % The format of the MagickEqualizeImage method is:
2946 % MagickBooleanType MagickEqualizeImage(MagickWand *wand)
2948 % A description of each parameter follows:
2950 % o wand: the magick wand.
2952 % o channel: the image channel(s).
2955 WandExport MagickBooleanType MagickEqualizeImage(MagickWand *wand)
2960 assert(wand != (MagickWand *) NULL);
2961 assert(wand->signature == MagickWandSignature);
2962 if (wand->debug != MagickFalse)
2963 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2964 if (wand->images == (Image *) NULL)
2965 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2966 status=EqualizeImage(wand->images,wand->exception);
2971 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2975 % M a g i c k E v a l u a t e I m a g e %
2979 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2981 % MagickEvaluateImage() applys an arithmetic, relational, or logical
2982 % expression to an image. Use these operators to lighten or darken an image,
2983 % to increase or decrease contrast in an image, or to produce the "negative"
2986 % The format of the MagickEvaluateImage method is:
2988 % MagickBooleanType MagickEvaluateImage(MagickWand *wand,
2989 % const MagickEvaluateOperator operator,const double value)
2990 % MagickBooleanType MagickEvaluateImages(MagickWand *wand,
2991 % const MagickEvaluateOperator operator)
2993 % A description of each parameter follows:
2995 % o wand: the magick wand.
2997 % o op: A channel operator.
2999 % o value: A value value.
3003 WandExport MagickWand *MagickEvaluateImages(MagickWand *wand,
3004 const MagickEvaluateOperator op)
3009 assert(wand != (MagickWand *) NULL);
3010 assert(wand->signature == MagickWandSignature);
3011 if (wand->debug != MagickFalse)
3012 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3013 if (wand->images == (Image *) NULL)
3014 return((MagickWand *) NULL);
3015 evaluate_image=EvaluateImages(wand->images,op,wand->exception);
3016 if (evaluate_image == (Image *) NULL)
3017 return((MagickWand *) NULL);
3018 return(CloneMagickWandFromImages(wand,evaluate_image));
3021 WandExport MagickBooleanType MagickEvaluateImage(MagickWand *wand,
3022 const MagickEvaluateOperator op,const double value)
3027 assert(wand != (MagickWand *) NULL);
3028 assert(wand->signature == MagickWandSignature);
3029 if (wand->debug != MagickFalse)
3030 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3031 if (wand->images == (Image *) NULL)
3032 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3033 status=EvaluateImage(wand->images,op,value,wand->exception);
3038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3042 % M a g i c k E x p o r t I m a g e P i x e l s %
3046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3048 % MagickExportImagePixels() extracts pixel data from an image and returns it
3049 % to you. The method returns MagickTrue on success otherwise MagickFalse if
3050 % an error is encountered. The data is returned as char, short int, int,
3051 % ssize_t, float, or double in the order specified by map.
3053 % Suppose you want to extract the first scanline of a 640x480 image as
3054 % character data in red-green-blue order:
3056 % MagickExportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
3058 % The format of the MagickExportImagePixels method is:
3060 % MagickBooleanType MagickExportImagePixels(MagickWand *wand,
3061 % const ssize_t x,const ssize_t y,const size_t columns,
3062 % const size_t rows,const char *map,const StorageType storage,
3065 % A description of each parameter follows:
3067 % o wand: the magick wand.
3069 % o x, y, columns, rows: These values define the perimeter
3070 % of a region of pixels you want to extract.
3072 % o map: This string reflects the expected ordering of the pixel array.
3073 % It can be any combination or order of R = red, G = green, B = blue,
3074 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
3075 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
3078 % o storage: Define the data type of the pixels. Float and double types are
3079 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
3080 % these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel,
3081 % LongPixel, QuantumPixel, or ShortPixel.
3083 % o pixels: This array of values contain the pixel components as defined by
3084 % map and type. You must preallocate this array where the expected
3085 % length varies depending on the values of width, height, map, and type.
3088 WandExport MagickBooleanType MagickExportImagePixels(MagickWand *wand,
3089 const ssize_t x,const ssize_t y,const size_t columns,
3090 const size_t rows,const char *map,const StorageType storage,
3096 assert(wand != (MagickWand *) NULL);
3097 assert(wand->signature == MagickWandSignature);
3098 if (wand->debug != MagickFalse)
3099 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3100 if (wand->images == (Image *) NULL)
3101 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3102 status=ExportImagePixels(wand->images,x,y,columns,rows,map,
3103 storage,pixels,wand->exception);
3108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3112 % M a g i c k E x t e n t I m a g e %
3116 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3118 % MagickExtentImage() extends the image as defined by the geometry, gravity,
3119 % and wand background color. Set the (x,y) offset of the geometry to move
3120 % the original wand relative to the extended wand.
3122 % The format of the MagickExtentImage method is:
3124 % MagickBooleanType MagickExtentImage(MagickWand *wand,const size_t width,
3125 % const size_t height,const ssize_t x,const ssize_t y)
3127 % A description of each parameter follows:
3129 % o wand: the magick wand.
3131 % o width: the region width.
3133 % o height: the region height.
3135 % o x: the region x offset.
3137 % o y: the region y offset.
3140 WandExport MagickBooleanType MagickExtentImage(MagickWand *wand,
3141 const size_t width,const size_t height,const ssize_t x,const ssize_t y)
3149 assert(wand != (MagickWand *) NULL);
3150 assert(wand->signature == MagickWandSignature);
3151 if (wand->debug != MagickFalse)
3152 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3153 if (wand->images == (Image *) NULL)
3154 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3156 extent.height=height;
3159 extent_image=ExtentImage(wand->images,&extent,wand->exception);
3160 if (extent_image == (Image *) NULL)
3161 return(MagickFalse);
3162 ReplaceImageInList(&wand->images,extent_image);
3167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3171 % M a g i c k F l i p I m a g e %
3175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3177 % MagickFlipImage() creates a vertical mirror image by reflecting the pixels
3178 % around the central x-axis.
3180 % The format of the MagickFlipImage method is:
3182 % MagickBooleanType MagickFlipImage(MagickWand *wand)
3184 % A description of each parameter follows:
3186 % o wand: the magick wand.
3189 WandExport MagickBooleanType MagickFlipImage(MagickWand *wand)
3194 assert(wand != (MagickWand *) NULL);
3195 assert(wand->signature == MagickWandSignature);
3196 if (wand->debug != MagickFalse)
3197 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3198 if (wand->images == (Image *) NULL)
3199 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3200 flip_image=FlipImage(wand->images,wand->exception);
3201 if (flip_image == (Image *) NULL)
3202 return(MagickFalse);
3203 ReplaceImageInList(&wand->images,flip_image);
3208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3212 % M a g i c k F l o o d f i l l P a i n t I m a g e %
3216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3218 % MagickFloodfillPaintImage() changes the color value of any pixel that matches
3219 % target and is an immediate neighbor. If the method FillToBorderMethod is
3220 % specified, the color value is changed for any neighbor pixel that does not
3221 % match the bordercolor member of image.
3223 % The format of the MagickFloodfillPaintImage method is:
3225 % MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
3226 % const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
3227 % const ssize_t x,const ssize_t y,const MagickBooleanType invert)
3229 % A description of each parameter follows:
3231 % o wand: the magick wand.
3233 % o fill: the floodfill color pixel wand.
3235 % o fuzz: By default target must match a particular pixel color
3236 % exactly. However, in many cases two colors may differ by a small amount.
3237 % The fuzz member of image defines how much tolerance is acceptable to
3238 % consider two colors as the same. For example, set fuzz to 10 and the
3239 % color red at intensities of 100 and 102 respectively are now interpreted
3240 % as the same color for the purposes of the floodfill.
3242 % o bordercolor: the border color pixel wand.
3244 % o x,y: the starting location of the operation.
3246 % o invert: paint any pixel that does not match the target color.
3249 WandExport MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
3250 const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
3251 const ssize_t x,const ssize_t y,const MagickBooleanType invert)
3262 assert(wand != (MagickWand *) NULL);
3263 assert(wand->signature == MagickWandSignature);
3264 if (wand->debug != MagickFalse)
3265 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3266 if (wand->images == (Image *) NULL)
3267 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3268 draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
3269 PixelGetQuantumPacket(fill,&draw_info->fill);
3270 (void) GetOneVirtualPixelInfo(wand->images,TileVirtualPixelMethod,x %
3271 wand->images->columns,y % wand->images->rows,&target,wand->exception);
3272 if (bordercolor != (PixelWand *) NULL)
3273 PixelGetMagickColor(bordercolor,&target);
3274 wand->images->fuzz=fuzz;
3275 status=FloodfillPaintImage(wand->images,draw_info,&target,x,y,invert,
3277 draw_info=DestroyDrawInfo(draw_info);
3282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3286 % M a g i c k F l o p I m a g e %
3290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3292 % MagickFlopImage() creates a horizontal mirror image by reflecting the pixels
3293 % around the central y-axis.
3295 % The format of the MagickFlopImage method is:
3297 % MagickBooleanType MagickFlopImage(MagickWand *wand)
3299 % A description of each parameter follows:
3301 % o wand: the magick wand.
3304 WandExport MagickBooleanType MagickFlopImage(MagickWand *wand)
3309 assert(wand != (MagickWand *) NULL);
3310 assert(wand->signature == MagickWandSignature);
3311 if (wand->debug != MagickFalse)
3312 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3313 if (wand->images == (Image *) NULL)
3314 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3315 flop_image=FlopImage(wand->images,wand->exception);
3316 if (flop_image == (Image *) NULL)
3317 return(MagickFalse);
3318 ReplaceImageInList(&wand->images,flop_image);
3323 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3327 % M a g i c k F o u r i e r T r a n s f o r m I m a g e %
3331 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3333 % MagickForwardFourierTransformImage() implements the discrete Fourier
3334 % transform (DFT) of the image either as a magnitude / phase or real /
3335 % imaginary image pair.
3337 % The format of the MagickForwardFourierTransformImage method is:
3339 % MagickBooleanType MagickForwardFourierTransformImage(MagickWand *wand,
3340 % const MagickBooleanType magnitude)
3342 % A description of each parameter follows:
3344 % o wand: the magick wand.
3346 % o magnitude: if true, return as magnitude / phase pair otherwise a real /
3347 % imaginary image pair.
3350 WandExport MagickBooleanType MagickForwardFourierTransformImage(
3351 MagickWand *wand,const MagickBooleanType magnitude)
3356 assert(wand != (MagickWand *) NULL);
3357 assert(wand->signature == MagickWandSignature);
3358 if (wand->debug != MagickFalse)
3359 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3360 if (wand->images == (Image *) NULL)
3361 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3362 forward_image=ForwardFourierTransformImage(wand->images,magnitude,
3364 if (forward_image == (Image *) NULL)
3365 return(MagickFalse);
3366 ReplaceImageInList(&wand->images,forward_image);
3371 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3375 % M a g i c k F r a m e I m a g e %
3379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3381 % MagickFrameImage() adds a simulated three-dimensional border around the
3382 % image. The width and height specify the border width of the vertical and
3383 % horizontal sides of the frame. The inner and outer bevels indicate the
3384 % width of the inner and outer shadows of the frame.
3386 % The format of the MagickFrameImage method is:
3388 % MagickBooleanType MagickFrameImage(MagickWand *wand,
3389 % const PixelWand *matte_color,const size_t width,
3390 % const size_t height,const ssize_t inner_bevel,
3391 % const ssize_t outer_bevel,const CompositeOperator compose)
3393 % A description of each parameter follows:
3395 % o wand: the magick wand.
3397 % o matte_color: the frame color pixel wand.
3399 % o width: the border width.
3401 % o height: the border height.
3403 % o inner_bevel: the inner bevel width.
3405 % o outer_bevel: the outer bevel width.
3407 % o compose: the composite operator.
3410 WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
3411 const PixelWand *matte_color,const size_t width,const size_t height,
3412 const ssize_t inner_bevel,const ssize_t outer_bevel,
3413 const CompositeOperator compose)
3421 assert(wand != (MagickWand *) NULL);
3422 assert(wand->signature == MagickWandSignature);
3423 if (wand->debug != MagickFalse)
3424 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3425 if (wand->images == (Image *) NULL)
3426 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3427 (void) memset(&frame_info,0,sizeof(frame_info));
3428 frame_info.width=wand->images->columns+2*width;
3429 frame_info.height=wand->images->rows+2*height;
3430 frame_info.x=(ssize_t) width;
3431 frame_info.y=(ssize_t) height;
3432 frame_info.inner_bevel=inner_bevel;
3433 frame_info.outer_bevel=outer_bevel;
3434 PixelGetQuantumPacket(matte_color,&wand->images->matte_color);
3435 frame_image=FrameImage(wand->images,&frame_info,compose,wand->exception);
3436 if (frame_image == (Image *) NULL)
3437 return(MagickFalse);
3438 ReplaceImageInList(&wand->images,frame_image);
3443 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3447 % M a g i c k F u n c t i o n I m a g e %
3451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3453 % MagickFunctionImage() applys an arithmetic, relational, or logical
3454 % expression to an image. Use these operators to lighten or darken an image,
3455 % to increase or decrease contrast in an image, or to produce the "negative"
3458 % The format of the MagickFunctionImage method is:
3460 % MagickBooleanType MagickFunctionImage(MagickWand *wand,
3461 % const MagickFunction function,const size_t number_arguments,
3462 % const double *arguments)
3464 % A description of each parameter follows:
3466 % o wand: the magick wand.
3468 % o function: the image function.
3470 % o number_arguments: the number of function arguments.
3472 % o arguments: the function arguments.
3475 WandExport MagickBooleanType MagickFunctionImage(MagickWand *wand,
3476 const MagickFunction function,const size_t number_arguments,
3477 const double *arguments)
3482 assert(wand != (MagickWand *) NULL);
3483 assert(wand->signature == MagickWandSignature);
3484 if (wand->debug != MagickFalse)
3485 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3486 if (wand->images == (Image *) NULL)
3487 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3488 status=FunctionImage(wand->images,function,number_arguments,arguments,
3494 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3498 % M a g i c k F x I m a g e %
3502 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3504 % MagickFxImage() evaluate expression for each pixel in the image.
3506 % The format of the MagickFxImage method is:
3508 % MagickWand *MagickFxImage(MagickWand *wand,const char *expression)
3510 % A description of each parameter follows:
3512 % o wand: the magick wand.
3514 % o expression: the expression.
3517 WandExport MagickWand *MagickFxImage(MagickWand *wand,const char *expression)
3522 assert(wand != (MagickWand *) NULL);
3523 assert(wand->signature == MagickWandSignature);
3524 if (wand->debug != MagickFalse)
3525 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3526 if (wand->images == (Image *) NULL)
3527 return((MagickWand *) NULL);
3528 fx_image=FxImage(wand->images,expression,wand->exception);
3529 if (fx_image == (Image *) NULL)
3530 return((MagickWand *) NULL);
3531 return(CloneMagickWandFromImages(wand,fx_image));
3535 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3539 % M a g i c k G a m m a I m a g e %
3543 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3545 % MagickGammaImage() gamma-corrects an image. The same image viewed on
3546 % different devices will have perceptual differences in the way the image's
3547 % intensities are represented on the screen. Specify individual gamma levels
3548 % for the red, green, and blue channels, or adjust all three with the gamma
3549 % parameter. Values typically range from 0.8 to 2.3.
3551 % You can also reduce the influence of a particular channel with a gamma
3554 % The format of the MagickGammaImage method is:
3556 % MagickBooleanType MagickGammaImage(MagickWand *wand,const double gamma)
3558 % A description of each parameter follows:
3560 % o wand: the magick wand.
3562 % o level: Define the level of gamma correction.
3565 WandExport MagickBooleanType MagickGammaImage(MagickWand *wand,
3571 assert(wand != (MagickWand *) NULL);
3572 assert(wand->signature == MagickWandSignature);
3573 if (wand->debug != MagickFalse)
3574 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3575 if (wand->images == (Image *) NULL)
3576 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3577 status=GammaImage(wand->images,gamma,wand->exception);
3582 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3586 % M a g i c k G a u s s i a n B l u r I m a g e %
3590 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3592 % MagickGaussianBlurImage() blurs an image. We convolve the image with a
3593 % Gaussian operator of the given radius and standard deviation (sigma).
3594 % For reasonable results, the radius should be larger than sigma. Use a
3595 % radius of 0 and MagickGaussianBlurImage() selects a suitable radius for you.
3597 % The format of the MagickGaussianBlurImage method is:
3599 % MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
3600 % const double radius,const double sigma)
3602 % A description of each parameter follows:
3604 % o wand: the magick wand.
3606 % o radius: the radius of the Gaussian, in pixels, not counting the center
3609 % o sigma: the standard deviation of the Gaussian, in pixels.
3612 WandExport MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
3613 const double radius,const double sigma)
3618 assert(wand != (MagickWand *) NULL);
3619 assert(wand->signature == MagickWandSignature);
3620 if (wand->debug != MagickFalse)
3621 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3622 if (wand->images == (Image *) NULL)
3623 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3624 blur_image=GaussianBlurImage(wand->images,radius,sigma,wand->exception);
3625 if (blur_image == (Image *) NULL)
3626 return(MagickFalse);
3627 ReplaceImageInList(&wand->images,blur_image);
3632 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3636 % M a g i c k G e t I m a g e %
3640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3642 % MagickGetImage() gets the image at the current image index.
3644 % The format of the MagickGetImage method is:
3646 % MagickWand *MagickGetImage(MagickWand *wand)
3648 % A description of each parameter follows:
3650 % o wand: the magick wand.
3653 WandExport MagickWand *MagickGetImage(MagickWand *wand)
3658 assert(wand != (MagickWand *) NULL);
3659 assert(wand->signature == MagickWandSignature);
3660 if (wand->debug != MagickFalse)
3661 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3662 if (wand->images == (Image *) NULL)
3664 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3665 "ContainsNoImages","`%s'",wand->name);
3666 return((MagickWand *) NULL);
3668 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
3669 if (image == (Image *) NULL)
3670 return((MagickWand *) NULL);
3671 return(CloneMagickWandFromImages(wand,image));
3675 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3679 % M a g i c k G e t I m a g e A l p h a C h a n n e l %
3683 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3685 % MagickGetImageAlphaChannel() returns MagickFalse if the image alpha channel
3686 % is not activated. That is, the image is RGB rather than RGBA or CMYK rather
3689 % The format of the MagickGetImageAlphaChannel method is:
3691 % MagickBooleanType MagickGetImageAlphaChannel(MagickWand *wand)
3693 % A description of each parameter follows:
3695 % o wand: the magick wand.
3698 WandExport MagickBooleanType MagickGetImageAlphaChannel(MagickWand *wand)
3700 assert(wand != (MagickWand *) NULL);
3701 assert(wand->signature == MagickWandSignature);
3702 if (wand->debug != MagickFalse)
3703 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3704 if (wand->images == (Image *) NULL)
3705 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3706 return(GetImageAlphaChannel(wand->images));
3710 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3714 % M a g i c k G e t I m a g e C l i p M a s k %
3718 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3720 % MagickGetImageMask() gets the image clip mask at the current image index.
3722 % The format of the MagickGetImageMask method is:
3724 % MagickWand *MagickGetImageMask(MagickWand *wand)
3726 % A description of each parameter follows:
3728 % o wand: the magick wand.
3730 % o type: type of mask, ReadPixelMask or WritePixelMask.
3733 WandExport MagickWand *MagickGetImageMask(MagickWand *wand,
3734 const PixelMask type)
3739 assert(wand != (MagickWand *) NULL);
3740 assert(wand->signature == MagickWandSignature);
3741 if (wand->debug != MagickFalse)
3742 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3743 if (wand->images == (Image *) NULL)
3745 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3746 "ContainsNoImages","`%s'",wand->name);
3747 return((MagickWand *) NULL);
3749 image=GetImageMask(wand->images,type,wand->exception);
3750 if (image == (Image *) NULL)
3751 return((MagickWand *) NULL);
3752 return(CloneMagickWandFromImages(wand,image));
3756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3760 % M a g i c k G e t I m a g e B a c k g r o u n d C o l o r %
3764 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3766 % MagickGetImageBackgroundColor() returns the image background color.
3768 % The format of the MagickGetImageBackgroundColor method is:
3770 % MagickBooleanType MagickGetImageBackgroundColor(MagickWand *wand,
3771 % PixelWand *background_color)
3773 % A description of each parameter follows:
3775 % o wand: the magick wand.
3777 % o background_color: Return the background color.
3780 WandExport MagickBooleanType MagickGetImageBackgroundColor(MagickWand *wand,
3781 PixelWand *background_color)
3783 assert(wand != (MagickWand *) NULL);
3784 assert(wand->signature == MagickWandSignature);
3785 if (wand->debug != MagickFalse)
3786 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3787 if (wand->images == (Image *) NULL)
3788 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3789 PixelSetPixelColor(background_color,&wand->images->background_color);
3794 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3798 % M a g i c k G e t I m a g e B l o b %
3802 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3804 % MagickGetImageBlob() implements direct to memory image formats. It returns
3805 % the image as a blob (a formatted "file" in memory) and its length, starting
3806 % from the current position in the image sequence. Use MagickSetImageFormat()
3807 % to set the format to write to the blob (GIF, JPEG, PNG, etc.).
3809 % Utilize MagickResetIterator() to ensure the write is from the beginning of
3810 % the image sequence.
3812 % Use MagickRelinquishMemory() to free the blob when you are done with it.
3814 % The format of the MagickGetImageBlob method is:
3816 % unsigned char *MagickGetImageBlob(MagickWand *wand,size_t *length)
3818 % A description of each parameter follows:
3820 % o wand: the magick wand.
3822 % o length: the length of the blob.
3825 WandExport unsigned char *MagickGetImageBlob(MagickWand *wand,size_t *length)
3830 assert(wand != (MagickWand *) NULL);
3831 assert(wand->signature == MagickWandSignature);
3832 if (wand->debug != MagickFalse)
3833 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3834 if (wand->images == (Image *) NULL)
3836 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3837 "ContainsNoImages","`%s'",wand->name);
3838 return((unsigned char *) NULL);
3840 blob=(unsigned char *) ImageToBlob(wand->image_info,wand->images,length,
3846 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3850 % M a g i c k G e t I m a g e s B l o b %
3854 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3856 % MagickGetImagesBlob() implements direct to memory image formats. It
3857 % returns the image sequence as a blob and its length. The format of the image
3858 % determines the format of the returned blob (GIF, JPEG, PNG, etc.). To
3859 % return a different image format, use MagickSetImageFormat().
3861 % Note, some image formats do not permit multiple images to the same image
3862 % stream (e.g. JPEG). in this instance, just the first image of the
3863 % sequence is returned as a blob.
3865 % The format of the MagickGetImagesBlob method is:
3867 % unsigned char *MagickGetImagesBlob(MagickWand *wand,size_t *length)
3869 % A description of each parameter follows:
3871 % o wand: the magick wand.
3873 % o length: the length of the blob.
3876 WandExport unsigned char *MagickGetImagesBlob(MagickWand *wand,size_t *length)
3881 assert(wand != (MagickWand *) NULL);
3882 assert(wand->signature == MagickWandSignature);
3883 if (wand->debug != MagickFalse)
3884 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3885 if (wand->images == (Image *) NULL)
3887 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3888 "ContainsNoImages","`%s'",wand->name);
3889 return((unsigned char *) NULL);
3891 blob=(unsigned char *) ImagesToBlob(wand->image_info,GetFirstImageInList(
3892 wand->images),length,wand->exception);
3897 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3901 % M a g i c k G e t I m a g e B l u e P r i m a r y %
3905 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3907 % MagickGetImageBluePrimary() returns the chromaticy blue primary point for the
3910 % The format of the MagickGetImageBluePrimary method is:
3912 % MagickBooleanType MagickGetImageBluePrimary(MagickWand *wand,double *x,
3913 % double *y,double *z)
3915 % A description of each parameter follows:
3917 % o wand: the magick wand.
3919 % o x: the chromaticity blue primary x-point.
3921 % o y: the chromaticity blue primary y-point.
3923 % o z: the chromaticity blue primary z-point.
3926 WandExport MagickBooleanType MagickGetImageBluePrimary(MagickWand *wand,
3927 double *x,double *y,double *z)
3929 assert(wand != (MagickWand *) NULL);
3930 assert(wand->signature == MagickWandSignature);
3931 if (wand->debug != MagickFalse)
3932 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3933 if (wand->images == (Image *) NULL)
3934 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3935 *x=wand->images->chromaticity.blue_primary.x;
3936 *y=wand->images->chromaticity.blue_primary.y;
3937 *z=wand->images->chromaticity.blue_primary.z;
3942 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3946 % M a g i c k G e t I m a g e B o r d e r C o l o r %
3950 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3952 % MagickGetImageBorderColor() returns the image border color.
3954 % The format of the MagickGetImageBorderColor method is:
3956 % MagickBooleanType MagickGetImageBorderColor(MagickWand *wand,
3957 % PixelWand *border_color)
3959 % A description of each parameter follows:
3961 % o wand: the magick wand.
3963 % o border_color: Return the border color.
3966 WandExport MagickBooleanType MagickGetImageBorderColor(MagickWand *wand,
3967 PixelWand *border_color)
3969 assert(wand != (MagickWand *) NULL);
3970 assert(wand->signature == MagickWandSignature);
3971 if (wand->debug != MagickFalse)
3972 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3973 if (wand->images == (Image *) NULL)
3974 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3975 PixelSetPixelColor(border_color,&wand->images->border_color);
3980 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3984 % M a g i c k G e t I m a g e F e a t u r e s %
3988 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3990 % MagickGetImageFeatures() returns features for each channel in the
3991 % image in each of four directions (horizontal, vertical, left and right
3992 % diagonals) for the specified distance. The features include the angular
3993 % second moment, contrast, correlation, sum of squares: variance, inverse
3994 % difference moment, sum average, sum varience, sum entropy, entropy,
3995 % difference variance, difference entropy, information measures of
3996 % correlation 1, information measures of correlation 2, and maximum
3997 % correlation coefficient. You can access the red channel contrast, for
3998 % example, like this:
4000 % channel_features=MagickGetImageFeatures(wand,1);
4001 % contrast=channel_features[RedPixelChannel].contrast[0];
4003 % Use MagickRelinquishMemory() to free the statistics buffer.
4005 % The format of the MagickGetImageFeatures method is:
4007 % ChannelFeatures *MagickGetImageFeatures(MagickWand *wand,
4008 % const size_t distance)
4010 % A description of each parameter follows:
4012 % o wand: the magick wand.
4014 % o distance: the distance.
4017 WandExport ChannelFeatures *MagickGetImageFeatures(MagickWand *wand,
4018 const size_t distance)
4020 assert(wand != (MagickWand *) NULL);
4021 assert(wand->signature == MagickWandSignature);
4022 if (wand->debug != MagickFalse)
4023 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4024 if (wand->images == (Image *) NULL)
4026 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4027 "ContainsNoImages","`%s'",wand->name);
4028 return((ChannelFeatures *) NULL);
4030 return(GetImageFeatures(wand->images,distance,wand->exception));
4034 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4038 % M a g i c k G e t I m a g e K u r t o s i s %
4042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4044 % MagickGetImageKurtosis() gets the kurtosis and skewness of one or
4045 % more image channels.
4047 % The format of the MagickGetImageKurtosis method is:
4049 % MagickBooleanType MagickGetImageKurtosis(MagickWand *wand,
4050 % double *kurtosis,double *skewness)
4052 % A description of each parameter follows:
4054 % o wand: the magick wand.
4056 % o kurtosis: The kurtosis for the specified channel(s).
4058 % o skewness: The skewness for the specified channel(s).
4061 WandExport MagickBooleanType MagickGetImageKurtosis(MagickWand *wand,
4062 double *kurtosis,double *skewness)
4067 assert(wand != (MagickWand *) NULL);
4068 assert(wand->signature == MagickWandSignature);
4069 if (wand->debug != MagickFalse)
4070 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4071 if (wand->images == (Image *) NULL)
4072 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4073 status=GetImageKurtosis(wand->images,kurtosis,skewness,wand->exception);
4078 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4082 % M a g i c k G e t I m a g e M e a n %
4086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4088 % MagickGetImageMean() gets the mean and standard deviation of one or more
4091 % The format of the MagickGetImageMean method is:
4093 % MagickBooleanType MagickGetImageMean(MagickWand *wand,double *mean,
4094 % double *standard_deviation)
4096 % A description of each parameter follows:
4098 % o wand: the magick wand.
4100 % o channel: the image channel(s).
4102 % o mean: The mean pixel value for the specified channel(s).
4104 % o standard_deviation: The standard deviation for the specified channel(s).
4107 WandExport MagickBooleanType MagickGetImageMean(MagickWand *wand,double *mean,
4108 double *standard_deviation)
4113 assert(wand != (MagickWand *) NULL);
4114 assert(wand->signature == MagickWandSignature);
4115 if (wand->debug != MagickFalse)
4116 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4117 if (wand->images == (Image *) NULL)
4118 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4119 status=GetImageMean(wand->images,mean,standard_deviation,wand->exception);
4124 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4128 % M a g i c k G e t I m a g e R a n g e %
4132 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4134 % MagickGetImageRange() gets the range for one or more image channels.
4136 % The format of the MagickGetImageRange method is:
4138 % MagickBooleanType MagickGetImageRange(MagickWand *wand,double *minima,
4141 % A description of each parameter follows:
4143 % o wand: the magick wand.
4145 % o minima: The minimum pixel value for the specified channel(s).
4147 % o maxima: The maximum pixel value for the specified channel(s).
4150 WandExport MagickBooleanType MagickGetImageRange(MagickWand *wand,
4151 double *minima,double *maxima)
4156 assert(wand != (MagickWand *) NULL);
4157 assert(wand->signature == MagickWandSignature);
4158 if (wand->debug != MagickFalse)
4159 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4160 if (wand->images == (Image *) NULL)
4161 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4162 status=GetImageRange(wand->images,minima,maxima,wand->exception);
4167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4171 % M a g i c k G e t I m a g e S t a t i s t i c s %
4175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4177 % MagickGetImageStatistics() returns statistics for each channel in the
4178 % image. The statistics include the channel depth, its minima and
4179 % maxima, the mean, the standard deviation, the kurtosis and the skewness.
4180 % You can access the red channel mean, for example, like this:
4182 % channel_statistics=MagickGetImageStatistics(wand);
4183 % red_mean=channel_statistics[RedPixelChannel].mean;
4185 % Use MagickRelinquishMemory() to free the statistics buffer.
4187 % The format of the MagickGetImageStatistics method is:
4189 % ChannelStatistics *MagickGetImageStatistics(MagickWand *wand)
4191 % A description of each parameter follows:
4193 % o wand: the magick wand.
4196 WandExport ChannelStatistics *MagickGetImageStatistics(MagickWand *wand)
4198 assert(wand != (MagickWand *) NULL);
4199 assert(wand->signature == MagickWandSignature);
4200 if (wand->debug != MagickFalse)
4201 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4202 if (wand->images == (Image *) NULL)
4204 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4205 "ContainsNoImages","`%s'",wand->name);
4206 return((ChannelStatistics *) NULL);
4208 return(GetImageStatistics(wand->images,wand->exception));
4212 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4216 % M a g i c k G e t I m a g e C o l o r m a p C o l o r %
4220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4222 % MagickGetImageColormapColor() returns the color of the specified colormap
4225 % The format of the MagickGetImageColormapColor method is:
4227 % MagickBooleanType MagickGetImageColormapColor(MagickWand *wand,
4228 % const size_t index,PixelWand *color)
4230 % A description of each parameter follows:
4232 % o wand: the magick wand.
4234 % o index: the offset into the image colormap.
4236 % o color: Return the colormap color in this wand.
4239 WandExport MagickBooleanType MagickGetImageColormapColor(MagickWand *wand,
4240 const size_t index,PixelWand *color)
4242 assert(wand != (MagickWand *) NULL);
4243 assert(wand->signature == MagickWandSignature);
4244 if (wand->debug != MagickFalse)
4245 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4246 if (wand->images == (Image *) NULL)
4247 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4248 if ((wand->images->colormap == (PixelInfo *) NULL) ||
4249 (index >= wand->images->colors))
4251 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4252 "InvalidColormapIndex","`%s'",wand->name);
4253 return(MagickFalse);
4255 PixelSetPixelColor(color,wand->images->colormap+index);
4260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4264 % M a g i c k G e t I m a g e C o l o r s %
4268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4270 % MagickGetImageColors() gets the number of unique colors in the image.
4272 % The format of the MagickGetImageColors method is:
4274 % size_t MagickGetImageColors(MagickWand *wand)
4276 % A description of each parameter follows:
4278 % o wand: the magick wand.
4281 WandExport size_t MagickGetImageColors(MagickWand *wand)
4283 assert(wand != (MagickWand *) NULL);
4284 assert(wand->signature == MagickWandSignature);
4285 if (wand->debug != MagickFalse)
4286 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4287 if (wand->images == (Image *) NULL)
4289 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4290 "ContainsNoImages","`%s'",wand->name);
4293 return(GetNumberColors(wand->images,(FILE *) NULL,wand->exception));
4297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4301 % M a g i c k G e t I m a g e C o l o r s p a c e %
4305 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4307 % MagickGetImageColorspace() gets the image colorspace.
4309 % The format of the MagickGetImageColorspace method is:
4311 % ColorspaceType MagickGetImageColorspace(MagickWand *wand)
4313 % A description of each parameter follows:
4315 % o wand: the magick wand.
4318 WandExport ColorspaceType MagickGetImageColorspace(MagickWand *wand)
4320 assert(wand != (MagickWand *) NULL);
4321 assert(wand->signature == MagickWandSignature);
4322 if (wand->debug != MagickFalse)
4323 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4324 if (wand->images == (Image *) NULL)
4326 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4327 "ContainsNoImages","`%s'",wand->name);
4328 return(UndefinedColorspace);
4330 return(wand->images->colorspace);
4334 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4338 % M a g i c k G e t I m a g e C o m p o s e %
4342 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4344 % MagickGetImageCompose() returns the composite operator associated with the
4347 % The format of the MagickGetImageCompose method is:
4349 % CompositeOperator MagickGetImageCompose(MagickWand *wand)
4351 % A description of each parameter follows:
4353 % o wand: the magick wand.
4356 WandExport CompositeOperator MagickGetImageCompose(MagickWand *wand)
4358 assert(wand != (MagickWand *) NULL);
4359 assert(wand->signature == MagickWandSignature);
4360 if (wand->debug != MagickFalse)
4361 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4362 if (wand->images == (Image *) NULL)
4364 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4365 "ContainsNoImages","`%s'",wand->name);
4366 return(UndefinedCompositeOp);
4368 return(wand->images->compose);
4372 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4376 % M a g i c k G e t I m a g e C o m p r e s s i o n %
4380 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4382 % MagickGetImageCompression() gets the image compression.
4384 % The format of the MagickGetImageCompression method is:
4386 % CompressionType MagickGetImageCompression(MagickWand *wand)
4388 % A description of each parameter follows:
4390 % o wand: the magick wand.
4393 WandExport CompressionType MagickGetImageCompression(MagickWand *wand)
4395 assert(wand != (MagickWand *) NULL);
4396 assert(wand->signature == MagickWandSignature);
4397 if (wand->debug != MagickFalse)
4398 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4399 if (wand->images == (Image *) NULL)
4401 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4402 "ContainsNoImages","`%s'",wand->name);
4403 return(UndefinedCompression);
4405 return(wand->images->compression);
4409 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4413 % M a g i c k G e t I m a g e C o m p r e s s i o n Q u a l i t y %
4417 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4419 % MagickGetImageCompressionQuality() gets the image compression quality.
4421 % The format of the MagickGetImageCompressionQuality method is:
4423 % size_t MagickGetImageCompressionQuality(MagickWand *wand)
4425 % A description of each parameter follows:
4427 % o wand: the magick wand.
4430 WandExport size_t MagickGetImageCompressionQuality(MagickWand *wand)
4432 assert(wand != (MagickWand *) NULL);
4433 assert(wand->signature == MagickWandSignature);
4434 if (wand->debug != MagickFalse)
4435 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4436 if (wand->images == (Image *) NULL)
4438 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4439 "ContainsNoImages","`%s'",wand->name);
4442 return(wand->images->quality);
4446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4450 % M a g i c k G e t I m a g e D e l a y %
4454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4456 % MagickGetImageDelay() gets the image delay.
4458 % The format of the MagickGetImageDelay method is:
4460 % size_t MagickGetImageDelay(MagickWand *wand)
4462 % A description of each parameter follows:
4464 % o wand: the magick wand.
4467 WandExport size_t MagickGetImageDelay(MagickWand *wand)
4469 assert(wand != (MagickWand *) NULL);
4470 assert(wand->signature == MagickWandSignature);
4471 if (wand->debug != MagickFalse)
4472 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4473 if (wand->images == (Image *) NULL)
4474 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4475 return(wand->images->delay);
4479 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4483 % M a g i c k G e t I m a g e D e p t h %
4487 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4489 % MagickGetImageDepth() gets the image depth.
4491 % The format of the MagickGetImageDepth method is:
4493 % size_t MagickGetImageDepth(MagickWand *wand)
4495 % A description of each parameter follows:
4497 % o wand: the magick wand.
4500 WandExport size_t MagickGetImageDepth(MagickWand *wand)
4502 assert(wand != (MagickWand *) NULL);
4503 assert(wand->signature == MagickWandSignature);
4504 if (wand->debug != MagickFalse)
4505 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4506 if (wand->images == (Image *) NULL)
4507 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4508 return(wand->images->depth);
4512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4516 % M a g i c k G e t I m a g e D i s p o s e %
4520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4522 % MagickGetImageDispose() gets the image disposal method.
4524 % The format of the MagickGetImageDispose method is:
4526 % DisposeType MagickGetImageDispose(MagickWand *wand)
4528 % A description of each parameter follows:
4530 % o wand: the magick wand.
4533 WandExport DisposeType MagickGetImageDispose(MagickWand *wand)
4535 assert(wand != (MagickWand *) NULL);
4536 assert(wand->signature == MagickWandSignature);
4537 if (wand->debug != MagickFalse)
4538 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4539 if (wand->images == (Image *) NULL)
4541 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4542 "ContainsNoImages","`%s'",wand->name);
4543 return(UndefinedDispose);
4545 return((DisposeType) wand->images->dispose);
4549 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4553 % M a g i c k G e t I m a g e D i s t o r t i o n %
4557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4559 % MagickGetImageDistortion() compares an image to a reconstructed image and
4560 % returns the specified distortion metric.
4562 % The format of the MagickGetImageDistortion method is:
4564 % MagickBooleanType MagickGetImageDistortion(MagickWand *wand,
4565 % const MagickWand *reference,const MetricType metric,
4566 % double *distortion)
4568 % A description of each parameter follows:
4570 % o wand: the magick wand.
4572 % o reference: the reference wand.
4574 % o metric: the metric.
4576 % o distortion: the computed distortion between the images.
4579 WandExport MagickBooleanType MagickGetImageDistortion(MagickWand *wand,
4580 const MagickWand *reference,const MetricType metric,double *distortion)
4585 assert(wand != (MagickWand *) NULL);
4586 assert(wand->signature == MagickWandSignature);
4587 if (wand->debug != MagickFalse)
4588 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4589 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
4590 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4591 status=GetImageDistortion(wand->images,reference->images,metric,distortion,
4597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4601 % M a g i c k G e t I m a g e D i s t o r t i o n s %
4605 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4607 % MagickGetImageDistortions() compares one or more pixel channels of an
4608 % image to a reconstructed image and returns the specified distortion metrics.
4610 % Use MagickRelinquishMemory() to free the metrics when you are done with them.
4612 % The format of the MagickGetImageDistortion method is:
4614 % double *MagickGetImageDistortion(MagickWand *wand,
4615 % const MagickWand *reference,const MetricType metric)
4617 % A description of each parameter follows:
4619 % o wand: the magick wand.
4621 % o reference: the reference wand.
4623 % o metric: the metric.
4626 WandExport double *MagickGetImageDistortions(MagickWand *wand,
4627 const MagickWand *reference,const MetricType metric)
4630 *channel_distortion;
4632 assert(wand != (MagickWand *) NULL);
4633 assert(wand->signature == MagickWandSignature);
4634 if (wand->debug != MagickFalse)
4635 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4636 assert(reference != (MagickWand *) NULL);
4637 assert(reference->signature == MagickWandSignature);
4638 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
4640 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4641 "ContainsNoImages","`%s'",wand->name);
4642 return((double *) NULL);
4644 channel_distortion=GetImageDistortions(wand->images,reference->images,
4645 metric,wand->exception);
4646 return(channel_distortion);
4650 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4654 % M a g i c k G e t I m a g e E n d i a n %
4658 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4660 % MagickGetImageEndian() gets the image endian.
4662 % The format of the MagickGetImageEndian method is:
4664 % EndianType MagickGetImageEndian(MagickWand *wand)
4666 % A description of each parameter follows:
4668 % o wand: the magick wand.
4671 WandExport EndianType MagickGetImageEndian(MagickWand *wand)
4673 assert(wand != (MagickWand *) NULL);
4674 assert(wand->signature == MagickWandSignature);
4675 if (wand->debug != MagickFalse)
4676 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4677 if (wand->images == (Image *) NULL)
4679 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4680 "ContainsNoImages","`%s'",wand->name);
4681 return(UndefinedEndian);
4683 return(wand->images->endian);
4687 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4691 % M a g i c k G e t I m a g e F i l e n a m e %
4695 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4697 % MagickGetImageFilename() returns the filename of a particular image in a
4700 % The format of the MagickGetImageFilename method is:
4702 % char *MagickGetImageFilename(MagickWand *wand)
4704 % A description of each parameter follows:
4706 % o wand: the magick wand.
4709 WandExport char *MagickGetImageFilename(MagickWand *wand)
4711 assert(wand != (MagickWand *) NULL);
4712 assert(wand->signature == MagickWandSignature);
4713 if (wand->debug != MagickFalse)
4714 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4715 if (wand->images == (Image *) NULL)
4717 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4718 "ContainsNoImages","`%s'",wand->name);
4719 return((char *) NULL);
4721 return(AcquireString(wand->images->filename));
4725 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4729 % M a g i c k G e t I m a g e F o r m a t %
4733 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4735 % MagickGetImageFormat() returns the format of a particular image in a
4738 % The format of the MagickGetImageFormat method is:
4740 % char *MagickGetImageFormat(MagickWand *wand)
4742 % A description of each parameter follows:
4744 % o wand: the magick wand.
4747 WandExport char *MagickGetImageFormat(MagickWand *wand)
4749 assert(wand != (MagickWand *) NULL);
4750 assert(wand->signature == MagickWandSignature);
4751 if (wand->debug != MagickFalse)
4752 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4753 if (wand->images == (Image *) NULL)
4755 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4756 "ContainsNoImages","`%s'",wand->name);
4757 return((char *) NULL);
4759 return(AcquireString(wand->images->magick));
4763 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4767 % M a g i c k G e t I m a g e F u z z %
4771 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4773 % MagickGetImageFuzz() gets the image fuzz.
4775 % The format of the MagickGetImageFuzz method is:
4777 % double MagickGetImageFuzz(MagickWand *wand)
4779 % A description of each parameter follows:
4781 % o wand: the magick wand.
4784 WandExport double MagickGetImageFuzz(MagickWand *wand)
4786 assert(wand != (MagickWand *) NULL);
4787 assert(wand->signature == MagickWandSignature);
4788 if (wand->debug != MagickFalse)
4789 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4790 if (wand->images == (Image *) NULL)
4792 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4793 "ContainsNoImages","`%s'",wand->name);
4796 return(wand->images->fuzz);
4800 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4804 % M a g i c k G e t I m a g e G a m m a %
4808 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4810 % MagickGetImageGamma() gets the image gamma.
4812 % The format of the MagickGetImageGamma method is:
4814 % double MagickGetImageGamma(MagickWand *wand)
4816 % A description of each parameter follows:
4818 % o wand: the magick wand.
4821 WandExport double MagickGetImageGamma(MagickWand *wand)
4823 assert(wand != (MagickWand *) NULL);
4824 assert(wand->signature == MagickWandSignature);
4825 if (wand->debug != MagickFalse)
4826 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4827 if (wand->images == (Image *) NULL)
4829 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4830 "ContainsNoImages","`%s'",wand->name);
4833 return(wand->images->gamma);
4837 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4841 % M a g i c k G e t I m a g e G r a v i t y %
4845 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4847 % MagickGetImageGravity() gets the image gravity.
4849 % The format of the MagickGetImageGravity method is:
4851 % GravityType MagickGetImageGravity(MagickWand *wand)
4853 % A description of each parameter follows:
4855 % o wand: the magick wand.
4858 WandExport GravityType MagickGetImageGravity(MagickWand *wand)
4860 assert(wand != (MagickWand *) NULL);
4861 assert(wand->signature == MagickWandSignature);
4862 if (wand->debug != MagickFalse)
4863 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4864 if (wand->images == (Image *) NULL)
4866 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4867 "ContainsNoImages","`%s'",wand->name);
4868 return(UndefinedGravity);
4870 return(wand->images->gravity);
4874 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4878 % M a g i c k G e t I m a g e G r e e n P r i m a r y %
4882 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4884 % MagickGetImageGreenPrimary() returns the chromaticy green primary point.
4886 % The format of the MagickGetImageGreenPrimary method is:
4888 % MagickBooleanType MagickGetImageGreenPrimary(MagickWand *wand,double *x,
4889 % double *y,double *z)
4891 % A description of each parameter follows:
4893 % o wand: the magick wand.
4895 % o x: the chromaticity green primary x-point.
4897 % o y: the chromaticity green primary y-point.
4899 % o z: the chromaticity green primary z-point.
4902 WandExport MagickBooleanType MagickGetImageGreenPrimary(MagickWand *wand,
4903 double *x,double *y,double *z)
4905 assert(wand != (MagickWand *) NULL);
4906 assert(wand->signature == MagickWandSignature);
4907 if (wand->debug != MagickFalse)
4908 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4909 if (wand->images == (Image *) NULL)
4910 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4911 *x=wand->images->chromaticity.green_primary.x;
4912 *y=wand->images->chromaticity.green_primary.y;
4913 *z=wand->images->chromaticity.green_primary.z;
4918 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4922 % M a g i c k G e t I m a g e H e i g h t %
4926 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4928 % MagickGetImageHeight() returns the image height.
4930 % The format of the MagickGetImageHeight method is:
4932 % size_t MagickGetImageHeight(MagickWand *wand)
4934 % A description of each parameter follows:
4936 % o wand: the magick wand.
4939 WandExport size_t MagickGetImageHeight(MagickWand *wand)
4941 assert(wand != (MagickWand *) NULL);
4942 assert(wand->signature == MagickWandSignature);
4943 if (wand->debug != MagickFalse)
4944 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4945 if (wand->images == (Image *) NULL)
4946 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4947 return(wand->images->rows);
4951 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4955 % M a g i c k G e t I m a g e H i s t o g r a m %
4959 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4961 % MagickGetImageHistogram() returns the image histogram as an array of
4964 % The format of the MagickGetImageHistogram method is:
4966 % PixelWand **MagickGetImageHistogram(MagickWand *wand,
4967 % size_t *number_colors)
4969 % A description of each parameter follows:
4971 % o wand: the magick wand.
4973 % o number_colors: the number of unique colors in the image and the number
4974 % of pixel wands returned.
4977 WandExport PixelWand **MagickGetImageHistogram(MagickWand *wand,
4978 size_t *number_colors)
4989 assert(wand != (MagickWand *) NULL);
4990 assert(wand->signature == MagickWandSignature);
4991 if (wand->debug != MagickFalse)
4992 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4993 if (wand->images == (Image *) NULL)
4995 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4996 "ContainsNoImages","`%s'",wand->name);
4997 return((PixelWand **) NULL);
4999 histogram=GetImageHistogram(wand->images,number_colors,wand->exception);
5000 if (histogram == (PixelInfo *) NULL)
5001 return((PixelWand **) NULL);
5002 pixel_wands=NewPixelWands(*number_colors);
5003 for (i=0; i < (ssize_t) *number_colors; i++)
5005 PixelSetPixelColor(pixel_wands[i],&histogram[i]);
5006 PixelSetColorCount(pixel_wands[i],(size_t) histogram[i].count);
5008 histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
5009 return(pixel_wands);
5013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5017 % M a g i c k G e t I m a g e I n t e r l a c e S c h e m e %
5021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5023 % MagickGetImageInterlaceScheme() gets the image interlace scheme.
5025 % The format of the MagickGetImageInterlaceScheme method is:
5027 % InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)
5029 % A description of each parameter follows:
5031 % o wand: the magick wand.
5034 WandExport InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)
5036 assert(wand != (MagickWand *) NULL);
5037 assert(wand->signature == MagickWandSignature);
5038 if (wand->debug != MagickFalse)
5039 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5040 if (wand->images == (Image *) NULL)
5042 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5043 "ContainsNoImages","`%s'",wand->name);
5044 return(UndefinedInterlace);
5046 return(wand->images->interlace);
5050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5054 % M a g i c k G e t I m a g e I n t e r p o l a t e M e t h o d %
5058 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5060 % MagickGetImageInterpolateMethod() returns the interpolation method for the
5063 % The format of the MagickGetImageInterpolateMethod method is:
5065 % PixelInterpolateMethod MagickGetImageInterpolateMethod(MagickWand *wand)
5067 % A description of each parameter follows:
5069 % o wand: the magick wand.
5072 WandExport PixelInterpolateMethod MagickGetImageInterpolateMethod(
5075 assert(wand != (MagickWand *) NULL);
5076 assert(wand->signature == MagickWandSignature);
5077 if (wand->debug != MagickFalse)
5078 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5079 if (wand->images == (Image *) NULL)
5081 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5082 "ContainsNoImages","`%s'",wand->name);
5083 return(UndefinedInterpolatePixel);
5085 return(wand->images->interpolate);
5089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5093 % M a g i c k G e t I m a g e I t e r a t i o n s %
5097 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5099 % MagickGetImageIterations() gets the image iterations.
5101 % The format of the MagickGetImageIterations method is:
5103 % size_t MagickGetImageIterations(MagickWand *wand)
5105 % A description of each parameter follows:
5107 % o wand: the magick wand.
5110 WandExport size_t MagickGetImageIterations(MagickWand *wand)
5112 assert(wand != (MagickWand *) NULL);
5113 assert(wand->signature == MagickWandSignature);
5114 if (wand->debug != MagickFalse)
5115 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5116 if (wand->images == (Image *) NULL)
5117 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5118 return(wand->images->iterations);
5122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5126 % M a g i c k G e t I m a g e L e n g t h %
5130 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5132 % MagickGetImageLength() returns the image length in bytes.
5134 % The format of the MagickGetImageLength method is:
5136 % MagickBooleanType MagickGetImageLength(MagickWand *wand,
5137 % MagickSizeType *length)
5139 % A description of each parameter follows:
5141 % o wand: the magick wand.
5143 % o length: the image length in bytes.
5146 WandExport MagickBooleanType MagickGetImageLength(MagickWand *wand,
5147 MagickSizeType *length)
5149 assert(wand != (MagickWand *) NULL);
5150 assert(wand->signature == MagickWandSignature);
5151 if (wand->debug != MagickFalse)
5152 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5153 if (wand->images == (Image *) NULL)
5154 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5155 *length=GetBlobSize(wand->images);
5160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5164 % M a g i c k G e t I m a g e M a t t e C o l o r %
5168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5170 % MagickGetImageMatteColor() returns the image matte color.
5172 % The format of the MagickGetImageMatteColor method is:
5174 % MagickBooleanType MagickGetImageMatteColor(MagickWand *wand,
5175 % PixelWand *matte_color)
5177 % A description of each parameter follows:
5179 % o wand: the magick wand.
5181 % o matte_color: return the alpha color.
5184 WandExport MagickBooleanType MagickGetImageMatteColor(MagickWand *wand,
5185 PixelWand *matte_color)
5187 assert(wand != (MagickWand *)NULL);
5188 assert(wand->signature == MagickWandSignature);
5189 if (wand->debug != MagickFalse)
5190 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5191 if (wand->images == (Image *)NULL)
5192 ThrowWandException(WandError, "ContainsNoImages", wand->name);
5193 PixelSetPixelColor(matte_color,&wand->images->matte_color);
5198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5202 % M a g i c k G e t I m a g e O r i e n t a t i o n %
5206 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5208 % MagickGetImageOrientation() returns the image orientation.
5210 % The format of the MagickGetImageOrientation method is:
5212 % OrientationType MagickGetImageOrientation(MagickWand *wand)
5214 % A description of each parameter follows:
5216 % o wand: the magick wand.
5219 WandExport OrientationType MagickGetImageOrientation(MagickWand *wand)
5221 assert(wand != (MagickWand *) NULL);
5222 assert(wand->signature == MagickWandSignature);
5223 if (wand->debug != MagickFalse)
5224 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5225 if (wand->images == (Image *) NULL)
5227 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5228 "ContainsNoImages","`%s'",wand->name);
5229 return(UndefinedOrientation);
5231 return(wand->images->orientation);
5235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5239 % M a g i c k G e t I m a g e P a g e %
5243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5245 % MagickGetImagePage() returns the page geometry associated with the image.
5247 % The format of the MagickGetImagePage method is:
5249 % MagickBooleanType MagickGetImagePage(MagickWand *wand,
5250 % size_t *width,size_t *height,ssize_t *x,ssize_t *y)
5252 % A description of each parameter follows:
5254 % o wand: the magick wand.
5256 % o width: the page width.
5258 % o height: the page height.
5260 % o x: the page x-offset.
5262 % o y: the page y-offset.
5265 WandExport MagickBooleanType MagickGetImagePage(MagickWand *wand,
5266 size_t *width,size_t *height,ssize_t *x,ssize_t *y)
5268 assert(wand != (const MagickWand *) NULL);
5269 assert(wand->signature == MagickWandSignature);
5270 if (wand->debug != MagickFalse)
5271 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5272 if (wand->images == (Image *) NULL)
5273 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5274 *width=wand->images->page.width;
5275 *height=wand->images->page.height;
5276 *x=wand->images->page.x;
5277 *y=wand->images->page.y;
5282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5286 % M a g i c k G e t I m a g e P i x e l C o l o r %
5290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5292 % MagickGetImagePixelColor() returns the color of the specified pixel.
5294 % The format of the MagickGetImagePixelColor method is:
5296 % MagickBooleanType MagickGetImagePixelColor(MagickWand *wand,
5297 % const ssize_t x,const ssize_t y,PixelWand *color)
5299 % A description of each parameter follows:
5301 % o wand: the magick wand.
5303 % o x,y: the pixel offset into the image.
5305 % o color: Return the colormap color in this wand.
5308 WandExport MagickBooleanType MagickGetImagePixelColor(MagickWand *wand,
5309 const ssize_t x,const ssize_t y,PixelWand *color)
5311 register const Quantum
5317 assert(wand != (MagickWand *) NULL);
5318 assert(wand->signature == MagickWandSignature);
5319 if (wand->debug != MagickFalse)
5320 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5321 if (wand->images == (Image *) NULL)
5322 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5323 image_view=AcquireVirtualCacheView(wand->images,wand->exception);
5324 p=GetCacheViewVirtualPixels(image_view,x,y,1,1,wand->exception);
5325 if (p == (const Quantum *) NULL)
5327 image_view=DestroyCacheView(image_view);
5328 return(MagickFalse);
5330 PixelSetQuantumPixel(wand->images,p,color);
5331 image_view=DestroyCacheView(image_view);
5336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5340 % M a g i c k G e t I m a g e R e d P r i m a r y %
5344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5346 % MagickGetImageRedPrimary() returns the chromaticy red primary point.
5348 % The format of the MagickGetImageRedPrimary method is:
5350 % MagickBooleanType MagickGetImageRedPrimary(MagickWand *wand,double *x,
5351 % double *y, double *z)
5353 % A description of each parameter follows:
5355 % o wand: the magick wand.
5357 % o x: the chromaticity red primary x-point.
5359 % o y: the chromaticity red primary y-point.
5361 % o z: the chromaticity red primary z-point.
5364 WandExport MagickBooleanType MagickGetImageRedPrimary(MagickWand *wand,
5365 double *x,double *y,double *z)
5367 assert(wand != (MagickWand *) NULL);
5368 assert(wand->signature == MagickWandSignature);
5369 if (wand->debug != MagickFalse)
5370 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5371 if (wand->images == (Image *) NULL)
5372 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5373 *x=wand->images->chromaticity.red_primary.x;
5374 *y=wand->images->chromaticity.red_primary.y;
5375 *z=wand->images->chromaticity.red_primary.z;
5380 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5384 % M a g i c k G e t I m a g e R e g i o n %
5388 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5390 % MagickGetImageRegion() extracts a region of the image and returns it as a
5393 % The format of the MagickGetImageRegion method is:
5395 % MagickWand *MagickGetImageRegion(MagickWand *wand,
5396 % const size_t width,const size_t height,const ssize_t x,
5399 % A description of each parameter follows:
5401 % o wand: the magick wand.
5403 % o width: the region width.
5405 % o height: the region height.
5407 % o x: the region x offset.
5409 % o y: the region y offset.
5412 WandExport MagickWand *MagickGetImageRegion(MagickWand *wand,
5413 const size_t width,const size_t height,const ssize_t x,
5422 assert(wand != (MagickWand *) NULL);
5423 assert(wand->signature == MagickWandSignature);
5424 if (wand->debug != MagickFalse)
5425 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5426 if (wand->images == (Image *) NULL)
5427 return((MagickWand *) NULL);
5429 region.height=height;
5432 region_image=CropImage(wand->images,®ion,wand->exception);
5433 if (region_image == (Image *) NULL)
5434 return((MagickWand *) NULL);
5435 return(CloneMagickWandFromImages(wand,region_image));
5439 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5443 % M a g i c k G e t I m a g e R e n d e r i n g I n t e n t %
5447 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5449 % MagickGetImageRenderingIntent() gets the image rendering intent.
5451 % The format of the MagickGetImageRenderingIntent method is:
5453 % RenderingIntent MagickGetImageRenderingIntent(MagickWand *wand)
5455 % A description of each parameter follows:
5457 % o wand: the magick wand.
5460 WandExport RenderingIntent MagickGetImageRenderingIntent(MagickWand *wand)
5462 assert(wand != (MagickWand *) NULL);
5463 assert(wand->signature == MagickWandSignature);
5464 if (wand->debug != MagickFalse)
5465 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5466 if (wand->images == (Image *) NULL)
5468 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5469 "ContainsNoImages","`%s'",wand->name);
5470 return(UndefinedIntent);
5472 return((RenderingIntent) wand->images->rendering_intent);
5476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5480 % M a g i c k G e t I m a g e R e s o l u t i o n %
5484 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5486 % MagickGetImageResolution() gets the image X and Y resolution.
5488 % The format of the MagickGetImageResolution method is:
5490 % MagickBooleanType MagickGetImageResolution(MagickWand *wand,double *x,
5493 % A description of each parameter follows:
5495 % o wand: the magick wand.
5497 % o x: the image x-resolution.
5499 % o y: the image y-resolution.
5502 WandExport MagickBooleanType MagickGetImageResolution(MagickWand *wand,
5503 double *x,double *y)
5505 assert(wand != (MagickWand *) NULL);
5506 assert(wand->signature == MagickWandSignature);
5507 if (wand->debug != MagickFalse)
5508 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5509 if (wand->images == (Image *) NULL)
5510 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5511 *x=wand->images->resolution.x;
5512 *y=wand->images->resolution.y;
5517 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5521 % M a g i c k G e t I m a g e S c e n e %
5525 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5527 % MagickGetImageScene() gets the image scene.
5529 % The format of the MagickGetImageScene method is:
5531 % size_t MagickGetImageScene(MagickWand *wand)
5533 % A description of each parameter follows:
5535 % o wand: the magick wand.
5538 WandExport size_t MagickGetImageScene(MagickWand *wand)
5540 assert(wand != (MagickWand *) NULL);
5541 assert(wand->signature == MagickWandSignature);
5542 if (wand->debug != MagickFalse)
5543 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5544 if (wand->images == (Image *) NULL)
5545 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5546 return(wand->images->scene);
5550 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5554 % M a g i c k G e t I m a g e S i g n a t u r e %
5558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5560 % MagickGetImageSignature() generates an SHA-256 message digest for the image
5563 % The format of the MagickGetImageSignature method is:
5565 % char *MagickGetImageSignature(MagickWand *wand)
5567 % A description of each parameter follows:
5569 % o wand: the magick wand.
5572 WandExport char *MagickGetImageSignature(MagickWand *wand)
5580 assert(wand != (MagickWand *) NULL);
5581 assert(wand->signature == MagickWandSignature);
5582 if (wand->debug != MagickFalse)
5583 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5584 if (wand->images == (Image *) NULL)
5586 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5587 "ContainsNoImages","`%s'",wand->name);
5588 return((char *) NULL);
5590 status=SignatureImage(wand->images,wand->exception);
5591 if (status == MagickFalse)
5592 return((char *) NULL);
5593 value=GetImageProperty(wand->images,"signature",wand->exception);
5594 if (value == (const char *) NULL)
5595 return((char *) NULL);
5596 return(AcquireString(value));
5600 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5604 % M a g i c k G e t I m a g e T i c k s P e r S e c o n d %
5608 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5610 % MagickGetImageTicksPerSecond() gets the image ticks-per-second.
5612 % The format of the MagickGetImageTicksPerSecond method is:
5614 % size_t MagickGetImageTicksPerSecond(MagickWand *wand)
5616 % A description of each parameter follows:
5618 % o wand: the magick wand.
5621 WandExport size_t MagickGetImageTicksPerSecond(MagickWand *wand)
5623 assert(wand != (MagickWand *) NULL);
5624 assert(wand->signature == MagickWandSignature);
5625 if (wand->debug != MagickFalse)
5626 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5627 if (wand->images == (Image *) NULL)
5628 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5629 return((size_t) wand->images->ticks_per_second);
5633 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5637 % M a g i c k G e t I m a g e T y p e %
5641 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5643 % MagickGetImageType() gets the potential image type:
5645 % Bilevel Grayscale GrayscaleMatte
5646 % Palette PaletteMatte TrueColor
5647 % TrueColorMatte ColorSeparation ColorSeparationMatte
5649 % The format of the MagickGetImageType method is:
5651 % ImageType MagickGetImageType(MagickWand *wand)
5653 % A description of each parameter follows:
5655 % o wand: the magick wand.
5658 WandExport ImageType MagickGetImageType(MagickWand *wand)
5660 assert(wand != (MagickWand *) NULL);
5661 assert(wand->signature == MagickWandSignature);
5662 if (wand->debug != MagickFalse)
5663 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5664 if (wand->images == (Image *) NULL)
5666 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5667 "ContainsNoImages","`%s'",wand->name);
5668 return(UndefinedType);
5670 return(GetImageType(wand->images));
5674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5678 % M a g i c k G e t I m a g e U n i t s %
5682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5684 % MagickGetImageUnits() gets the image units of resolution.
5686 % The format of the MagickGetImageUnits method is:
5688 % ResolutionType MagickGetImageUnits(MagickWand *wand)
5690 % A description of each parameter follows:
5692 % o wand: the magick wand.
5695 WandExport ResolutionType MagickGetImageUnits(MagickWand *wand)
5697 assert(wand != (MagickWand *) NULL);
5698 assert(wand->signature == MagickWandSignature);
5699 if (wand->debug != MagickFalse)
5700 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5701 if (wand->images == (Image *) NULL)
5703 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5704 "ContainsNoImages","`%s'",wand->name);
5705 return(UndefinedResolution);
5707 return(wand->images->units);
5711 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5715 % M a g i c k G e t I m a g e V i r t u a l P i x e l M e t h o d %
5719 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5721 % MagickGetImageVirtualPixelMethod() returns the virtual pixel method for the
5724 % The format of the MagickGetImageVirtualPixelMethod method is:
5726 % VirtualPixelMethod MagickGetImageVirtualPixelMethod(MagickWand *wand)
5728 % A description of each parameter follows:
5730 % o wand: the magick wand.
5733 WandExport VirtualPixelMethod MagickGetImageVirtualPixelMethod(MagickWand *wand)
5735 assert(wand != (MagickWand *) NULL);
5736 assert(wand->signature == MagickWandSignature);
5737 if (wand->debug != MagickFalse)
5738 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5739 if (wand->images == (Image *) NULL)
5741 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5742 "ContainsNoImages","`%s'",wand->name);
5743 return(UndefinedVirtualPixelMethod);
5745 return(GetImageVirtualPixelMethod(wand->images));
5749 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5753 % M a g i c k G e t I m a g e W h i t e P o i n t %
5757 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5759 % MagickGetImageWhitePoint() returns the chromaticy white point.
5761 % The format of the MagickGetImageWhitePoint method is:
5763 % MagickBooleanType MagickGetImageWhitePoint(MagickWand *wand,double *x,
5764 % double *y,double *z)
5766 % A description of each parameter follows:
5768 % o wand: the magick wand.
5770 % o x: the chromaticity white x-point.
5772 % o y: the chromaticity white y-point.
5774 % o z: the chromaticity white z-point.
5777 WandExport MagickBooleanType MagickGetImageWhitePoint(MagickWand *wand,
5778 double *x,double *y,double *z)
5780 assert(wand != (MagickWand *) NULL);
5781 assert(wand->signature == MagickWandSignature);
5782 if (wand->debug != MagickFalse)
5783 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5784 if (wand->images == (Image *) NULL)
5785 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5786 *x=wand->images->chromaticity.white_point.x;
5787 *y=wand->images->chromaticity.white_point.y;
5788 *z=wand->images->chromaticity.white_point.z;
5793 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5797 % M a g i c k G e t I m a g e W i d t h %
5801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5803 % MagickGetImageWidth() returns the image width.
5805 % The format of the MagickGetImageWidth method is:
5807 % size_t MagickGetImageWidth(MagickWand *wand)
5809 % A description of each parameter follows:
5811 % o wand: the magick wand.
5814 WandExport size_t MagickGetImageWidth(MagickWand *wand)
5816 assert(wand != (MagickWand *) NULL);
5817 assert(wand->signature == MagickWandSignature);
5818 if (wand->debug != MagickFalse)
5819 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5820 if (wand->images == (Image *) NULL)
5821 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5822 return(wand->images->columns);
5826 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5830 % M a g i c k G e t N u m b e r I m a g e s %
5834 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5836 % MagickGetNumberImages() returns the number of images associated with a
5839 % The format of the MagickGetNumberImages method is:
5841 % size_t MagickGetNumberImages(MagickWand *wand)
5843 % A description of each parameter follows:
5845 % o wand: the magick wand.
5848 WandExport size_t MagickGetNumberImages(MagickWand *wand)
5850 assert(wand != (MagickWand *) NULL);
5851 assert(wand->signature == MagickWandSignature);
5852 if (wand->debug != MagickFalse)
5853 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5854 return(GetImageListLength(wand->images));
5858 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5862 % M a g i c k I m a g e G e t T o t a l I n k D e n s i t y %
5866 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5868 % MagickGetImageTotalInkDensity() gets the image total ink density.
5870 % The format of the MagickGetImageTotalInkDensity method is:
5872 % double MagickGetImageTotalInkDensity(MagickWand *wand)
5874 % A description of each parameter follows:
5876 % o wand: the magick wand.
5879 WandExport double MagickGetImageTotalInkDensity(MagickWand *wand)
5881 assert(wand != (MagickWand *) NULL);
5882 assert(wand->signature == MagickWandSignature);
5883 if (wand->debug != MagickFalse)
5884 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5885 if (wand->images == (Image *) NULL)
5887 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5888 "ContainsNoImages","`%s'",wand->name);
5891 return(GetImageTotalInkDensity(wand->images,wand->exception));
5895 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5899 % M a g i c k H a l d C l u t I m a g e %
5903 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5905 % MagickHaldClutImage() replaces colors in the image from a Hald color lookup
5906 % table. A Hald color lookup table is a 3-dimensional color cube mapped to 2
5907 % dimensions. Create it with the HALD coder. You can apply any color
5908 % transformation to the Hald image and then use this method to apply the
5909 % transform to the image.
5911 % The format of the MagickHaldClutImage method is:
5913 % MagickBooleanType MagickHaldClutImage(MagickWand *wand,
5914 % const MagickWand *hald_wand)
5916 % A description of each parameter follows:
5918 % o wand: the magick wand.
5920 % o hald_image: the hald CLUT image.
5923 WandExport MagickBooleanType MagickHaldClutImage(MagickWand *wand,
5924 const MagickWand *hald_wand)
5929 assert(wand != (MagickWand *) NULL);
5930 assert(wand->signature == MagickWandSignature);
5931 if (wand->debug != MagickFalse)
5932 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5933 if ((wand->images == (Image *) NULL) || (hald_wand->images == (Image *) NULL))
5934 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5935 status=HaldClutImage(wand->images,hald_wand->images,wand->exception);
5940 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5944 % M a g i c k H a s N e x t I m a g e %
5948 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5950 % MagickHasNextImage() returns MagickTrue if the wand has more images when
5951 % traversing the list in the forward direction
5953 % The format of the MagickHasNextImage method is:
5955 % MagickBooleanType MagickHasNextImage(MagickWand *wand)
5957 % A description of each parameter follows:
5959 % o wand: the magick wand.
5962 WandExport MagickBooleanType MagickHasNextImage(MagickWand *wand)
5964 assert(wand != (MagickWand *) NULL);
5965 assert(wand->signature == MagickWandSignature);
5966 if (wand->debug != MagickFalse)
5967 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5968 if (wand->images == (Image *) NULL)
5969 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5970 if (GetNextImageInList(wand->images) == (Image *) NULL)
5971 return(MagickFalse);
5976 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5980 % M a g i c k H a s P r e v i o u s I m a g e %
5984 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5986 % MagickHasPreviousImage() returns MagickTrue if the wand has more images when
5987 % traversing the list in the reverse direction
5989 % The format of the MagickHasPreviousImage method is:
5991 % MagickBooleanType MagickHasPreviousImage(MagickWand *wand)
5993 % A description of each parameter follows:
5995 % o wand: the magick wand.
5998 WandExport MagickBooleanType MagickHasPreviousImage(MagickWand *wand)
6000 assert(wand != (MagickWand *) NULL);
6001 assert(wand->signature == MagickWandSignature);
6002 if (wand->debug != MagickFalse)
6003 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6004 if (wand->images == (Image *) NULL)
6005 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6006 if (GetPreviousImageInList(wand->images) == (Image *) NULL)
6007 return(MagickFalse);
6012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6016 % M a g i c k I d e n t i f y I m a g e %
6020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6022 % MagickIdentifyImage() identifies an image by printing its attributes to the
6023 % file. Attributes include the image width, height, size, and others.
6025 % The format of the MagickIdentifyImage method is:
6027 % const char *MagickIdentifyImage(MagickWand *wand)
6029 % A description of each parameter follows:
6031 % o wand: the magick wand.
6034 WandExport char *MagickIdentifyImage(MagickWand *wand)
6038 filename[MagickPathExtent];
6046 assert(wand != (MagickWand *) NULL);
6047 assert(wand->signature == MagickWandSignature);
6048 if (wand->debug != MagickFalse)
6049 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6050 if (wand->images == (Image *) NULL)
6052 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
6053 "ContainsNoImages","`%s'",wand->name);
6054 return((char *) NULL);
6056 description=(char *) NULL;
6057 unique_file=AcquireUniqueFileResource(filename);
6059 if (unique_file != -1)
6060 file=fdopen(unique_file,"wb");
6061 if ((unique_file == -1) || (file == (FILE *) NULL))
6063 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
6064 "UnableToCreateTemporaryFile","`%s'",wand->name);
6065 return((char *) NULL);
6067 (void) IdentifyImage(wand->images,file,MagickTrue,wand->exception);
6068 (void) fclose(file);
6069 description=FileToString(filename,~0UL,wand->exception);
6070 (void) RelinquishUniqueFileResource(filename);
6071 return(description);
6075 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6079 % M a g i c k I d e n t i f y I m a g e T y p e %
6083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6085 % MagickIdentifyImageType() gets the potential image type:
6087 % Bilevel Grayscale GrayscaleMatte
6088 % Palette PaletteMatte TrueColor
6089 % TrueColorMatte ColorSeparation ColorSeparationMatte
6091 % To ensure the image type matches its potential, use MagickSetImageType():
6093 % (void) MagickSetImageType(wand,MagickIdentifyImageType(wand));
6095 % The format of the MagickIdentifyImageType method is:
6097 % ImageType MagickIdentifyImageType(MagickWand *wand)
6099 % A description of each parameter follows:
6101 % o wand: the magick wand.
6104 WandExport ImageType MagickIdentifyImageType(MagickWand *wand)
6106 assert(wand != (MagickWand *) NULL);
6107 assert(wand->signature == MagickWandSignature);
6108 if (wand->debug != MagickFalse)
6109 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6110 if (wand->images == (Image *) NULL)
6112 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
6113 "ContainsNoImages","`%s'",wand->name);
6114 return(UndefinedType);
6116 return(IdentifyImageType(wand->images,wand->exception));
6120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6124 % M a g i c k I m p l o d e I m a g e %
6128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6130 % MagickImplodeImage() creates a new image that is a copy of an existing
6131 % one with the image pixels "implode" by the specified percentage. It
6132 % allocates the memory necessary for the new Image structure and returns a
6133 % pointer to the new image.
6135 % The format of the MagickImplodeImage method is:
6137 % MagickBooleanType MagickImplodeImage(MagickWand *wand,
6138 % const double radius,const PixelInterpolateMethod method)
6140 % A description of each parameter follows:
6142 % o wand: the magick wand.
6144 % o amount: Define the extent of the implosion.
6146 % o method: the pixel interpolation method.
6149 WandExport MagickBooleanType MagickImplodeImage(MagickWand *wand,
6150 const double amount,const PixelInterpolateMethod method)
6155 assert(wand != (MagickWand *) NULL);
6156 assert(wand->signature == MagickWandSignature);
6157 if (wand->debug != MagickFalse)
6158 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6159 if (wand->images == (Image *) NULL)
6160 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6161 implode_image=ImplodeImage(wand->images,amount,method,wand->exception);
6162 if (implode_image == (Image *) NULL)
6163 return(MagickFalse);
6164 ReplaceImageInList(&wand->images,implode_image);
6169 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6173 % M a g i c k I m p o r t I m a g e P i x e l s %
6177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6179 % MagickImportImagePixels() accepts pixel datand stores it in the image at the
6180 % location you specify. The method returns MagickFalse on success otherwise
6181 % MagickTrue if an error is encountered. The pixel data can be either char,
6182 % short int, int, ssize_t, float, or double in the order specified by map.
6184 % Suppose your want to upload the first scanline of a 640x480 image from
6185 % character data in red-green-blue order:
6187 % MagickImportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
6189 % The format of the MagickImportImagePixels method is:
6191 % MagickBooleanType MagickImportImagePixels(MagickWand *wand,
6192 % const ssize_t x,const ssize_t y,const size_t columns,
6193 % const size_t rows,const char *map,const StorageType storage,
6194 % const void *pixels)
6196 % A description of each parameter follows:
6198 % o wand: the magick wand.
6200 % o x, y, columns, rows: These values define the perimeter of a region
6201 % of pixels you want to define.
6203 % o map: This string reflects the expected ordering of the pixel array.
6204 % It can be any combination or order of R = red, G = green, B = blue,
6205 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
6206 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
6209 % o storage: Define the data type of the pixels. Float and double types are
6210 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
6211 % these types: CharPixel, ShortPixel, IntegerPixel, LongPixel, FloatPixel,
6214 % o pixels: This array of values contain the pixel components as defined by
6215 % map and type. You must preallocate this array where the expected
6216 % length varies depending on the values of width, height, map, and type.
6219 WandExport MagickBooleanType MagickImportImagePixels(MagickWand *wand,
6220 const ssize_t x,const ssize_t y,const size_t columns,const size_t rows,
6221 const char *map,const StorageType storage,const void *pixels)
6226 assert(wand != (MagickWand *) NULL);
6227 assert(wand->signature == MagickWandSignature);
6228 if (wand->debug != MagickFalse)
6229 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6230 if (wand->images == (Image *) NULL)
6231 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6232 status=ImportImagePixels(wand->images,x,y,columns,rows,map,storage,pixels,
6238 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6242 % M a g i c k I n t e r p o l a t i v e R e s i z e I m a g e %
6246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6248 % MagickInterpolativeResizeImage() resize image using a interpolative
6251 % MagickBooleanType MagickInterpolativeResizeImage(MagickWand *wand,
6252 % const size_t columns,const size_t rows,
6253 % const PixelInterpolateMethod method)
6255 % A description of each parameter follows:
6257 % o wand: the magick wand.
6259 % o columns: the number of columns in the scaled image.
6261 % o rows: the number of rows in the scaled image.
6263 % o interpolate: the pixel interpolation method.
6266 WandExport MagickBooleanType MagickInterpolativeResizeImage(MagickWand *wand,
6267 const size_t columns,const size_t rows,const PixelInterpolateMethod method)
6272 assert(wand != (MagickWand *) NULL);
6273 assert(wand->signature == MagickWandSignature);
6274 if (wand->debug != MagickFalse)
6275 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6276 if (wand->images == (Image *) NULL)
6277 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6278 resize_image=InterpolativeResizeImage(wand->images,columns,rows,method,
6280 if (resize_image == (Image *) NULL)
6281 return(MagickFalse);
6282 ReplaceImageInList(&wand->images,resize_image);
6287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6291 % M a g i c k I n v e r s e F o u r i e r T r a n s f o r m I m a g e %
6295 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6297 % MagickInverseFourierTransformImage() implements the inverse discrete
6298 % Fourier transform (DFT) of the image either as a magnitude / phase or real /
6299 % imaginary image pair.
6301 % The format of the MagickInverseFourierTransformImage method is:
6303 % MagickBooleanType MagickInverseFourierTransformImage(
6304 % MagickWand *magnitude_wand,MagickWand *phase_wand,
6305 % const MagickBooleanType magnitude)
6307 % A description of each parameter follows:
6309 % o magnitude_wand: the magnitude or real wand.
6311 % o phase_wand: the phase or imaginary wand.
6313 % o magnitude: if true, return as magnitude / phase pair otherwise a real /
6314 % imaginary image pair.
6317 WandExport MagickBooleanType MagickInverseFourierTransformImage(
6318 MagickWand *magnitude_wand,MagickWand *phase_wand,
6319 const MagickBooleanType magnitude)
6327 assert(magnitude_wand != (MagickWand *) NULL);
6328 assert(magnitude_wand->signature == MagickWandSignature);
6329 if (magnitude_wand->debug != MagickFalse)
6330 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",
6331 magnitude_wand->name);
6332 wand=magnitude_wand;
6333 if (magnitude_wand->images == (Image *) NULL)
6334 ThrowWandException(WandError,"ContainsNoImages",
6335 magnitude_wand->name);
6336 assert(phase_wand != (MagickWand *) NULL);
6337 assert(phase_wand->signature == MagickWandSignature);
6338 inverse_image=InverseFourierTransformImage(magnitude_wand->images,
6339 phase_wand->images,magnitude,wand->exception);
6340 if (inverse_image == (Image *) NULL)
6341 return(MagickFalse);
6342 ReplaceImageInList(&wand->images,inverse_image);
6347 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6351 % M a g i c k L a b e l I m a g e %
6355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6357 % MagickLabelImage() adds a label to your image.
6359 % The format of the MagickLabelImage method is:
6361 % MagickBooleanType MagickLabelImage(MagickWand *wand,const char *label)
6363 % A description of each parameter follows:
6365 % o wand: the magick wand.
6367 % o label: the image label.
6370 WandExport MagickBooleanType MagickLabelImage(MagickWand *wand,
6376 assert(wand != (MagickWand *) NULL);
6377 assert(wand->signature == MagickWandSignature);
6378 if (wand->debug != MagickFalse)
6379 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6380 if (wand->images == (Image *) NULL)
6381 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6382 status=SetImageProperty(wand->images,"label",label,wand->exception);
6387 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6391 % M a g i c k L e v e l I m a g e %
6395 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6397 % MagickLevelImage() adjusts the levels of an image by scaling the colors
6398 % falling between specified white and black points to the full available
6399 % quantum range. The parameters provided represent the black, mid, and white
6400 % points. The black point specifies the darkest color in the image. Colors
6401 % darker than the black point are set to zero. Mid point specifies a gamma
6402 % correction to apply to the image. White point specifies the lightest color
6403 % in the image. Colors brighter than the white point are set to the maximum
6406 % The format of the MagickLevelImage method is:
6408 % MagickBooleanType MagickLevelImage(MagickWand *wand,
6409 % const double black_point,const double gamma,const double white_point)
6410 % MagickBooleanType MagickLevelImage(MagickWand *wand,
6411 % const ChannelType channel,const double black_point,const double gamma,
6412 % const double white_point)
6414 % A description of each parameter follows:
6416 % o wand: the magick wand.
6418 % o channel: Identify which channel to level: RedPixelChannel,
6419 % GreenPixelChannel, etc.
6421 % o black_point: the black point.
6423 % o gamma: the gamma.
6425 % o white_point: the white point.
6428 WandExport MagickBooleanType MagickLevelImage(MagickWand *wand,
6429 const double black_point,const double gamma,const double white_point)
6434 assert(wand != (MagickWand *) NULL);
6435 assert(wand->signature == MagickWandSignature);
6436 if (wand->debug != MagickFalse)
6437 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6438 if (wand->images == (Image *) NULL)
6439 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6440 status=LevelImage(wand->images,black_point,white_point,gamma,
6446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6450 % M a g i c k L i n e a r S t r e t c h I m a g e %
6454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6456 % MagickLinearStretchImage() stretches with saturation the image intensity.
6458 % You can also reduce the influence of a particular channel with a gamma
6461 % The format of the MagickLinearStretchImage method is:
6463 % MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
6464 % const double black_point,const double white_point)
6466 % A description of each parameter follows:
6468 % o wand: the magick wand.
6470 % o black_point: the black point.
6472 % o white_point: the white point.
6475 WandExport MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
6476 const double black_point,const double white_point)
6481 assert(wand != (MagickWand *) NULL);
6482 assert(wand->signature == MagickWandSignature);
6483 if (wand->debug != MagickFalse)
6484 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6485 if (wand->images == (Image *) NULL)
6486 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6487 status=LinearStretchImage(wand->images,black_point,white_point,
6493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6497 % M a g i c k L i q u i d R e s c a l e I m a g e %
6501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6503 % MagickLiquidRescaleImage() rescales image with seam carving.
6505 % MagickBooleanType MagickLiquidRescaleImage(MagickWand *wand,
6506 % const size_t columns,const size_t rows,
6507 % const double delta_x,const double rigidity)
6509 % A description of each parameter follows:
6511 % o wand: the magick wand.
6513 % o columns: the number of columns in the scaled image.
6515 % o rows: the number of rows in the scaled image.
6517 % o delta_x: maximum seam transversal step (0 means straight seams).
6519 % o rigidity: introduce a bias for non-straight seams (typically 0).
6522 WandExport MagickBooleanType MagickLiquidRescaleImage(MagickWand *wand,
6523 const size_t columns,const size_t rows,const double delta_x,
6524 const double rigidity)
6529 assert(wand != (MagickWand *) NULL);
6530 assert(wand->signature == MagickWandSignature);
6531 if (wand->debug != MagickFalse)
6532 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6533 if (wand->images == (Image *) NULL)
6534 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6535 rescale_image=LiquidRescaleImage(wand->images,columns,rows,delta_x,
6536 rigidity,wand->exception);
6537 if (rescale_image == (Image *) NULL)
6538 return(MagickFalse);
6539 ReplaceImageInList(&wand->images,rescale_image);
6544 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6548 % M a g i c k L o c a l C o n t r a s t I m a g e %
6552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6554 % MagickLocalContrastImage() attempts to increase the appearance of
6555 % large-scale light-dark transitions. Local contrast enhancement works
6556 % similarly to sharpening with an unsharp mask, however the mask is instead
6557 % created using an image with a greater blur distance.
6559 % MagickBooleanType MagickLocalContrastImage(MagickWand *wand,
6560 % const double radius,const double strength)
6562 % A description of each parameter follows:
6564 % o image: the image.
6566 % o radius: the radius of the Gaussian, in pixels, not counting
6569 % o strength: the strength of the blur mask in percentage.
6572 WandExport MagickBooleanType MagickLocalContrastImage(MagickWand *wand,
6573 const double radius, const double strength)
6578 assert(wand != (MagickWand *)NULL);
6579 assert(wand->signature == MagickWandSignature);
6580 if (wand->debug != MagickFalse)
6581 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s", wand->name);
6582 if (wand->images == (Image *)NULL)
6583 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6584 contrast_image=LocalContrastImage(wand->images,radius,strength,
6586 if (contrast_image == (Image *)NULL)
6587 return(MagickFalse);
6588 ReplaceImageInList(&wand->images,contrast_image);
6593 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6597 % M a g i c k M a g n i f y I m a g e %
6601 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6603 % MagickMagnifyImage() is a convenience method that scales an image
6604 % proportionally to twice its original size.
6606 % The format of the MagickMagnifyImage method is:
6608 % MagickBooleanType MagickMagnifyImage(MagickWand *wand)
6610 % A description of each parameter follows:
6612 % o wand: the magick wand.
6615 WandExport MagickBooleanType MagickMagnifyImage(MagickWand *wand)
6620 assert(wand != (MagickWand *) NULL);
6621 assert(wand->signature == MagickWandSignature);
6622 if (wand->debug != MagickFalse)
6623 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6624 if (wand->images == (Image *) NULL)
6625 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6626 magnify_image=MagnifyImage(wand->images,wand->exception);
6627 if (magnify_image == (Image *) NULL)
6628 return(MagickFalse);
6629 ReplaceImageInList(&wand->images,magnify_image);
6634 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6638 % M a g i c k M e r g e I m a g e L a y e r s %
6642 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6644 % MagickMergeImageLayers() composes all the image layers from the current
6645 % given image onward to produce a single image of the merged layers.
6647 % The inital canvas's size depends on the given LayerMethod, and is
6648 % initialized using the first images background color. The images
6649 % are then compositied onto that image in sequence using the given
6650 % composition that has been assigned to each individual image.
6652 % The format of the MagickMergeImageLayers method is:
6654 % MagickWand *MagickMergeImageLayers(MagickWand *wand,
6655 % const LayerMethod method)
6657 % A description of each parameter follows:
6659 % o wand: the magick wand.
6661 % o method: the method of selecting the size of the initial canvas.
6663 % MergeLayer: Merge all layers onto a canvas just large enough
6664 % to hold all the actual images. The virtual canvas of the
6665 % first image is preserved but otherwise ignored.
6667 % FlattenLayer: Use the virtual canvas size of first image.
6668 % Images which fall outside this canvas is clipped.
6669 % This can be used to 'fill out' a given virtual canvas.
6671 % MosaicLayer: Start with the virtual canvas of the first image,
6672 % enlarging left and right edges to contain all images.
6673 % Images with negative offsets will be clipped.
6676 WandExport MagickWand *MagickMergeImageLayers(MagickWand *wand,
6677 const LayerMethod method)
6682 assert(wand != (MagickWand *) NULL);
6683 assert(wand->signature == MagickWandSignature);
6684 if (wand->debug != MagickFalse)
6685 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6686 if (wand->images == (Image *) NULL)
6687 return((MagickWand *) NULL);
6688 mosaic_image=MergeImageLayers(wand->images,method,wand->exception);
6689 if (mosaic_image == (Image *) NULL)
6690 return((MagickWand *) NULL);
6691 return(CloneMagickWandFromImages(wand,mosaic_image));
6695 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6699 % M a g i c k M i n i f y I m a g e %
6703 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6705 % MagickMinifyImage() is a convenience method that scales an image
6706 % proportionally to one-half its original size
6708 % The format of the MagickMinifyImage method is:
6710 % MagickBooleanType MagickMinifyImage(MagickWand *wand)
6712 % A description of each parameter follows:
6714 % o wand: the magick wand.
6717 WandExport MagickBooleanType MagickMinifyImage(MagickWand *wand)
6722 assert(wand != (MagickWand *) NULL);
6723 assert(wand->signature == MagickWandSignature);
6724 if (wand->debug != MagickFalse)
6725 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6726 if (wand->images == (Image *) NULL)
6727 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6728 minify_image=MinifyImage(wand->images,wand->exception);
6729 if (minify_image == (Image *) NULL)
6730 return(MagickFalse);
6731 ReplaceImageInList(&wand->images,minify_image);
6736 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6740 % M a g i c k M o d u l a t e I m a g e %
6744 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6746 % MagickModulateImage() lets you control the brightness, saturation, and hue
6747 % of an image. Hue is the percentage of absolute rotation from the current
6748 % position. For example 50 results in a counter-clockwise rotation of 90
6749 % degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200
6750 % both resulting in a rotation of 180 degrees.
6752 % To increase the color brightness by 20% and decrease the color saturation by
6753 % 10% and leave the hue unchanged, use: 120,90,100.
6755 % The format of the MagickModulateImage method is:
6757 % MagickBooleanType MagickModulateImage(MagickWand *wand,
6758 % const double brightness,const double saturation,const double hue)
6760 % A description of each parameter follows:
6762 % o wand: the magick wand.
6764 % o brightness: the percent change in brighness.
6766 % o saturation: the percent change in saturation.
6768 % o hue: the percent change in hue.
6771 WandExport MagickBooleanType MagickModulateImage(MagickWand *wand,
6772 const double brightness,const double saturation,const double hue)
6775 modulate[MagickPathExtent];
6780 assert(wand != (MagickWand *) NULL);
6781 assert(wand->signature == MagickWandSignature);
6782 if (wand->debug != MagickFalse)
6783 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6784 if (wand->images == (Image *) NULL)
6785 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6786 (void) FormatLocaleString(modulate,MagickPathExtent,"%g,%g,%g",
6787 brightness,saturation,hue);
6788 status=ModulateImage(wand->images,modulate,wand->exception);
6793 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6797 % M a g i c k M o n t a g e I m a g e %
6801 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6803 % MagickMontageImage() creates a composite image by combining several
6804 % separate images. The images are tiled on the composite image with the name
6805 % of the image optionally appearing just below the individual tile.
6807 % The format of the MagickMontageImage method is:
6809 % MagickWand *MagickMontageImage(MagickWand *wand,
6810 % const DrawingWand drawing_wand,const char *tile_geometry,
6811 % const char *thumbnail_geometry,const MontageMode mode,
6812 % const char *frame)
6814 % A description of each parameter follows:
6816 % o wand: the magick wand.
6818 % o drawing_wand: the drawing wand. The font name, size, and color are
6819 % obtained from this wand.
6821 % o tile_geometry: the number of tiles per row and page (e.g. 6x4+0+0).
6823 % o thumbnail_geometry: Preferred image size and border size of each
6824 % thumbnail (e.g. 120x120+4+3>).
6826 % o mode: Thumbnail framing mode: Frame, Unframe, or Concatenate.
6828 % o frame: Surround the image with an ornamental border (e.g. 15x15+3+3).
6829 % The frame color is that of the thumbnail's matte color.
6832 WandExport MagickWand *MagickMontageImage(MagickWand *wand,
6833 const DrawingWand *drawing_wand,const char *tile_geometry,
6834 const char *thumbnail_geometry,const MontageMode mode,const char *frame)
6848 assert(wand != (MagickWand *) NULL);
6849 assert(wand->signature == MagickWandSignature);
6850 if (wand->debug != MagickFalse)
6851 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6852 if (wand->images == (Image *) NULL)
6853 return((MagickWand *) NULL);
6854 montage_info=CloneMontageInfo(wand->image_info,(MontageInfo *) NULL);
6859 (void) CloneString(&montage_info->frame,"15x15+3+3");
6860 montage_info->shadow=MagickTrue;
6865 montage_info->frame=(char *) NULL;
6866 montage_info->shadow=MagickFalse;
6867 montage_info->border_width=0;
6870 case ConcatenateMode:
6872 montage_info->frame=(char *) NULL;
6873 montage_info->shadow=MagickFalse;
6874 (void) CloneString(&montage_info->geometry,"+0+0");
6875 montage_info->border_width=0;
6881 font=DrawGetFont(drawing_wand);
6882 if (font != (char *) NULL)
6883 (void) CloneString(&montage_info->font,font);
6884 if (frame != (char *) NULL)
6885 (void) CloneString(&montage_info->frame,frame);
6886 montage_info->pointsize=DrawGetFontSize(drawing_wand);
6887 pixel_wand=NewPixelWand();
6888 DrawGetFillColor(drawing_wand,pixel_wand);
6889 PixelGetQuantumPacket(pixel_wand,&montage_info->fill);
6890 DrawGetStrokeColor(drawing_wand,pixel_wand);
6891 PixelGetQuantumPacket(pixel_wand,&montage_info->stroke);
6892 pixel_wand=DestroyPixelWand(pixel_wand);
6893 if (thumbnail_geometry != (char *) NULL)
6894 (void) CloneString(&montage_info->geometry,thumbnail_geometry);
6895 if (tile_geometry != (char *) NULL)
6896 (void) CloneString(&montage_info->tile,tile_geometry);
6897 montage_image=MontageImageList(wand->image_info,montage_info,wand->images,
6899 montage_info=DestroyMontageInfo(montage_info);
6900 if (montage_image == (Image *) NULL)
6901 return((MagickWand *) NULL);
6902 return(CloneMagickWandFromImages(wand,montage_image));
6906 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6910 % M a g i c k M o r p h I m a g e s %
6914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6916 % MagickMorphImages() method morphs a set of images. Both the image pixels
6917 % and size are linearly interpolated to give the appearance of a
6918 % meta-morphosis from one image to the next.
6920 % The format of the MagickMorphImages method is:
6922 % MagickWand *MagickMorphImages(MagickWand *wand,
6923 % const size_t number_frames)
6925 % A description of each parameter follows:
6927 % o wand: the magick wand.
6929 % o number_frames: the number of in-between images to generate.
6932 WandExport MagickWand *MagickMorphImages(MagickWand *wand,
6933 const size_t number_frames)
6938 assert(wand != (MagickWand *) NULL);
6939 assert(wand->signature == MagickWandSignature);
6940 if (wand->debug != MagickFalse)
6941 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6942 if (wand->images == (Image *) NULL)
6943 return((MagickWand *) NULL);
6944 morph_image=MorphImages(wand->images,number_frames,wand->exception);
6945 if (morph_image == (Image *) NULL)
6946 return((MagickWand *) NULL);
6947 return(CloneMagickWandFromImages(wand,morph_image));
6951 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6955 % M a g i c k M o r p h o l o g y I m a g e %
6959 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6961 % MagickMorphologyImage() applies a user supplied kernel to the image
6962 % according to the given mophology method.
6964 % The format of the MagickMorphologyImage method is:
6966 % MagickBooleanType MagickMorphologyImage(MagickWand *wand,
6967 % MorphologyMethod method,const ssize_t iterations,KernelInfo *kernel)
6969 % A description of each parameter follows:
6971 % o wand: the magick wand.
6973 % o method: the morphology method to be applied.
6975 % o iterations: apply the operation this many times (or no change).
6976 % A value of -1 means loop until no change found. How this is applied
6977 % may depend on the morphology method. Typically this is a value of 1.
6979 % o kernel: An array of doubles representing the morphology kernel.
6982 WandExport MagickBooleanType MagickMorphologyImage(MagickWand *wand,
6983 MorphologyMethod method,const ssize_t iterations,KernelInfo *kernel)
6988 assert(wand != (MagickWand *) NULL);
6989 assert(wand->signature == MagickWandSignature);
6990 if (wand->debug != MagickFalse)
6991 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6992 if (kernel == (const KernelInfo *) NULL)
6993 return(MagickFalse);
6994 if (wand->images == (Image *) NULL)
6995 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6996 morphology_image=MorphologyImage(wand->images,method,iterations,kernel,
6998 if (morphology_image == (Image *) NULL)
6999 return(MagickFalse);
7000 ReplaceImageInList(&wand->images,morphology_image);
7005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7009 % M a g i c k M o t i o n B l u r I m a g e %
7013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7015 % MagickMotionBlurImage() simulates motion blur. We convolve the image with a
7016 % Gaussian operator of the given radius and standard deviation (sigma).
7017 % For reasonable results, radius should be larger than sigma. Use a
7018 % radius of 0 and MotionBlurImage() selects a suitable radius for you.
7019 % Angle gives the angle of the blurring motion.
7021 % The format of the MagickMotionBlurImage method is:
7023 % MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
7024 % const double radius,const double sigma,const double angle)
7026 % A description of each parameter follows:
7028 % o wand: the magick wand.
7030 % o radius: the radius of the Gaussian, in pixels, not counting
7033 % o sigma: the standard deviation of the Gaussian, in pixels.
7035 % o angle: Apply the effect along this angle.
7038 WandExport MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
7039 const double radius,const double sigma,const double angle)
7044 assert(wand != (MagickWand *) NULL);
7045 assert(wand->signature == MagickWandSignature);
7046 if (wand->debug != MagickFalse)
7047 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7048 if (wand->images == (Image *) NULL)
7049 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7050 blur_image=MotionBlurImage(wand->images,radius,sigma,angle,wand->exception);
7051 if (blur_image == (Image *) NULL)
7052 return(MagickFalse);
7053 ReplaceImageInList(&wand->images,blur_image);
7058 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7062 % M a g i c k N e g a t e I m a g e %
7066 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7068 % MagickNegateImage() negates the colors in the reference image. The
7069 % Grayscale option means that only grayscale values within the image are
7072 % You can also reduce the influence of a particular channel with a gamma
7075 % The format of the MagickNegateImage method is:
7077 % MagickBooleanType MagickNegateImage(MagickWand *wand,
7078 % const MagickBooleanType gray)
7080 % A description of each parameter follows:
7082 % o wand: the magick wand.
7084 % o gray: If MagickTrue, only negate grayscale pixels within the image.
7087 WandExport MagickBooleanType MagickNegateImage(MagickWand *wand,
7088 const MagickBooleanType gray)
7093 assert(wand != (MagickWand *) NULL);
7094 assert(wand->signature == MagickWandSignature);
7095 if (wand->debug != MagickFalse)
7096 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7097 if (wand->images == (Image *) NULL)
7098 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7099 status=NegateImage(wand->images,gray,wand->exception);
7104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7108 % M a g i c k N e w I m a g e %
7112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7114 % MagickNewImage() adds a blank image canvas of the specified size and
7115 % background color to the wand.
7117 % The format of the MagickNewImage method is:
7119 % MagickBooleanType MagickNewImage(MagickWand *wand,
7120 % const size_t columns,const size_t rows,
7121 % const PixelWand *background)
7123 % A description of each parameter follows:
7125 % o wand: the magick wand.
7127 % o width: the image width.
7129 % o height: the image height.
7131 % o background: the image color.
7134 WandExport MagickBooleanType MagickNewImage(MagickWand *wand,const size_t width,
7135 const size_t height,const PixelWand *background)
7143 assert(wand != (MagickWand *) NULL);
7144 assert(wand->signature == MagickWandSignature);
7145 if (wand->debug != MagickFalse)
7146 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7147 PixelGetMagickColor(background,&pixel);
7148 images=NewMagickImage(wand->image_info,width,height,&pixel,wand->exception);
7149 if (images == (Image *) NULL)
7150 return(MagickFalse);
7151 return(InsertImageInWand(wand,images));
7155 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7159 % M a g i c k N e x t I m a g e %
7163 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7165 % MagickNextImage() sets the next image in the wand as the current image.
7167 % It is typically used after MagickResetIterator(), after which its first use
7168 % will set the first image as the current image (unless the wand is empty).
7170 % It will return MagickFalse when no more images are left to be returned
7171 % which happens when the wand is empty, or the current image is the last
7174 % When the above condition (end of image list) is reached, the iterator is
7175 % automaticall set so that you can start using MagickPreviousImage() to
7176 % again iterate over the images in the reverse direction, starting with the
7177 % last image (again). You can jump to this condition immeditally using
7178 % MagickSetLastIterator().
7180 % The format of the MagickNextImage method is:
7182 % MagickBooleanType MagickNextImage(MagickWand *wand)
7184 % A description of each parameter follows:
7186 % o wand: the magick wand.
7189 WandExport MagickBooleanType MagickNextImage(MagickWand *wand)
7191 assert(wand != (MagickWand *) NULL);
7192 assert(wand->signature == MagickWandSignature);
7193 if (wand->debug != MagickFalse)
7194 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7195 if (wand->images == (Image *) NULL)
7196 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7197 wand->insert_before=MagickFalse; /* Inserts is now appended */
7198 if (wand->image_pending != MagickFalse)
7200 wand->image_pending=MagickFalse;
7203 if (GetNextImageInList(wand->images) == (Image *) NULL)
7205 wand->image_pending=MagickTrue; /* No image, PreviousImage re-gets */
7206 return(MagickFalse);
7208 wand->images=GetNextImageInList(wand->images);
7213 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7217 % M a g i c k N o r m a l i z e I m a g e %
7221 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7223 % MagickNormalizeImage() enhances the contrast of a color image by adjusting
7224 % the pixels color to span the entire range of colors available
7226 % You can also reduce the influence of a particular channel with a gamma
7229 % The format of the MagickNormalizeImage method is:
7231 % MagickBooleanType MagickNormalizeImage(MagickWand *wand)
7233 % A description of each parameter follows:
7235 % o wand: the magick wand.
7238 WandExport MagickBooleanType MagickNormalizeImage(MagickWand *wand)
7243 assert(wand != (MagickWand *) NULL);
7244 assert(wand->signature == MagickWandSignature);
7245 if (wand->debug != MagickFalse)
7246 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7247 if (wand->images == (Image *) NULL)
7248 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7249 status=NormalizeImage(wand->images,wand->exception);
7254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7258 % M a g i c k O i l P a i n t I m a g e %
7262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7264 % MagickOilPaintImage() applies a special effect filter that simulates an oil
7265 % painting. Each pixel is replaced by the most frequent color occurring
7266 % in a circular region defined by radius.
7268 % The format of the MagickOilPaintImage method is:
7270 % MagickBooleanType MagickOilPaintImage(MagickWand *wand,
7271 % const double radius,const double sigma)
7273 % A description of each parameter follows:
7275 % o wand: the magick wand.
7277 % o radius: the radius of the circular neighborhood.
7279 % o sigma: the standard deviation of the Gaussian, in pixels.
7282 WandExport MagickBooleanType MagickOilPaintImage(MagickWand *wand,
7283 const double radius,const double sigma)
7288 assert(wand != (MagickWand *) NULL);
7289 assert(wand->signature == MagickWandSignature);
7290 if (wand->debug != MagickFalse)
7291 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7292 if (wand->images == (Image *) NULL)
7293 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7294 paint_image=OilPaintImage(wand->images,radius,sigma,wand->exception);
7295 if (paint_image == (Image *) NULL)
7296 return(MagickFalse);
7297 ReplaceImageInList(&wand->images,paint_image);
7302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7306 % M a g i c k O p a q u e P a i n t I m a g e %
7310 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7312 % MagickOpaquePaintImage() changes any pixel that matches color with the color
7315 % The format of the MagickOpaquePaintImage method is:
7317 % MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
7318 % const PixelWand *target,const PixelWand *fill,const double fuzz,
7319 % const MagickBooleanType invert)
7321 % A description of each parameter follows:
7323 % o wand: the magick wand.
7325 % o target: Change this target color to the fill color within the image.
7327 % o fill: the fill pixel wand.
7329 % o fuzz: By default target must match a particular pixel color
7330 % exactly. However, in many cases two colors may differ by a small amount.
7331 % The fuzz member of image defines how much tolerance is acceptable to
7332 % consider two colors as the same. For example, set fuzz to 10 and the
7333 % color red at intensities of 100 and 102 respectively are now interpreted
7334 % as the same color for the purposes of the floodfill.
7336 % o invert: paint any pixel that does not match the target color.
7339 WandExport MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
7340 const PixelWand *target,const PixelWand *fill,const double fuzz,
7341 const MagickBooleanType invert)
7350 assert(wand != (MagickWand *) NULL);
7351 assert(wand->signature == MagickWandSignature);
7352 if (wand->debug != MagickFalse)
7353 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7354 if (wand->images == (Image *) NULL)
7355 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7356 PixelGetMagickColor(target,&target_pixel);
7357 PixelGetMagickColor(fill,&fill_pixel);
7358 wand->images->fuzz=fuzz;
7359 status=OpaquePaintImage(wand->images,&target_pixel,&fill_pixel,invert,
7365 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7369 % M a g i c k O p t i m i z e I m a g e L a y e r s %
7373 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7375 % MagickOptimizeImageLayers() compares each image the GIF disposed forms of the
7376 % previous image in the sequence. From this it attempts to select the
7377 % smallest cropped image to replace each frame, while preserving the results
7380 % The format of the MagickOptimizeImageLayers method is:
7382 % MagickWand *MagickOptimizeImageLayers(MagickWand *wand)
7384 % A description of each parameter follows:
7386 % o wand: the magick wand.
7389 WandExport MagickWand *MagickOptimizeImageLayers(MagickWand *wand)
7394 assert(wand != (MagickWand *) NULL);
7395 assert(wand->signature == MagickWandSignature);
7396 if (wand->debug != MagickFalse)
7397 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7398 if (wand->images == (Image *) NULL)
7399 return((MagickWand *) NULL);
7400 optimize_image=OptimizeImageLayers(wand->images,wand->exception);
7401 if (optimize_image == (Image *) NULL)
7402 return((MagickWand *) NULL);
7403 return(CloneMagickWandFromImages(wand,optimize_image));
7407 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7411 % M a g i c k O p t i m i z e I m a g e T r a n s p a r e n c y %
7415 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7417 % MagickOptimizeImageTransparency() takes a frame optimized GIF animation, and
7418 % compares the overlayed pixels against the disposal image resulting from all
7419 % the previous frames in the animation. Any pixel that does not change the
7420 % disposal image (and thus does not effect the outcome of an overlay) is made
7423 % WARNING: This modifies the current images directly, rather than generate
7424 % a new image sequence.
7425 % The format of the MagickOptimizeImageTransparency method is:
7427 % MagickBooleanType MagickOptimizeImageTransparency(MagickWand *wand)
7429 % A description of each parameter follows:
7431 % o wand: the magick wand.
7434 WandExport MagickBooleanType MagickOptimizeImageTransparency(MagickWand *wand)
7436 assert(wand != (MagickWand *) NULL);
7437 assert(wand->signature == MagickWandSignature);
7438 if (wand->debug != MagickFalse)
7439 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7440 if (wand->images == (Image *) NULL)
7441 return(MagickFalse);
7442 OptimizeImageTransparency(wand->images,wand->exception);
7447 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7451 % M a g i c k O r d e r e d D i t h e r I m a g e %
7455 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7457 % MagickOrderedDitherImage() performs an ordered dither based on a number
7458 % of pre-defined dithering threshold maps, but over multiple intensity levels,
7459 % which can be different for different channels, according to the input
7462 % The format of the MagickOrderedDitherImage method is:
7464 % MagickBooleanType MagickOrderedDitherImage(MagickWand *wand,
7465 % const char *threshold_map)
7467 % A description of each parameter follows:
7469 % o image: the image.
7471 % o threshold_map: A string containing the name of the threshold dither
7472 % map to use, followed by zero or more numbers representing the number of
7473 % color levels tho dither between.
7475 % Any level number less than 2 is equivalent to 2, and means only binary
7476 % dithering will be applied to each color channel.
7478 % No numbers also means a 2 level (bitmap) dither will be applied to all
7479 % channels, while a single number is the number of levels applied to each
7480 % channel in sequence. More numbers will be applied in turn to each of
7481 % the color channels.
7483 % For example: "o3x3,6" generates a 6 level posterization of the image
7484 % with a ordered 3x3 diffused pixel dither being applied between each
7485 % level. While checker,8,8,4 will produce a 332 colormaped image with
7486 % only a single checkerboard hash pattern (50% grey) between each color
7487 % level, to basically double the number of color levels with a bare
7488 % minimim of dithering.
7491 WandExport MagickBooleanType MagickOrderedDitherImage(MagickWand *wand,
7492 const char *threshold_map)
7497 assert(wand != (MagickWand *) NULL);
7498 assert(wand->signature == MagickWandSignature);
7499 if (wand->debug != MagickFalse)
7500 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7501 if (wand->images == (Image *) NULL)
7502 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7503 status=OrderedDitherImage(wand->images,threshold_map,wand->exception);
7508 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7512 % M a g i c k P i n g I m a g e %
7516 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7518 % MagickPingImage() is the same as MagickReadImage() except the only valid
7519 % information returned is the image width, height, size, and format. It
7520 % is designed to efficiently obtain this information from a file without
7521 % reading the entire image sequence into memory.
7523 % The format of the MagickPingImage method is:
7525 % MagickBooleanType MagickPingImage(MagickWand *wand,const char *filename)
7527 % A description of each parameter follows:
7529 % o wand: the magick wand.
7531 % o filename: the image filename.
7534 WandExport MagickBooleanType MagickPingImage(MagickWand *wand,
7535 const char *filename)
7543 assert(wand != (MagickWand *) NULL);
7544 assert(wand->signature == MagickWandSignature);
7545 if (wand->debug != MagickFalse)
7546 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7547 ping_info=CloneImageInfo(wand->image_info);
7548 if (filename != (const char *) NULL)
7549 (void) CopyMagickString(ping_info->filename,filename,MagickPathExtent);
7550 images=PingImage(ping_info,wand->exception);
7551 ping_info=DestroyImageInfo(ping_info);
7552 if (images == (Image *) NULL)
7553 return(MagickFalse);
7554 return(InsertImageInWand(wand,images));
7558 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7562 % M a g i c k P i n g I m a g e B l o b %
7566 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7568 % MagickPingImageBlob() pings an image or image sequence from a blob.
7570 % The format of the MagickPingImageBlob method is:
7572 % MagickBooleanType MagickPingImageBlob(MagickWand *wand,
7573 % const void *blob,const size_t length)
7575 % A description of each parameter follows:
7577 % o wand: the magick wand.
7581 % o length: the blob length.
7584 WandExport MagickBooleanType MagickPingImageBlob(MagickWand *wand,
7585 const void *blob,const size_t length)
7593 assert(wand != (MagickWand *) NULL);
7594 assert(wand->signature == MagickWandSignature);
7595 if (wand->debug != MagickFalse)
7596 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7597 read_info=CloneImageInfo(wand->image_info);
7598 SetImageInfoBlob(read_info,blob,length);
7599 images=PingImage(read_info,wand->exception);
7600 read_info=DestroyImageInfo(read_info);
7601 if (images == (Image *) NULL)
7602 return(MagickFalse);
7603 return(InsertImageInWand(wand,images));
7607 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7611 % M a g i c k P i n g I m a g e F i l e %
7615 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7617 % MagickPingImageFile() pings an image or image sequence from an open file
7620 % The format of the MagickPingImageFile method is:
7622 % MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
7624 % A description of each parameter follows:
7626 % o wand: the magick wand.
7628 % o file: the file descriptor.
7631 WandExport MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
7639 assert(wand != (MagickWand *) NULL);
7640 assert(wand->signature == MagickWandSignature);
7641 assert(file != (FILE *) NULL);
7642 if (wand->debug != MagickFalse)
7643 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7644 read_info=CloneImageInfo(wand->image_info);
7645 SetImageInfoFile(read_info,file);
7646 images=PingImage(read_info,wand->exception);
7647 read_info=DestroyImageInfo(read_info);
7648 if (images == (Image *) NULL)
7649 return(MagickFalse);
7650 return(InsertImageInWand(wand,images));
7654 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7658 % M a g i c k P o l a r o i d I m a g e %
7662 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7664 % MagickPolaroidImage() simulates a Polaroid picture.
7666 % The format of the MagickPolaroidImage method is:
7668 % MagickBooleanType MagickPolaroidImage(MagickWand *wand,
7669 % const DrawingWand *drawing_wand,const char *caption,const double angle,
7670 % const PixelInterpolateMethod method)
7672 % A description of each parameter follows:
7674 % o wand: the magick wand.
7676 % o drawing_wand: the draw wand.
7678 % o caption: the Polaroid caption.
7680 % o angle: Apply the effect along this angle.
7682 % o method: the pixel interpolation method.
7685 WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand,
7686 const DrawingWand *drawing_wand,const char *caption,const double angle,
7687 const PixelInterpolateMethod method)
7695 assert(wand != (MagickWand *) NULL);
7696 assert(wand->signature == MagickWandSignature);
7697 if (wand->debug != MagickFalse)
7698 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7699 if (wand->images == (Image *) NULL)
7700 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7701 draw_info=PeekDrawingWand(drawing_wand);
7702 if (draw_info == (DrawInfo *) NULL)
7703 return(MagickFalse);
7704 polaroid_image=PolaroidImage(wand->images,draw_info,caption,angle,method,
7706 if (polaroid_image == (Image *) NULL)
7707 return(MagickFalse);
7708 ReplaceImageInList(&wand->images,polaroid_image);
7713 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7717 % M a g i c k P o s t e r i z e I m a g e %
7721 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7723 % MagickPosterizeImage() reduces the image to a limited number of color level.
7725 % The format of the MagickPosterizeImage method is:
7727 % MagickBooleanType MagickPosterizeImage(MagickWand *wand,
7728 % const size_t levels,const DitherMethod method)
7730 % A description of each parameter follows:
7732 % o wand: the magick wand.
7734 % o levels: Number of color levels allowed in each channel. Very low values
7735 % (2, 3, or 4) have the most visible effect.
7737 % o method: choose the dither method: UndefinedDitherMethod,
7738 % NoDitherMethod, RiemersmaDitherMethod, or FloydSteinbergDitherMethod.
7741 WandExport MagickBooleanType MagickPosterizeImage(MagickWand *wand,
7742 const size_t levels,const DitherMethod dither)
7747 assert(wand != (MagickWand *) NULL);
7748 assert(wand->signature == MagickWandSignature);
7749 if (wand->debug != MagickFalse)
7750 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7751 if (wand->images == (Image *) NULL)
7752 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7753 status=PosterizeImage(wand->images,levels,dither,wand->exception);
7758 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7762 % M a g i c k P r e v i e w I m a g e s %
7766 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7768 % MagickPreviewImages() tiles 9 thumbnails of the specified image with an
7769 % image processing operation applied at varying strengths. This helpful
7770 % to quickly pin-point an appropriate parameter for an image processing
7773 % The format of the MagickPreviewImages method is:
7775 % MagickWand *MagickPreviewImages(MagickWand *wand,
7776 % const PreviewType preview)
7778 % A description of each parameter follows:
7780 % o wand: the magick wand.
7782 % o preview: the preview type.
7785 WandExport MagickWand *MagickPreviewImages(MagickWand *wand,
7786 const PreviewType preview)
7791 assert(wand != (MagickWand *) NULL);
7792 assert(wand->signature == MagickWandSignature);
7793 if (wand->debug != MagickFalse)
7794 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7795 if (wand->images == (Image *) NULL)
7796 return((MagickWand *) NULL);
7797 preview_image=PreviewImage(wand->images,preview,wand->exception);
7798 if (preview_image == (Image *) NULL)
7799 return((MagickWand *) NULL);
7800 return(CloneMagickWandFromImages(wand,preview_image));
7804 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7808 % M a g i c k P r e v i o u s I m a g e %
7812 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7814 % MagickPreviousImage() sets the previous image in the wand as the current
7817 % It is typically used after MagickSetLastIterator(), after which its first
7818 % use will set the last image as the current image (unless the wand is empty).
7820 % It will return MagickFalse when no more images are left to be returned
7821 % which happens when the wand is empty, or the current image is the first
7822 % image. At that point the iterator is than reset to again process images in
7823 % the forward direction, again starting with the first image in list. Images
7824 % added at this point are prepended.
7826 % Also at that point any images added to the wand using MagickAddImages() or
7827 % MagickReadImages() will be prepended before the first image. In this sense
7828 % the condition is not quite exactly the same as MagickResetIterator().
7830 % The format of the MagickPreviousImage method is:
7832 % MagickBooleanType MagickPreviousImage(MagickWand *wand)
7834 % A description of each parameter follows:
7836 % o wand: the magick wand.
7839 WandExport MagickBooleanType MagickPreviousImage(MagickWand *wand)
7841 assert(wand != (MagickWand *) NULL);
7842 assert(wand->signature == MagickWandSignature);
7843 if (wand->debug != MagickFalse)
7844 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7845 if (wand->images == (Image *) NULL)
7846 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7847 if (wand->image_pending != MagickFalse)
7849 wand->image_pending=MagickFalse; /* image returned no longer pending */
7852 if (GetPreviousImageInList(wand->images) == (Image *) NULL)
7854 wand->image_pending=MagickTrue; /* Next now re-gets first image */
7855 wand->insert_before=MagickTrue; /* insert/add prepends new images */
7856 return(MagickFalse);
7858 wand->images=GetPreviousImageInList(wand->images);
7863 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7867 % M a g i c k Q u a n t i z e I m a g e %
7871 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7873 % MagickQuantizeImage() analyzes the colors within a reference image and
7874 % chooses a fixed number of colors to represent the image. The goal of the
7875 % algorithm is to minimize the color difference between the input and output
7876 % image while minimizing the processing time.
7878 % The format of the MagickQuantizeImage method is:
7880 % MagickBooleanType MagickQuantizeImage(MagickWand *wand,
7881 % const size_t number_colors,const ColorspaceType colorspace,
7882 % const size_t treedepth,const DitherMethod dither_method,
7883 % const MagickBooleanType measure_error)
7885 % A description of each parameter follows:
7887 % o wand: the magick wand.
7889 % o number_colors: the number of colors.
7891 % o colorspace: Perform color reduction in this colorspace, typically
7894 % o treedepth: Normally, this integer value is zero or one. A zero or
7895 % one tells Quantize to choose a optimal tree depth of Log4(number_colors).% A tree of this depth generally allows the best representation of the
7896 % reference image with the least amount of memory and the fastest
7897 % computational speed. In some cases, such as an image with low color
7898 % dispersion (a few number of colors), a value other than
7899 % Log4(number_colors) is required. To expand the color tree completely,
7902 % o dither_method: choose from UndefinedDitherMethod, NoDitherMethod,
7903 % RiemersmaDitherMethod, FloydSteinbergDitherMethod.
7905 % o measure_error: A value other than zero measures the difference between
7906 % the original and quantized images. This difference is the total
7907 % quantization error. The error is computed by summing over all pixels
7908 % in an image the distance squared in RGB space between each reference
7909 % pixel value and its quantized value.
7912 WandExport MagickBooleanType MagickQuantizeImage(MagickWand *wand,
7913 const size_t number_colors,const ColorspaceType colorspace,
7914 const size_t treedepth,const DitherMethod dither_method,
7915 const MagickBooleanType measure_error)
7923 assert(wand != (MagickWand *) NULL);
7924 assert(wand->signature == MagickWandSignature);
7925 if (wand->debug != MagickFalse)
7926 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7927 if (wand->images == (Image *) NULL)
7928 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7929 quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
7930 quantize_info->number_colors=number_colors;
7931 quantize_info->dither_method=dither_method;
7932 quantize_info->tree_depth=treedepth;
7933 quantize_info->colorspace=colorspace;
7934 quantize_info->measure_error=measure_error;
7935 status=QuantizeImage(quantize_info,wand->images,wand->exception);
7936 quantize_info=DestroyQuantizeInfo(quantize_info);
7941 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7945 % M a g i c k Q u a n t i z e I m a g e s %
7949 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7951 % MagickQuantizeImages() analyzes the colors within a sequence of images and
7952 % chooses a fixed number of colors to represent the image. The goal of the
7953 % algorithm is to minimize the color difference between the input and output
7954 % image while minimizing the processing time.
7956 % The format of the MagickQuantizeImages method is:
7958 % MagickBooleanType MagickQuantizeImages(MagickWand *wand,
7959 % const size_t number_colors,const ColorspaceType colorspace,
7960 % const size_t treedepth,const DitherMethod dither_method,
7961 % const MagickBooleanType measure_error)
7963 % A description of each parameter follows:
7965 % o wand: the magick wand.
7967 % o number_colors: the number of colors.
7969 % o colorspace: Perform color reduction in this colorspace, typically
7972 % o treedepth: Normally, this integer value is zero or one. A zero or
7973 % one tells Quantize to choose a optimal tree depth of Log4(number_colors).% A tree of this depth generally allows the best representation of the
7974 % reference image with the least amount of memory and the fastest
7975 % computational speed. In some cases, such as an image with low color
7976 % dispersion (a few number of colors), a value other than
7977 % Log4(number_colors) is required. To expand the color tree completely,
7980 % o dither_method: choose from these dither methods: NoDitherMethod,
7981 % RiemersmaDitherMethod, or FloydSteinbergDitherMethod.
7983 % o measure_error: A value other than zero measures the difference between
7984 % the original and quantized images. This difference is the total
7985 % quantization error. The error is computed by summing over all pixels
7986 % in an image the distance squared in RGB space between each reference
7987 % pixel value and its quantized value.
7990 WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand,
7991 const size_t number_colors,const ColorspaceType colorspace,
7992 const size_t treedepth,const DitherMethod dither_method,
7993 const MagickBooleanType measure_error)
8001 assert(wand != (MagickWand *) NULL);
8002 assert(wand->signature == MagickWandSignature);
8003 if (wand->debug != MagickFalse)
8004 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8005 if (wand->images == (Image *) NULL)
8006 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8007 quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
8008 quantize_info->number_colors=number_colors;
8009 quantize_info->dither_method=dither_method;
8010 quantize_info->tree_depth=treedepth;
8011 quantize_info->colorspace=colorspace;
8012 quantize_info->measure_error=measure_error;
8013 status=QuantizeImages(quantize_info,wand->images,wand->exception);
8014 quantize_info=DestroyQuantizeInfo(quantize_info);
8019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8023 % M a g i c k R o t a t i o n a l B l u r I m a g e %
8027 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8029 % MagickRotationalBlurImage() rotational blurs an image.
8031 % The format of the MagickRotationalBlurImage method is:
8033 % MagickBooleanType MagickRotationalBlurImage(MagickWand *wand,
8034 % const double angle)
8036 % A description of each parameter follows:
8038 % o wand: the magick wand.
8040 % o angle: the angle of the blur in degrees.
8043 WandExport MagickBooleanType MagickRotationalBlurImage(MagickWand *wand,
8049 assert(wand != (MagickWand *) NULL);
8050 assert(wand->signature == MagickWandSignature);
8051 if (wand->debug != MagickFalse)
8052 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8053 if (wand->images == (Image *) NULL)
8054 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8055 blur_image=RotationalBlurImage(wand->images,angle,wand->exception);
8056 if (blur_image == (Image *) NULL)
8057 return(MagickFalse);
8058 ReplaceImageInList(&wand->images,blur_image);
8063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8067 % M a g i c k R a i s e I m a g e %
8071 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8073 % MagickRaiseImage() creates a simulated three-dimensional button-like effect
8074 % by lightening and darkening the edges of the image. Members width and
8075 % height of raise_info define the width of the vertical and horizontal
8076 % edge of the effect.
8078 % The format of the MagickRaiseImage method is:
8080 % MagickBooleanType MagickRaiseImage(MagickWand *wand,
8081 % const size_t width,const size_t height,const ssize_t x,
8082 % const ssize_t y,const MagickBooleanType raise)
8084 % A description of each parameter follows:
8086 % o wand: the magick wand.
8088 % o width,height,x,y: Define the dimensions of the area to raise.
8090 % o raise: A value other than zero creates a 3-D raise effect,
8091 % otherwise it has a lowered effect.
8094 WandExport MagickBooleanType MagickRaiseImage(MagickWand *wand,
8095 const size_t width,const size_t height,const ssize_t x,
8096 const ssize_t y,const MagickBooleanType raise)
8104 assert(wand != (MagickWand *) NULL);
8105 assert(wand->signature == MagickWandSignature);
8106 if (wand->debug != MagickFalse)
8107 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8108 if (wand->images == (Image *) NULL)
8109 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8110 raise_info.width=width;
8111 raise_info.height=height;
8114 status=RaiseImage(wand->images,&raise_info,raise,wand->exception);
8119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8123 % M a g i c k R a n d o m T h r e s h o l d I m a g e %
8127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8129 % MagickRandomThresholdImage() changes the value of individual pixels based on
8130 % the intensity of each pixel compared to threshold. The result is a
8131 % high-contrast, two color image.
8133 % The format of the MagickRandomThresholdImage method is:
8135 % MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
8136 % const double low,const double high)
8138 % A description of each parameter follows:
8140 % o wand: the magick wand.
8142 % o low,high: Specify the high and low thresholds. These values range from
8143 % 0 to QuantumRange.
8146 WandExport MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
8147 const double low,const double high)
8149 assert(wand != (MagickWand *) NULL);
8150 assert(wand->signature == MagickWandSignature);
8151 if (wand->debug != MagickFalse)
8152 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8153 if (wand->images == (Image *) NULL)
8154 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8155 return(RandomThresholdImage(wand->images,low,high,wand->exception));
8159 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8163 % M a g i c k R e a d I m a g e %
8167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8169 % MagickReadImage() reads an image or image sequence. The images are inserted
8170 % jjust before the current image pointer position.
8172 % Use MagickSetFirstIterator(), to insert new images before all the current
8173 % images in the wand, MagickSetLastIterator() to append add to the end,
8174 % MagickSetIteratorIndex() to place images just after the given index.
8176 % The format of the MagickReadImage method is:
8178 % MagickBooleanType MagickReadImage(MagickWand *wand,const char *filename)
8180 % A description of each parameter follows:
8182 % o wand: the magick wand.
8184 % o filename: the image filename.
8187 WandExport MagickBooleanType MagickReadImage(MagickWand *wand,
8188 const char *filename)
8196 assert(wand != (MagickWand *) NULL);
8197 assert(wand->signature == MagickWandSignature);
8198 if (wand->debug != MagickFalse)
8199 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8200 read_info=CloneImageInfo(wand->image_info);
8201 if (filename != (const char *) NULL)
8202 (void) CopyMagickString(read_info->filename,filename,MagickPathExtent);
8203 images=ReadImage(read_info,wand->exception);
8204 read_info=DestroyImageInfo(read_info);
8205 if (images == (Image *) NULL)
8206 return(MagickFalse);
8207 return(InsertImageInWand(wand,images));
8211 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8215 % M a g i c k R e a d I m a g e B l o b %
8219 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8221 % MagickReadImageBlob() reads an image or image sequence from a blob.
8222 % In all other respects it is like MagickReadImage().
8224 % The format of the MagickReadImageBlob method is:
8226 % MagickBooleanType MagickReadImageBlob(MagickWand *wand,
8227 % const void *blob,const size_t length)
8229 % A description of each parameter follows:
8231 % o wand: the magick wand.
8235 % o length: the blob length.
8238 WandExport MagickBooleanType MagickReadImageBlob(MagickWand *wand,
8239 const void *blob,const size_t length)
8244 assert(wand != (MagickWand *) NULL);
8245 assert(wand->signature == MagickWandSignature);
8246 if (wand->debug != MagickFalse)
8247 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8248 images=BlobToImage(wand->image_info,blob,length,wand->exception);
8249 if (images == (Image *) NULL)
8250 return(MagickFalse);
8251 return(InsertImageInWand(wand,images));
8255 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8259 % M a g i c k R e a d I m a g e F i l e %
8263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8265 % MagickReadImageFile() reads an image or image sequence from an already
8266 % opened file descriptor. Otherwise it is like MagickReadImage().
8268 % The format of the MagickReadImageFile method is:
8270 % MagickBooleanType MagickReadImageFile(MagickWand *wand,FILE *file)
8272 % A description of each parameter follows:
8274 % o wand: the magick wand.
8276 % o file: the file descriptor.
8279 WandExport MagickBooleanType MagickReadImageFile(MagickWand *wand,FILE *file)
8287 assert(wand != (MagickWand *) NULL);
8288 assert(wand->signature == MagickWandSignature);
8289 assert(file != (FILE *) NULL);
8290 if (wand->debug != MagickFalse)
8291 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8292 read_info=CloneImageInfo(wand->image_info);
8293 SetImageInfoFile(read_info,file);
8294 images=ReadImage(read_info,wand->exception);
8295 read_info=DestroyImageInfo(read_info);
8296 if (images == (Image *) NULL)
8297 return(MagickFalse);
8298 return(InsertImageInWand(wand,images));
8302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8306 % M a g i c k R e m a p I m a g e %
8310 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8312 % MagickRemapImage() replaces the colors of an image with the closest color
8313 % from a reference image.
8315 % The format of the MagickRemapImage method is:
8317 % MagickBooleanType MagickRemapImage(MagickWand *wand,
8318 % const MagickWand *remap_wand,const DitherMethod method)
8320 % A description of each parameter follows:
8322 % o wand: the magick wand.
8324 % o affinity: the affinity wand.
8326 % o method: choose from these dither methods: NoDitherMethod,
8327 % RiemersmaDitherMethod, or FloydSteinbergDitherMethod.
8330 WandExport MagickBooleanType MagickRemapImage(MagickWand *wand,
8331 const MagickWand *remap_wand,const DitherMethod dither_method)
8339 assert(wand != (MagickWand *) NULL);
8340 assert(wand->signature == MagickWandSignature);
8341 if (wand->debug != MagickFalse)
8342 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8343 if ((wand->images == (Image *) NULL) ||
8344 (remap_wand->images == (Image *) NULL))
8345 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8346 quantize_info=AcquireQuantizeInfo(wand->image_info);
8347 quantize_info->dither_method=dither_method;
8348 status=RemapImage(quantize_info,wand->images,remap_wand->images,
8350 quantize_info=DestroyQuantizeInfo(quantize_info);
8355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8359 % M a g i c k R e m o v e I m a g e %
8363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8365 % MagickRemoveImage() removes an image from the image list.
8367 % The format of the MagickRemoveImage method is:
8369 % MagickBooleanType MagickRemoveImage(MagickWand *wand)
8371 % A description of each parameter follows:
8373 % o wand: the magick wand.
8375 % o insert: the splice wand.
8378 WandExport MagickBooleanType MagickRemoveImage(MagickWand *wand)
8380 assert(wand != (MagickWand *) NULL);
8381 assert(wand->signature == MagickWandSignature);
8382 if (wand->debug != MagickFalse)
8383 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8384 if (wand->images == (Image *) NULL)
8385 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8386 DeleteImageFromList(&wand->images);
8391 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8395 % M a g i c k R e s a m p l e I m a g e %
8399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8401 % MagickResampleImage() resample image to desired resolution.
8403 % Bessel Blackman Box
8404 % Catrom Cubic Gaussian
8405 % Hanning Hermite Lanczos
8406 % Mitchell Point Quandratic
8409 % Most of the filters are FIR (finite impulse response), however, Bessel,
8410 % Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc
8411 % are windowed (brought down to zero) with the Blackman filter.
8413 % The format of the MagickResampleImage method is:
8415 % MagickBooleanType MagickResampleImage(MagickWand *wand,
8416 % const double x_resolution,const double y_resolution,
8417 % const FilterType filter)
8419 % A description of each parameter follows:
8421 % o wand: the magick wand.
8423 % o x_resolution: the new image x resolution.
8425 % o y_resolution: the new image y resolution.
8427 % o filter: Image filter to use.
8430 WandExport MagickBooleanType MagickResampleImage(MagickWand *wand,
8431 const double x_resolution,const double y_resolution,const FilterType filter)
8436 assert(wand != (MagickWand *) NULL);
8437 assert(wand->signature == MagickWandSignature);
8438 if (wand->debug != MagickFalse)
8439 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8440 if (wand->images == (Image *) NULL)
8441 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8442 resample_image=ResampleImage(wand->images,x_resolution,y_resolution,filter,
8444 if (resample_image == (Image *) NULL)
8445 return(MagickFalse);
8446 ReplaceImageInList(&wand->images,resample_image);
8451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8455 % M a g i c k R e s e t I m a g e P a g e %
8459 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8461 % MagickResetImagePage() resets the Wand page canvas and position.
8463 % The format of the MagickResetImagePage method is:
8465 % MagickBooleanType MagickResetImagePage(MagickWand *wand,
8468 % A description of each parameter follows:
8470 % o wand: the magick wand.
8472 % o page: the relative page specification.
8475 WandExport MagickBooleanType MagickResetImagePage(MagickWand *wand,
8478 assert(wand != (MagickWand *) NULL);
8479 assert(wand->signature == MagickWandSignature);
8480 if (wand->debug != MagickFalse)
8481 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8482 if (wand->images == (Image *) NULL)
8483 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8484 if ((page == (char *) NULL) || (*page == '\0'))
8486 (void) ParseAbsoluteGeometry("0x0+0+0",&wand->images->page);
8489 return(ResetImagePage(wand->images,page));
8493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8497 % M a g i c k R e s i z e I m a g e %
8501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8503 % MagickResizeImage() scales an image to the desired dimensions with one of
8506 % Bessel Blackman Box
8507 % Catrom Cubic Gaussian
8508 % Hanning Hermite Lanczos
8509 % Mitchell Point Quandratic
8512 % Most of the filters are FIR (finite impulse response), however, Bessel,
8513 % Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc
8514 % are windowed (brought down to zero) with the Blackman filter.
8516 % The format of the MagickResizeImage method is:
8518 % MagickBooleanType MagickResizeImage(MagickWand *wand,
8519 % const size_t columns,const size_t rows,const FilterType filter)
8521 % A description of each parameter follows:
8523 % o wand: the magick wand.
8525 % o columns: the number of columns in the scaled image.
8527 % o rows: the number of rows in the scaled image.
8529 % o filter: Image filter to use.
8532 WandExport MagickBooleanType MagickResizeImage(MagickWand *wand,
8533 const size_t columns,const size_t rows,const FilterType filter)
8538 assert(wand != (MagickWand *) NULL);
8539 assert(wand->signature == MagickWandSignature);
8540 if (wand->debug != MagickFalse)
8541 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8542 if (wand->images == (Image *) NULL)
8543 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8544 resize_image=ResizeImage(wand->images,columns,rows,filter,wand->exception);
8545 if (resize_image == (Image *) NULL)
8546 return(MagickFalse);
8547 ReplaceImageInList(&wand->images,resize_image);
8552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8556 % M a g i c k R o l l I m a g e %
8560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8562 % MagickRollImage() offsets an image as defined by x and y.
8564 % The format of the MagickRollImage method is:
8566 % MagickBooleanType MagickRollImage(MagickWand *wand,const ssize_t x,
8569 % A description of each parameter follows:
8571 % o wand: the magick wand.
8573 % o x: the x offset.
8575 % o y: the y offset.
8579 WandExport MagickBooleanType MagickRollImage(MagickWand *wand,
8580 const ssize_t x,const ssize_t y)
8585 assert(wand != (MagickWand *) NULL);
8586 assert(wand->signature == MagickWandSignature);
8587 if (wand->debug != MagickFalse)
8588 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8589 if (wand->images == (Image *) NULL)
8590 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8591 roll_image=RollImage(wand->images,x,y,wand->exception);
8592 if (roll_image == (Image *) NULL)
8593 return(MagickFalse);
8594 ReplaceImageInList(&wand->images,roll_image);
8599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8603 % M a g i c k R o t a t e I m a g e %
8607 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8609 % MagickRotateImage() rotates an image the specified number of degrees. Empty
8610 % triangles left over from rotating the image are filled with the
8613 % The format of the MagickRotateImage method is:
8615 % MagickBooleanType MagickRotateImage(MagickWand *wand,
8616 % const PixelWand *background,const double degrees)
8618 % A description of each parameter follows:
8620 % o wand: the magick wand.
8622 % o background: the background pixel wand.
8624 % o degrees: the number of degrees to rotate the image.
8628 WandExport MagickBooleanType MagickRotateImage(MagickWand *wand,
8629 const PixelWand *background,const double degrees)
8634 assert(wand != (MagickWand *) NULL);
8635 assert(wand->signature == MagickWandSignature);
8636 if (wand->debug != MagickFalse)
8637 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8638 if (wand->images == (Image *) NULL)
8639 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8640 PixelGetQuantumPacket(background,&wand->images->background_color);
8641 rotate_image=RotateImage(wand->images,degrees,wand->exception);
8642 if (rotate_image == (Image *) NULL)
8643 return(MagickFalse);
8644 ReplaceImageInList(&wand->images,rotate_image);
8649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8653 % M a g i c k S a m p l e I m a g e %
8657 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8659 % MagickSampleImage() scales an image to the desired dimensions with pixel
8660 % sampling. Unlike other scaling methods, this method does not introduce
8661 % any additional color into the scaled image.
8663 % The format of the MagickSampleImage method is:
8665 % MagickBooleanType MagickSampleImage(MagickWand *wand,
8666 % const size_t columns,const size_t rows)
8668 % A description of each parameter follows:
8670 % o wand: the magick wand.
8672 % o columns: the number of columns in the scaled image.
8674 % o rows: the number of rows in the scaled image.
8678 WandExport MagickBooleanType MagickSampleImage(MagickWand *wand,
8679 const size_t columns,const size_t rows)
8684 assert(wand != (MagickWand *) NULL);
8685 assert(wand->signature == MagickWandSignature);
8686 if (wand->debug != MagickFalse)
8687 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8688 if (wand->images == (Image *) NULL)
8689 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8690 sample_image=SampleImage(wand->images,columns,rows,wand->exception);
8691 if (sample_image == (Image *) NULL)
8692 return(MagickFalse);
8693 ReplaceImageInList(&wand->images,sample_image);
8698 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8702 % M a g i c k S c a l e I m a g e %
8706 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8708 % MagickScaleImage() scales the size of an image to the given dimensions.
8710 % The format of the MagickScaleImage method is:
8712 % MagickBooleanType MagickScaleImage(MagickWand *wand,
8713 % const size_t columns,const size_t rows)
8715 % A description of each parameter follows:
8717 % o wand: the magick wand.
8719 % o columns: the number of columns in the scaled image.
8721 % o rows: the number of rows in the scaled image.
8725 WandExport MagickBooleanType MagickScaleImage(MagickWand *wand,
8726 const size_t columns,const size_t rows)
8731 assert(wand != (MagickWand *) NULL);
8732 assert(wand->signature == MagickWandSignature);
8733 if (wand->debug != MagickFalse)
8734 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8735 if (wand->images == (Image *) NULL)
8736 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8737 scale_image=ScaleImage(wand->images,columns,rows,wand->exception);
8738 if (scale_image == (Image *) NULL)
8739 return(MagickFalse);
8740 ReplaceImageInList(&wand->images,scale_image);
8745 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8749 % M a g i c k S e g m e n t I m a g e %
8753 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8755 % MagickSegmentImage() segments an image by analyzing the histograms of the
8756 % color components and identifying units that are homogeneous with the fuzzy
8757 % C-means technique.
8759 % The format of the SegmentImage method is:
8761 % MagickBooleanType MagickSegmentImage(MagickWand *wand,
8762 % const ColorspaceType colorspace,const MagickBooleanType verbose,
8763 % const double cluster_threshold,const double smooth_threshold)
8765 % A description of each parameter follows.
8769 % o colorspace: the image colorspace.
8771 % o verbose: Set to MagickTrue to print detailed information about the
8772 % identified classes.
8774 % o cluster_threshold: This represents the minimum number of pixels
8775 % contained in a hexahedra before it can be considered valid (expressed as
8778 % o smooth_threshold: the smoothing threshold eliminates noise in the second
8779 % derivative of the histogram. As the value is increased, you can expect a
8780 % smoother second derivative.
8783 MagickExport MagickBooleanType MagickSegmentImage(MagickWand *wand,
8784 const ColorspaceType colorspace,const MagickBooleanType verbose,
8785 const double cluster_threshold,const double smooth_threshold)
8790 assert(wand != (MagickWand *) NULL);
8791 assert(wand->signature == MagickWandSignature);
8792 if (wand->debug != MagickFalse)
8793 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8794 if (wand->images == (Image *) NULL)
8795 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8796 status=SegmentImage(wand->images,colorspace,verbose,cluster_threshold,
8797 smooth_threshold,wand->exception);
8802 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8806 % M a g i c k S e l e c t i v e B l u r I m a g e %
8810 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8812 % MagickSelectiveBlurImage() selectively blur an image within a contrast
8813 % threshold. It is similar to the unsharpen mask that sharpens everything with
8814 % contrast above a certain threshold.
8816 % The format of the MagickSelectiveBlurImage method is:
8818 % MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
8819 % const double radius,const double sigma,const double threshold)
8821 % A description of each parameter follows:
8823 % o wand: the magick wand.
8825 % o radius: the radius of the gaussian, in pixels, not counting the center
8828 % o sigma: the standard deviation of the gaussian, in pixels.
8830 % o threshold: only pixels within this contrast threshold are included
8831 % in the blur operation.
8834 WandExport MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
8835 const double radius,const double sigma,const double threshold)
8840 assert(wand != (MagickWand *) NULL);
8841 assert(wand->signature == MagickWandSignature);
8842 if (wand->debug != MagickFalse)
8843 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8844 if (wand->images == (Image *) NULL)
8845 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8846 blur_image=SelectiveBlurImage(wand->images,radius,sigma,threshold,
8848 if (blur_image == (Image *) NULL)
8849 return(MagickFalse);
8850 ReplaceImageInList(&wand->images,blur_image);
8855 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8859 % M a g i c k S e p a r a t e I m a g e C h a n n e l %
8863 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8865 % MagickSeparateImage() separates a channel from the image and returns a
8866 % grayscale image. A channel is a particular color component of each pixel
8869 % The format of the MagickSeparateImage method is:
8871 % MagickBooleanType MagickSeparateImage(MagickWand *wand,
8872 % const ChannelType channel)
8874 % A description of each parameter follows:
8876 % o wand: the magick wand.
8878 % o channel: the channel.
8881 WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand,
8882 const ChannelType channel)
8887 assert(wand != (MagickWand *) NULL);
8888 assert(wand->signature == MagickWandSignature);
8889 if (wand->debug != MagickFalse)
8890 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8891 if (wand->images == (Image *) NULL)
8892 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8893 separate_image=SeparateImage(wand->images,channel,wand->exception);
8894 if (separate_image == (Image *) NULL)
8895 return(MagickFalse);
8896 ReplaceImageInList(&wand->images,separate_image);
8901 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8905 % M a g i c k S e p i a T o n e I m a g e %
8909 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8911 % MagickSepiaToneImage() applies a special effect to the image, similar to the
8912 % effect achieved in a photo darkroom by sepia toning. Threshold ranges from
8913 % 0 to QuantumRange and is a measure of the extent of the sepia toning. A
8914 % threshold of 80% is a good starting point for a reasonable tone.
8916 % The format of the MagickSepiaToneImage method is:
8918 % MagickBooleanType MagickSepiaToneImage(MagickWand *wand,
8919 % const double threshold)
8921 % A description of each parameter follows:
8923 % o wand: the magick wand.
8925 % o threshold: Define the extent of the sepia toning.
8928 WandExport MagickBooleanType MagickSepiaToneImage(MagickWand *wand,
8929 const double threshold)
8934 assert(wand != (MagickWand *) NULL);
8935 assert(wand->signature == MagickWandSignature);
8936 if (wand->debug != MagickFalse)
8937 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8938 if (wand->images == (Image *) NULL)
8939 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8940 sepia_image=SepiaToneImage(wand->images,threshold,wand->exception);
8941 if (sepia_image == (Image *) NULL)
8942 return(MagickFalse);
8943 ReplaceImageInList(&wand->images,sepia_image);
8948 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8952 % M a g i c k S e t I m a g e %
8956 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8958 % MagickSetImage() replaces the last image returned by MagickSetIteratorIndex(),
8959 % MagickNextImage(), MagickPreviousImage() with the images from the specified
8962 % The format of the MagickSetImage method is:
8964 % MagickBooleanType MagickSetImage(MagickWand *wand,
8965 % const MagickWand *set_wand)
8967 % A description of each parameter follows:
8969 % o wand: the magick wand.
8971 % o set_wand: the set_wand wand.
8974 WandExport MagickBooleanType MagickSetImage(MagickWand *wand,
8975 const MagickWand *set_wand)
8980 assert(wand != (MagickWand *) NULL);
8981 assert(wand->signature == MagickWandSignature);
8982 if (wand->debug != MagickFalse)
8983 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8984 assert(set_wand != (MagickWand *) NULL);
8985 assert(set_wand->signature == MagickWandSignature);
8986 if (wand->debug != MagickFalse)
8987 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",set_wand->name);
8988 if (set_wand->images == (Image *) NULL)
8989 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8990 images=CloneImageList(set_wand->images,wand->exception);
8991 if (images == (Image *) NULL)
8992 return(MagickFalse);
8993 ReplaceImageInList(&wand->images,images);
8998 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9002 % M a g i c k S e t I m a g e A l p h a C h a n n e l %
9006 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9008 % MagickSetImageAlphaChannel() activates, deactivates, resets, or sets the
9011 % The format of the MagickSetImageAlphaChannel method is:
9013 % MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
9014 % const AlphaChannelOption alpha_type)
9016 % A description of each parameter follows:
9018 % o wand: the magick wand.
9020 % o alpha_type: the alpha channel type: ActivateAlphaChannel,
9021 % DeactivateAlphaChannel, OpaqueAlphaChannel, or SetAlphaChannel.
9024 WandExport MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
9025 const AlphaChannelOption alpha_type)
9027 assert(wand != (MagickWand *) NULL);
9028 assert(wand->signature == MagickWandSignature);
9029 if (wand->debug != MagickFalse)
9030 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9031 if (wand->images == (Image *) NULL)
9032 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9033 return(SetImageAlphaChannel(wand->images,alpha_type,wand->exception));
9037 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9041 % M a g i c k S e t I m a g e B a c k g r o u n d C o l o r %
9045 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9047 % MagickSetImageBackgroundColor() sets the image background color.
9049 % The format of the MagickSetImageBackgroundColor method is:
9051 % MagickBooleanType MagickSetImageBackgroundColor(MagickWand *wand,
9052 % const PixelWand *background)
9054 % A description of each parameter follows:
9056 % o wand: the magick wand.
9058 % o background: the background pixel wand.
9061 WandExport MagickBooleanType MagickSetImageBackgroundColor(MagickWand *wand,
9062 const PixelWand *background)
9064 assert(wand != (MagickWand *) NULL);
9065 assert(wand->signature == MagickWandSignature);
9066 if (wand->debug != MagickFalse)
9067 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9068 if (wand->images == (Image *) NULL)
9069 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9070 PixelGetQuantumPacket(background,&wand->images->background_color);
9075 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9079 % M a g i c k S e t I m a g e B l u e P r i m a r y %
9083 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9085 % MagickSetImageBluePrimary() sets the image chromaticity blue primary point.
9087 % The format of the MagickSetImageBluePrimary method is:
9089 % MagickBooleanType MagickSetImageBluePrimary(MagickWand *wand,
9090 % const double x,const double y,const double z)
9092 % A description of each parameter follows:
9094 % o wand: the magick wand.
9096 % o x: the blue primary x-point.
9098 % o y: the blue primary y-point.
9100 % o z: the blue primary z-point.
9103 WandExport MagickBooleanType MagickSetImageBluePrimary(MagickWand *wand,
9104 const double x,const double y,const double z)
9106 assert(wand != (MagickWand *) NULL);
9107 assert(wand->signature == MagickWandSignature);
9108 if (wand->debug != MagickFalse)
9109 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9110 if (wand->images == (Image *) NULL)
9111 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9112 wand->images->chromaticity.blue_primary.x=x;
9113 wand->images->chromaticity.blue_primary.y=y;
9114 wand->images->chromaticity.blue_primary.z=z;
9119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9123 % M a g i c k S e t I m a g e B o r d e r C o l o r %
9127 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9129 % MagickSetImageBorderColor() sets the image border color.
9131 % The format of the MagickSetImageBorderColor method is:
9133 % MagickBooleanType MagickSetImageBorderColor(MagickWand *wand,
9134 % const PixelWand *border)
9136 % A description of each parameter follows:
9138 % o wand: the magick wand.
9140 % o border: the border pixel wand.
9143 WandExport MagickBooleanType MagickSetImageBorderColor(MagickWand *wand,
9144 const PixelWand *border)
9146 assert(wand != (MagickWand *) NULL);
9147 assert(wand->signature == MagickWandSignature);
9148 if (wand->debug != MagickFalse)
9149 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9150 if (wand->images == (Image *) NULL)
9151 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9152 PixelGetQuantumPacket(border,&wand->images->border_color);
9157 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9161 % M a g i c k S e t I m a g e C h a n n e l M a s k %
9165 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9167 % MagickSetImageChannelMask() sets image channel mask.
9169 % The format of the MagickSetImageChannelMask method is:
9171 % ChannelType MagickSetImageChannelMask(MagickWand *wand,
9172 % const ChannelType channel_mask)
9174 % A description of each parameter follows:
9176 % o wand: the magick wand.
9178 % o channel_mask: the channel_mask wand.
9181 WandExport ChannelType MagickSetImageChannelMask(MagickWand *wand,
9182 const ChannelType channel_mask)
9184 assert(wand != (MagickWand *) NULL);
9185 assert(wand->signature == MagickWandSignature);
9186 if (wand->debug != MagickFalse)
9187 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9188 return(SetImageChannelMask(wand->images,channel_mask));
9192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9196 % M a g i c k S e t I m a g e M a s k %
9200 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9202 % MagickSetImageMask() sets image clip mask.
9204 % The format of the MagickSetImageMask method is:
9206 % MagickBooleanType MagickSetImageMask(MagickWand *wand,
9207 % const PixelMask type,const MagickWand *clip_mask)
9209 % A description of each parameter follows:
9211 % o wand: the magick wand.
9213 % o type: type of mask, ReadPixelMask or WritePixelMask.
9215 % o clip_mask: the clip_mask wand.
9218 WandExport MagickBooleanType MagickSetImageMask(MagickWand *wand,
9219 const PixelMask type,const MagickWand *clip_mask)
9221 assert(wand != (MagickWand *) NULL);
9222 assert(wand->signature == MagickWandSignature);
9223 if (wand->debug != MagickFalse)
9224 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9225 assert(clip_mask != (MagickWand *) NULL);
9226 assert(clip_mask->signature == MagickWandSignature);
9227 if (clip_mask->debug != MagickFalse)
9228 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clip_mask->name);
9229 if (clip_mask->images == (Image *) NULL)
9230 ThrowWandException(WandError,"ContainsNoImages",clip_mask->name);
9231 return(SetImageMask(wand->images,type,clip_mask->images,wand->exception));
9235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9239 % M a g i c k S e t I m a g e C o l o r %
9243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9245 % MagickSetImageColor() set the entire wand canvas to the specified color.
9247 % The format of the MagickSetImageColor method is:
9249 % MagickBooleanType MagickSetImageColor(MagickWand *wand,
9250 % const PixelWand *color)
9252 % A description of each parameter follows:
9254 % o wand: the magick wand.
9256 % o background: the image color.
9259 WandExport MagickBooleanType MagickSetImageColor(MagickWand *wand,
9260 const PixelWand *color)
9265 assert(wand != (MagickWand *) NULL);
9266 assert(wand->signature == MagickWandSignature);
9267 if (wand->debug != MagickFalse)
9268 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9269 PixelGetMagickColor(color,&pixel);
9270 return(SetImageColor(wand->images,&pixel,wand->exception));
9274 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9278 % M a g i c k S e t I m a g e C o l o r m a p C o l o r %
9282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9284 % MagickSetImageColormapColor() sets the color of the specified colormap
9287 % The format of the MagickSetImageColormapColor method is:
9289 % MagickBooleanType MagickSetImageColormapColor(MagickWand *wand,
9290 % const size_t index,const PixelWand *color)
9292 % A description of each parameter follows:
9294 % o wand: the magick wand.
9296 % o index: the offset into the image colormap.
9298 % o color: Return the colormap color in this wand.
9301 WandExport MagickBooleanType MagickSetImageColormapColor(MagickWand *wand,
9302 const size_t index,const PixelWand *color)
9304 assert(wand != (MagickWand *) NULL);
9305 assert(wand->signature == MagickWandSignature);
9306 if (wand->debug != MagickFalse)
9307 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9308 if (wand->images == (Image *) NULL)
9309 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9310 if ((wand->images->colormap == (PixelInfo *) NULL) ||
9311 (index >= wand->images->colors))
9312 ThrowWandException(WandError,"InvalidColormapIndex",wand->name);
9313 PixelGetQuantumPacket(color,wand->images->colormap+index);
9314 return(SyncImage(wand->images,wand->exception));
9318 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9322 % M a g i c k S e t I m a g e C o l o r s p a c e %
9326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9328 % MagickSetImageColorspace() sets the image colorspace. But does not modify
9331 % The format of the MagickSetImageColorspace method is:
9333 % MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
9334 % const ColorspaceType colorspace)
9336 % A description of each parameter follows:
9338 % o wand: the magick wand.
9340 % o colorspace: the image colorspace: UndefinedColorspace, RGBColorspace,
9341 % GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace,
9342 % YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace,
9343 % YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace,
9344 % HSLColorspace, or HWBColorspace.
9347 WandExport MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
9348 const ColorspaceType colorspace)
9350 assert(wand != (MagickWand *) NULL);
9351 assert(wand->signature == MagickWandSignature);
9352 if (wand->debug != MagickFalse)
9353 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9354 if (wand->images == (Image *) NULL)
9355 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9356 return(SetImageColorspace(wand->images,colorspace,wand->exception));
9360 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9364 % M a g i c k S e t I m a g e C o m p o s e %
9368 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9370 % MagickSetImageCompose() sets the image composite operator, useful for
9371 % specifying how to composite the image thumbnail when using the
9372 % MagickMontageImage() method.
9374 % The format of the MagickSetImageCompose method is:
9376 % MagickBooleanType MagickSetImageCompose(MagickWand *wand,
9377 % const CompositeOperator compose)
9379 % A description of each parameter follows:
9381 % o wand: the magick wand.
9383 % o compose: the image composite operator.
9386 WandExport MagickBooleanType MagickSetImageCompose(MagickWand *wand,
9387 const CompositeOperator compose)
9389 assert(wand != (MagickWand *) NULL);
9390 assert(wand->signature == MagickWandSignature);
9391 if (wand->debug != MagickFalse)
9392 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9393 if (wand->images == (Image *) NULL)
9394 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9395 wand->images->compose=compose;
9400 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9404 % M a g i c k S e t I m a g e C o m p r e s s i o n %
9408 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9410 % MagickSetImageCompression() sets the image compression.
9412 % The format of the MagickSetImageCompression method is:
9414 % MagickBooleanType MagickSetImageCompression(MagickWand *wand,
9415 % const CompressionType compression)
9417 % A description of each parameter follows:
9419 % o wand: the magick wand.
9421 % o compression: the image compression type.
9424 WandExport MagickBooleanType MagickSetImageCompression(MagickWand *wand,
9425 const CompressionType compression)
9427 assert(wand != (MagickWand *) NULL);
9428 assert(wand->signature == MagickWandSignature);
9429 if (wand->debug != MagickFalse)
9430 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9431 if (wand->images == (Image *) NULL)
9432 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9433 wand->images->compression=compression;
9438 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9442 % M a g i c k S e t I m a g e C o m p r e s s i o n Q u a l i t y %
9446 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9448 % MagickSetImageCompressionQuality() sets the image compression quality.
9450 % The format of the MagickSetImageCompressionQuality method is:
9452 % MagickBooleanType MagickSetImageCompressionQuality(MagickWand *wand,
9453 % const size_t quality)
9455 % A description of each parameter follows:
9457 % o wand: the magick wand.
9459 % o quality: the image compression tlityype.
9462 WandExport MagickBooleanType MagickSetImageCompressionQuality(MagickWand *wand,
9463 const size_t quality)
9465 assert(wand != (MagickWand *) NULL);
9466 assert(wand->signature == MagickWandSignature);
9467 if (wand->debug != MagickFalse)
9468 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9469 if (wand->images == (Image *) NULL)
9470 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9471 wand->images->quality=quality;
9476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9480 % M a g i c k S e t I m a g e D e l a y %
9484 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9486 % MagickSetImageDelay() sets the image delay.
9488 % The format of the MagickSetImageDelay method is:
9490 % MagickBooleanType MagickSetImageDelay(MagickWand *wand,
9491 % const size_t delay)
9493 % A description of each parameter follows:
9495 % o wand: the magick wand.
9497 % o delay: the image delay in ticks-per-second units.
9500 WandExport MagickBooleanType MagickSetImageDelay(MagickWand *wand,
9503 assert(wand != (MagickWand *) NULL);
9504 assert(wand->signature == MagickWandSignature);
9505 if (wand->debug != MagickFalse)
9506 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9507 if (wand->images == (Image *) NULL)
9508 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9509 wand->images->delay=delay;
9514 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9518 % M a g i c k S e t I m a g e D e p t h %
9522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9524 % MagickSetImageDepth() sets the image depth.
9526 % The format of the MagickSetImageDepth method is:
9528 % MagickBooleanType MagickSetImageDepth(MagickWand *wand,
9529 % const size_t depth)
9531 % A description of each parameter follows:
9533 % o wand: the magick wand.
9535 % o depth: the image depth in bits: 8, 16, or 32.
9538 WandExport MagickBooleanType MagickSetImageDepth(MagickWand *wand,
9541 assert(wand != (MagickWand *) NULL);
9542 assert(wand->signature == MagickWandSignature);
9543 if (wand->debug != MagickFalse)
9544 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9545 if (wand->images == (Image *) NULL)
9546 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9547 return(SetImageDepth(wand->images,depth,wand->exception));
9551 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9555 % M a g i c k S e t I m a g e D i s p o s e %
9559 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9561 % MagickSetImageDispose() sets the image disposal method.
9563 % The format of the MagickSetImageDispose method is:
9565 % MagickBooleanType MagickSetImageDispose(MagickWand *wand,
9566 % const DisposeType dispose)
9568 % A description of each parameter follows:
9570 % o wand: the magick wand.
9572 % o dispose: the image disposeal type.
9575 WandExport MagickBooleanType MagickSetImageDispose(MagickWand *wand,
9576 const DisposeType dispose)
9578 assert(wand != (MagickWand *) NULL);
9579 assert(wand->signature == MagickWandSignature);
9580 if (wand->debug != MagickFalse)
9581 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9582 if (wand->images == (Image *) NULL)
9583 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9584 wand->images->dispose=dispose;
9589 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9593 % M a g i c k S e t I m a g e E n d i a n %
9597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9599 % MagickSetImageEndian() sets the image endian method.
9601 % The format of the MagickSetImageEndian method is:
9603 % MagickBooleanType MagickSetImageEndian(MagickWand *wand,
9604 % const EndianType endian)
9606 % A description of each parameter follows:
9608 % o wand: the magick wand.
9610 % o endian: the image endian type.
9613 WandExport MagickBooleanType MagickSetImageEndian(MagickWand *wand,
9614 const EndianType endian)
9616 assert(wand != (MagickWand *) NULL);
9617 assert(wand->signature == MagickWandSignature);
9618 if (wand->debug != MagickFalse)
9619 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9620 if (wand->images == (Image *) NULL)
9621 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9622 wand->images->endian=endian;
9627 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9631 % M a g i c k S e t I m a g e E x t e n t %
9635 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9637 % MagickSetImageExtent() sets the image size (i.e. columns & rows).
9639 % The format of the MagickSetImageExtent method is:
9641 % MagickBooleanType MagickSetImageExtent(MagickWand *wand,
9642 % const size_t columns,const unsigned rows)
9644 % A description of each parameter follows:
9646 % o wand: the magick wand.
9648 % o columns: The image width in pixels.
9650 % o rows: The image height in pixels.
9653 WandExport MagickBooleanType MagickSetImageExtent(MagickWand *wand,
9654 const size_t columns,const size_t rows)
9656 assert(wand != (MagickWand *) NULL);
9657 assert(wand->signature == MagickWandSignature);
9658 if (wand->debug != MagickFalse)
9659 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9660 if (wand->images == (Image *) NULL)
9661 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9662 return(SetImageExtent(wand->images,columns,rows,wand->exception));
9666 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9670 % M a g i c k S e t I m a g e F i l e n a m e %
9674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9676 % MagickSetImageFilename() sets the filename of a particular image in a
9679 % The format of the MagickSetImageFilename method is:
9681 % MagickBooleanType MagickSetImageFilename(MagickWand *wand,
9682 % const char *filename)
9684 % A description of each parameter follows:
9686 % o wand: the magick wand.
9688 % o filename: the image filename.
9691 WandExport MagickBooleanType MagickSetImageFilename(MagickWand *wand,
9692 const char *filename)
9694 assert(wand != (MagickWand *) NULL);
9695 assert(wand->signature == MagickWandSignature);
9696 if (wand->debug != MagickFalse)
9697 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9698 if (wand->images == (Image *) NULL)
9699 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9700 if (filename != (const char *) NULL)
9701 (void) CopyMagickString(wand->images->filename,filename,MagickPathExtent);
9706 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9710 % M a g i c k S e t I m a g e F o r m a t %
9714 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9716 % MagickSetImageFormat() sets the format of a particular image in a
9719 % The format of the MagickSetImageFormat method is:
9721 % MagickBooleanType MagickSetImageFormat(MagickWand *wand,
9722 % const char *format)
9724 % A description of each parameter follows:
9726 % o wand: the magick wand.
9728 % o format: the image format.
9731 WandExport MagickBooleanType MagickSetImageFormat(MagickWand *wand,
9737 assert(wand != (MagickWand *) NULL);
9738 assert(wand->signature == MagickWandSignature);
9739 if (wand->debug != MagickFalse)
9740 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9741 if (wand->images == (Image *) NULL)
9742 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9743 if ((format == (char *) NULL) || (*format == '\0'))
9745 *wand->images->magick='\0';
9748 magick_info=GetMagickInfo(format,wand->exception);
9749 if (magick_info == (const MagickInfo *) NULL)
9750 return(MagickFalse);
9751 ClearMagickException(wand->exception);
9752 (void) CopyMagickString(wand->images->magick,format,MagickPathExtent);
9757 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9761 % M a g i c k S e t I m a g e F u z z %
9765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9767 % MagickSetImageFuzz() sets the image fuzz.
9769 % The format of the MagickSetImageFuzz method is:
9771 % MagickBooleanType MagickSetImageFuzz(MagickWand *wand,
9772 % const double fuzz)
9774 % A description of each parameter follows:
9776 % o wand: the magick wand.
9778 % o fuzz: the image fuzz.
9781 WandExport MagickBooleanType MagickSetImageFuzz(MagickWand *wand,
9784 assert(wand != (MagickWand *) NULL);
9785 assert(wand->signature == MagickWandSignature);
9786 if (wand->debug != MagickFalse)
9787 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9788 if (wand->images == (Image *) NULL)
9789 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9790 wand->images->fuzz=fuzz;
9795 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9799 % M a g i c k S e t I m a g e G a m m a %
9803 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9805 % MagickSetImageGamma() sets the image gamma.
9807 % The format of the MagickSetImageGamma method is:
9809 % MagickBooleanType MagickSetImageGamma(MagickWand *wand,
9810 % const double gamma)
9812 % A description of each parameter follows:
9814 % o wand: the magick wand.
9816 % o gamma: the image gamma.
9819 WandExport MagickBooleanType MagickSetImageGamma(MagickWand *wand,
9822 assert(wand != (MagickWand *) NULL);
9823 assert(wand->signature == MagickWandSignature);
9824 if (wand->debug != MagickFalse)
9825 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9826 if (wand->images == (Image *) NULL)
9827 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9828 wand->images->gamma=gamma;
9833 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9837 % M a g i c k S e t I m a g e G r a v i t y %
9841 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9843 % MagickSetImageGravity() sets the image gravity type.
9845 % The format of the MagickSetImageGravity method is:
9847 % MagickBooleanType MagickSetImageGravity(MagickWand *wand,
9848 % const GravityType gravity)
9850 % A description of each parameter follows:
9852 % o wand: the magick wand.
9854 % o gravity: positioning gravity (NorthWestGravity, NorthGravity,
9855 % NorthEastGravity, WestGravity, CenterGravity,
9856 % EastGravity, SouthWestGravity, SouthGravity,
9860 WandExport MagickBooleanType MagickSetImageGravity(MagickWand *wand,
9861 const GravityType gravity)
9863 assert(wand != (MagickWand *) NULL);
9864 assert(wand->signature == MagickWandSignature);
9865 if (wand->debug != MagickFalse)
9866 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9867 if (wand->images == (Image *) NULL)
9868 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9869 wand->images->gravity=gravity;
9874 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9878 % M a g i c k S e t I m a g e G r e e n P r i m a r y %
9882 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9884 % MagickSetImageGreenPrimary() sets the image chromaticity green primary
9887 % The format of the MagickSetImageGreenPrimary method is:
9889 % MagickBooleanType MagickSetImageGreenPrimary(MagickWand *wand,
9890 % const double x,const double y,const double z)
9892 % A description of each parameter follows:
9894 % o wand: the magick wand.
9896 % o x: the green primary x-point.
9898 % o y: the green primary y-point.
9900 % o z: the green primary z-point.
9903 WandExport MagickBooleanType MagickSetImageGreenPrimary(MagickWand *wand,
9904 const double x,const double y,const double z)
9906 assert(wand != (MagickWand *) NULL);
9907 assert(wand->signature == MagickWandSignature);
9908 if (wand->debug != MagickFalse)
9909 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9910 if (wand->images == (Image *) NULL)
9911 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9912 wand->images->chromaticity.green_primary.x=x;
9913 wand->images->chromaticity.green_primary.y=y;
9914 wand->images->chromaticity.green_primary.z=z;
9919 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9923 % M a g i c k S e t I m a g e I n t e r l a c e S c h e m e %
9927 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9929 % MagickSetImageInterlaceScheme() sets the image interlace scheme.
9931 % The format of the MagickSetImageInterlaceScheme method is:
9933 % MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
9934 % const InterlaceType interlace)
9936 % A description of each parameter follows:
9938 % o wand: the magick wand.
9940 % o interlace: the image interlace scheme: NoInterlace, LineInterlace,
9941 % PlaneInterlace, PartitionInterlace.
9944 WandExport MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
9945 const InterlaceType interlace)
9947 assert(wand != (MagickWand *) NULL);
9948 assert(wand->signature == MagickWandSignature);
9949 if (wand->debug != MagickFalse)
9950 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9951 if (wand->images == (Image *) NULL)
9952 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9953 wand->images->interlace=interlace;
9958 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9962 % M a g i c k S e t I m a g e I n t e r p o l a t e M e t h o d %
9966 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9968 % MagickSetImageInterpolateMethod() sets the image interpolate pixel method.
9970 % The format of the MagickSetImageInterpolateMethod method is:
9972 % MagickBooleanType MagickSetImageInterpolateMethod(MagickWand *wand,
9973 % const PixelInterpolateMethod method)
9975 % A description of each parameter follows:
9977 % o wand: the magick wand.
9979 % o method: the image interpole pixel methods: choose from Undefined,
9980 % Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor.
9984 WandExport MagickBooleanType MagickSetImagePixelInterpolateMethod(
9985 MagickWand *wand,const PixelInterpolateMethod method)
9987 return(MagickSetImageInterpolateMethod(wand,method));
9990 WandExport MagickBooleanType MagickSetImageInterpolateMethod(
9991 MagickWand *wand,const PixelInterpolateMethod method)
9993 assert(wand != (MagickWand *) NULL);
9994 assert(wand->signature == MagickWandSignature);
9995 if (wand->debug != MagickFalse)
9996 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9997 if (wand->images == (Image *) NULL)
9998 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9999 wand->images->interpolate=method;
10000 return(MagickTrue);
10004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10008 % M a g i c k S e t I m a g e I t e r a t i o n s %
10012 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10014 % MagickSetImageIterations() sets the image iterations.
10016 % The format of the MagickSetImageIterations method is:
10018 % MagickBooleanType MagickSetImageIterations(MagickWand *wand,
10019 % const size_t iterations)
10021 % A description of each parameter follows:
10023 % o wand: the magick wand.
10025 % o delay: the image delay in 1/100th of a second.
10028 WandExport MagickBooleanType MagickSetImageIterations(MagickWand *wand,
10029 const size_t iterations)
10031 assert(wand != (MagickWand *) NULL);
10032 assert(wand->signature == MagickWandSignature);
10033 if (wand->debug != MagickFalse)
10034 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10035 if (wand->images == (Image *) NULL)
10036 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10037 wand->images->iterations=iterations;
10038 return(MagickTrue);
10042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10046 % M a g i c k S e t I m a g e M a t t e %
10050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10052 % MagickSetImageMatte() sets the image matte channel.
10054 % The format of the MagickSetImageMatte method is:
10056 % MagickBooleanType MagickSetImageMatte(MagickWand *wand,
10057 % const MagickBooleanType *matte)
10059 % A description of each parameter follows:
10061 % o wand: the magick wand.
10063 % o matte: Set to MagickTrue to enable the image matte channel otherwise
10067 WandExport MagickBooleanType MagickSetImageMatte(MagickWand *wand,
10068 const MagickBooleanType matte)
10070 assert(wand != (MagickWand *) NULL);
10071 assert(wand->signature == MagickWandSignature);
10072 if (wand->debug != MagickFalse)
10073 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10074 if (wand->images == (Image *) NULL)
10075 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10076 if (matte == MagickFalse)
10077 wand->images->alpha_trait=UndefinedPixelTrait;
10080 if (wand->images->alpha_trait == UndefinedPixelTrait)
10081 (void) SetImageAlpha(wand->images,OpaqueAlpha,wand->exception);
10082 wand->images->alpha_trait=BlendPixelTrait;
10084 return(MagickTrue);
10088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10092 % M a g i c k S e t I m a g e M a t t e C o l o r %
10096 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10098 % MagickSetImageMatteColor() sets the image alpha color.
10100 % The format of the MagickSetImageMatteColor method is:
10102 % MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
10103 % const PixelWand *matte)
10105 % A description of each parameter follows:
10107 % o wand: the magick wand.
10109 % o matte: the alpha pixel wand.
10112 WandExport MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
10113 const PixelWand *alpha)
10115 assert(wand != (MagickWand *)NULL);
10116 assert(wand->signature == MagickWandSignature);
10117 if (wand->debug != MagickFalse)
10118 (void) LogMagickEvent(WandEvent, GetMagickModule(), "%s", wand->name);
10119 if (wand->images == (Image *)NULL)
10120 ThrowWandException(WandError, "ContainsNoImages", wand->name);
10121 PixelGetQuantumPacket(alpha,&wand->images->matte_color);
10122 return(MagickTrue);
10126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10130 % M a g i c k S e t I m a g e O p a c i t y %
10134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10136 % MagickSetImageAlpha() sets the image to the specified alpha level.
10138 % The format of the MagickSetImageAlpha method is:
10140 % MagickBooleanType MagickSetImageAlpha(MagickWand *wand,
10141 % const double alpha)
10143 % A description of each parameter follows:
10145 % o wand: the magick wand.
10147 % o alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully
10151 WandExport MagickBooleanType MagickSetImageAlpha(MagickWand *wand,
10152 const double alpha)
10157 assert(wand != (MagickWand *) NULL);
10158 assert(wand->signature == MagickWandSignature);
10159 if (wand->debug != MagickFalse)
10160 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10161 if (wand->images == (Image *) NULL)
10162 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10163 status=SetImageAlpha(wand->images,ClampToQuantum(QuantumRange*alpha),
10169 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10173 % M a g i c k S e t I m a g e O r i e n t a t i o n %
10177 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10179 % MagickSetImageOrientation() sets the image orientation.
10181 % The format of the MagickSetImageOrientation method is:
10183 % MagickBooleanType MagickSetImageOrientation(MagickWand *wand,
10184 % const OrientationType orientation)
10186 % A description of each parameter follows:
10188 % o wand: the magick wand.
10190 % o orientation: the image orientation type.
10193 WandExport MagickBooleanType MagickSetImageOrientation(MagickWand *wand,
10194 const OrientationType orientation)
10196 assert(wand != (MagickWand *) NULL);
10197 assert(wand->signature == MagickWandSignature);
10198 if (wand->debug != MagickFalse)
10199 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10200 if (wand->images == (Image *) NULL)
10201 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10202 wand->images->orientation=orientation;
10203 return(MagickTrue);
10207 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10211 % M a g i c k S e t I m a g e P a g e %
10215 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10217 % MagickSetImagePage() sets the page geometry of the image.
10219 % The format of the MagickSetImagePage method is:
10221 % MagickBooleanType MagickSetImagePage(MagickWand *wand,const size_t width,% const size_t height,const ssize_t x,const ssize_t y)
10223 % A description of each parameter follows:
10225 % o wand: the magick wand.
10227 % o width: the page width.
10229 % o height: the page height.
10231 % o x: the page x-offset.
10233 % o y: the page y-offset.
10236 WandExport MagickBooleanType MagickSetImagePage(MagickWand *wand,
10237 const size_t width,const size_t height,const ssize_t x,
10240 assert(wand != (MagickWand *) NULL);
10241 assert(wand->signature == MagickWandSignature);
10242 if (wand->debug != MagickFalse)
10243 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10244 if (wand->images == (Image *) NULL)
10245 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10246 wand->images->page.width=width;
10247 wand->images->page.height=height;
10248 wand->images->page.x=x;
10249 wand->images->page.y=y;
10250 return(MagickTrue);
10254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10258 % M a g i c k S e t I m a g e P r o g r e s s M o n i t o r %
10262 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10264 % MagickSetImageProgressMonitor() sets the wand image progress monitor to the
10265 % specified method and returns the previous progress monitor if any. The
10266 % progress monitor method looks like this:
10268 % MagickBooleanType MagickProgressMonitor(const char *text,
10269 % const MagickOffsetType offset,const MagickSizeType span,
10270 % void *client_data)
10272 % If the progress monitor returns MagickFalse, the current operation is
10275 % The format of the MagickSetImageProgressMonitor method is:
10277 % MagickProgressMonitor MagickSetImageProgressMonitor(MagickWand *wand
10278 % const MagickProgressMonitor progress_monitor,void *client_data)
10280 % A description of each parameter follows:
10282 % o wand: the magick wand.
10284 % o progress_monitor: Specifies a pointer to a method to monitor progress
10285 % of an image operation.
10287 % o client_data: Specifies a pointer to any client data.
10290 WandExport MagickProgressMonitor MagickSetImageProgressMonitor(MagickWand *wand,
10291 const MagickProgressMonitor progress_monitor,void *client_data)
10293 MagickProgressMonitor
10296 assert(wand != (MagickWand *) NULL);
10297 assert(wand->signature == MagickWandSignature);
10298 if (wand->debug != MagickFalse)
10299 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10300 if (wand->images == (Image *) NULL)
10302 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
10303 "ContainsNoImages","`%s'",wand->name);
10304 return((MagickProgressMonitor) NULL);
10306 previous_monitor=SetImageProgressMonitor(wand->images,
10307 progress_monitor,client_data);
10308 return(previous_monitor);
10312 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10316 % M a g i c k S e t I m a g e R e d P r i m a r y %
10320 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10322 % MagickSetImageRedPrimary() sets the image chromaticity red primary point.
10324 % The format of the MagickSetImageRedPrimary method is:
10326 % MagickBooleanType MagickSetImageRedPrimary(MagickWand *wand,
10327 % const double x,const double y,const double z)
10329 % A description of each parameter follows:
10331 % o wand: the magick wand.
10333 % o x: the red primary x-point.
10335 % o y: the red primary y-point.
10337 % o z: the red primary z-point.
10340 WandExport MagickBooleanType MagickSetImageRedPrimary(MagickWand *wand,
10341 const double x,const double y,const double z)
10343 assert(wand != (MagickWand *) NULL);
10344 assert(wand->signature == MagickWandSignature);
10345 if (wand->debug != MagickFalse)
10346 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10347 if (wand->images == (Image *) NULL)
10348 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10349 wand->images->chromaticity.red_primary.x=x;
10350 wand->images->chromaticity.red_primary.y=y;
10351 wand->images->chromaticity.red_primary.z=z;
10352 return(MagickTrue);
10356 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10360 % M a g i c k S e t I m a g e R e n d e r i n g I n t e n t %
10364 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10366 % MagickSetImageRenderingIntent() sets the image rendering intent.
10368 % The format of the MagickSetImageRenderingIntent method is:
10370 % MagickBooleanType MagickSetImageRenderingIntent(MagickWand *wand,
10371 % const RenderingIntent rendering_intent)
10373 % A description of each parameter follows:
10375 % o wand: the magick wand.
10377 % o rendering_intent: the image rendering intent: UndefinedIntent,
10378 % SaturationIntent, PerceptualIntent, AbsoluteIntent, or RelativeIntent.
10381 WandExport MagickBooleanType MagickSetImageRenderingIntent(MagickWand *wand,
10382 const RenderingIntent rendering_intent)
10384 assert(wand != (MagickWand *) NULL);
10385 assert(wand->signature == MagickWandSignature);
10386 if (wand->debug != MagickFalse)
10387 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10388 if (wand->images == (Image *) NULL)
10389 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10390 wand->images->rendering_intent=rendering_intent;
10391 return(MagickTrue);
10395 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10399 % M a g i c k S e t I m a g e R e s o l u t i o n %
10403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10405 % MagickSetImageResolution() sets the image resolution.
10407 % The format of the MagickSetImageResolution method is:
10409 % MagickBooleanType MagickSetImageResolution(MagickWand *wand,
10410 % const double x_resolution,const double y_resolution)
10412 % A description of each parameter follows:
10414 % o wand: the magick wand.
10416 % o x_resolution: the image x resolution.
10418 % o y_resolution: the image y resolution.
10421 WandExport MagickBooleanType MagickSetImageResolution(MagickWand *wand,
10422 const double x_resolution,const double y_resolution)
10424 assert(wand != (MagickWand *) NULL);
10425 assert(wand->signature == MagickWandSignature);
10426 if (wand->debug != MagickFalse)
10427 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10428 if (wand->images == (Image *) NULL)
10429 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10430 wand->images->resolution.x=x_resolution;
10431 wand->images->resolution.y=y_resolution;
10432 return(MagickTrue);
10436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10440 % M a g i c k S e t I m a g e S c e n e %
10444 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10446 % MagickSetImageScene() sets the image scene.
10448 % The format of the MagickSetImageScene method is:
10450 % MagickBooleanType MagickSetImageScene(MagickWand *wand,
10451 % const size_t scene)
10453 % A description of each parameter follows:
10455 % o wand: the magick wand.
10457 % o delay: the image scene number.
10460 WandExport MagickBooleanType MagickSetImageScene(MagickWand *wand,
10461 const size_t scene)
10463 assert(wand != (MagickWand *) NULL);
10464 assert(wand->signature == MagickWandSignature);
10465 if (wand->debug != MagickFalse)
10466 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10467 if (wand->images == (Image *) NULL)
10468 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10469 wand->images->scene=scene;
10470 return(MagickTrue);
10474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10478 % M a g i c k S e t I m a g e T i c k s P e r S e c o n d %
10482 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10484 % MagickSetImageTicksPerSecond() sets the image ticks-per-second.
10486 % The format of the MagickSetImageTicksPerSecond method is:
10488 % MagickBooleanType MagickSetImageTicksPerSecond(MagickWand *wand,
10489 % const ssize_t ticks_per-second)
10491 % A description of each parameter follows:
10493 % o wand: the magick wand.
10495 % o ticks_per_second: the units to use for the image delay.
10498 WandExport MagickBooleanType MagickSetImageTicksPerSecond(MagickWand *wand,
10499 const ssize_t ticks_per_second)
10501 assert(wand != (MagickWand *) NULL);
10502 assert(wand->signature == MagickWandSignature);
10503 if (wand->debug != MagickFalse)
10504 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10505 if (wand->images == (Image *) NULL)
10506 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10507 wand->images->ticks_per_second=ticks_per_second;
10508 return(MagickTrue);
10512 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10516 % M a g i c k S e t I m a g e T y p e %
10520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10522 % MagickSetImageType() sets the image type.
10524 % The format of the MagickSetImageType method is:
10526 % MagickBooleanType MagickSetImageType(MagickWand *wand,
10527 % const ImageType image_type)
10529 % A description of each parameter follows:
10531 % o wand: the magick wand.
10533 % o image_type: the image type: UndefinedType, BilevelType, GrayscaleType,
10534 % GrayscaleAlphaType, PaletteType, PaletteAlphaType, TrueColorType,
10535 % TrueColorAlphaType, ColorSeparationType, ColorSeparationAlphaType,
10539 WandExport MagickBooleanType MagickSetImageType(MagickWand *wand,
10540 const ImageType image_type)
10542 assert(wand != (MagickWand *) NULL);
10543 assert(wand->signature == MagickWandSignature);
10544 if (wand->debug != MagickFalse)
10545 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10546 if (wand->images == (Image *) NULL)
10547 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10548 return(SetImageType(wand->images,image_type,wand->exception));
10552 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10556 % M a g i c k S e t I m a g e U n i t s %
10560 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10562 % MagickSetImageUnits() sets the image units of resolution.
10564 % The format of the MagickSetImageUnits method is:
10566 % MagickBooleanType MagickSetImageUnits(MagickWand *wand,
10567 % const ResolutionType units)
10569 % A description of each parameter follows:
10571 % o wand: the magick wand.
10573 % o units: the image units of resolution : UndefinedResolution,
10574 % PixelsPerInchResolution, or PixelsPerCentimeterResolution.
10577 WandExport MagickBooleanType MagickSetImageUnits(MagickWand *wand,
10578 const ResolutionType units)
10580 assert(wand != (MagickWand *) NULL);
10581 assert(wand->signature == MagickWandSignature);
10582 if (wand->debug != MagickFalse)
10583 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10584 if (wand->images == (Image *) NULL)
10585 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10586 wand->images->units=units;
10587 return(MagickTrue);
10591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10595 % M a g i c k S e t I m a g e V i r t u a l P i x e l M e t h o d %
10599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10601 % MagickSetImageVirtualPixelMethod() sets the image virtual pixel method.
10603 % The format of the MagickSetImageVirtualPixelMethod method is:
10605 % VirtualPixelMethod MagickSetImageVirtualPixelMethod(MagickWand *wand,
10606 % const VirtualPixelMethod method)
10608 % A description of each parameter follows:
10610 % o wand: the magick wand.
10612 % o method: the image virtual pixel method : UndefinedVirtualPixelMethod,
10613 % ConstantVirtualPixelMethod, EdgeVirtualPixelMethod,
10614 % MirrorVirtualPixelMethod, or TileVirtualPixelMethod.
10617 WandExport VirtualPixelMethod MagickSetImageVirtualPixelMethod(MagickWand *wand,
10618 const VirtualPixelMethod method)
10620 assert(wand != (MagickWand *) NULL);
10621 assert(wand->signature == MagickWandSignature);
10622 if (wand->debug != MagickFalse)
10623 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10624 if (wand->images == (Image *) NULL)
10625 return(UndefinedVirtualPixelMethod);
10626 return(SetImageVirtualPixelMethod(wand->images,method,wand->exception));
10630 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10634 % M a g i c k S e t I m a g e W h i t e P o i n t %
10638 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10640 % MagickSetImageWhitePoint() sets the image chromaticity white point.
10642 % The format of the MagickSetImageWhitePoint method is:
10644 % MagickBooleanType MagickSetImageWhitePoint(MagickWand *wand,
10645 % const double x,const double y,const double z)
10647 % A description of each parameter follows:
10649 % o wand: the magick wand.
10651 % o x: the white x-point.
10653 % o y: the white y-point.
10655 % o z: the white z-point.
10658 WandExport MagickBooleanType MagickSetImageWhitePoint(MagickWand *wand,
10659 const double x,const double y,const double z)
10661 assert(wand != (MagickWand *) NULL);
10662 assert(wand->signature == MagickWandSignature);
10663 if (wand->debug != MagickFalse)
10664 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10665 if (wand->images == (Image *) NULL)
10666 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10667 wand->images->chromaticity.white_point.x=x;
10668 wand->images->chromaticity.white_point.y=y;
10669 wand->images->chromaticity.white_point.z=z;
10670 return(MagickTrue);
10674 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10678 % M a g i c k S h a d e I m a g e C h a n n e l %
10682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10684 % MagickShadeImage() shines a distant light on an image to create a
10685 % three-dimensional effect. You control the positioning of the light with
10686 % azimuth and elevation; azimuth is measured in degrees off the x axis
10687 % and elevation is measured in pixels above the Z axis.
10689 % The format of the MagickShadeImage method is:
10691 % MagickBooleanType MagickShadeImage(MagickWand *wand,
10692 % const MagickBooleanType gray,const double azimuth,
10693 % const double elevation)
10695 % A description of each parameter follows:
10697 % o wand: the magick wand.
10699 % o gray: A value other than zero shades the intensity of each pixel.
10701 % o azimuth, elevation: Define the light source direction.
10704 WandExport MagickBooleanType MagickShadeImage(MagickWand *wand,
10705 const MagickBooleanType gray,const double asimuth,const double elevation)
10710 assert(wand != (MagickWand *) NULL);
10711 assert(wand->signature == MagickWandSignature);
10712 if (wand->debug != MagickFalse)
10713 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10714 if (wand->images == (Image *) NULL)
10715 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10716 shade_image=ShadeImage(wand->images,gray,asimuth,elevation,wand->exception);
10717 if (shade_image == (Image *) NULL)
10718 return(MagickFalse);
10719 ReplaceImageInList(&wand->images,shade_image);
10720 return(MagickTrue);
10724 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10728 % M a g i c k S h a d o w I m a g e %
10732 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10734 % MagickShadowImage() simulates an image shadow.
10736 % The format of the MagickShadowImage method is:
10738 % MagickBooleanType MagickShadowImage(MagickWand *wand,const double alpha,
10739 % const double sigma,const ssize_t x,const ssize_t y)
10741 % A description of each parameter follows:
10743 % o wand: the magick wand.
10745 % o alpha: percentage transparency.
10747 % o sigma: the standard deviation of the Gaussian, in pixels.
10749 % o x: the shadow x-offset.
10751 % o y: the shadow y-offset.
10754 WandExport MagickBooleanType MagickShadowImage(MagickWand *wand,
10755 const double alpha,const double sigma,const ssize_t x,const ssize_t y)
10760 assert(wand != (MagickWand *) NULL);
10761 assert(wand->signature == MagickWandSignature);
10762 if (wand->debug != MagickFalse)
10763 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10764 if (wand->images == (Image *) NULL)
10765 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10766 shadow_image=ShadowImage(wand->images,alpha,sigma,x,y,wand->exception);
10767 if (shadow_image == (Image *) NULL)
10768 return(MagickFalse);
10769 ReplaceImageInList(&wand->images,shadow_image);
10770 return(MagickTrue);
10774 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10778 % M a g i c k S h a r p e n I m a g e %
10782 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10784 % MagickSharpenImage() sharpens an image. We convolve the image with a
10785 % Gaussian operator of the given radius and standard deviation (sigma).
10786 % For reasonable results, the radius should be larger than sigma. Use a
10787 % radius of 0 and MagickSharpenImage() selects a suitable radius for you.
10789 % The format of the MagickSharpenImage method is:
10791 % MagickBooleanType MagickSharpenImage(MagickWand *wand,
10792 % const double radius,const double sigma)
10794 % A description of each parameter follows:
10796 % o wand: the magick wand.
10798 % o radius: the radius of the Gaussian, in pixels, not counting the center
10801 % o sigma: the standard deviation of the Gaussian, in pixels.
10804 WandExport MagickBooleanType MagickSharpenImage(MagickWand *wand,
10805 const double radius,const double sigma)
10810 assert(wand != (MagickWand *) NULL);
10811 assert(wand->signature == MagickWandSignature);
10812 if (wand->debug != MagickFalse)
10813 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10814 if (wand->images == (Image *) NULL)
10815 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10816 sharp_image=SharpenImage(wand->images,radius,sigma,wand->exception);
10817 if (sharp_image == (Image *) NULL)
10818 return(MagickFalse);
10819 ReplaceImageInList(&wand->images,sharp_image);
10820 return(MagickTrue);
10824 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10828 % M a g i c k S h a v e I m a g e %
10832 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10834 % MagickShaveImage() shaves pixels from the image edges. It allocates the
10835 % memory necessary for the new Image structure and returns a pointer to the
10838 % The format of the MagickShaveImage method is:
10840 % MagickBooleanType MagickShaveImage(MagickWand *wand,
10841 % const size_t columns,const size_t rows)
10843 % A description of each parameter follows:
10845 % o wand: the magick wand.
10847 % o columns: the number of columns in the scaled image.
10849 % o rows: the number of rows in the scaled image.
10853 WandExport MagickBooleanType MagickShaveImage(MagickWand *wand,
10854 const size_t columns,const size_t rows)
10862 assert(wand != (MagickWand *) NULL);
10863 assert(wand->signature == MagickWandSignature);
10864 if (wand->debug != MagickFalse)
10865 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10866 if (wand->images == (Image *) NULL)
10867 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10868 shave_info.width=columns;
10869 shave_info.height=rows;
10872 shave_image=ShaveImage(wand->images,&shave_info,wand->exception);
10873 if (shave_image == (Image *) NULL)
10874 return(MagickFalse);
10875 ReplaceImageInList(&wand->images,shave_image);
10876 return(MagickTrue);
10880 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10884 % M a g i c k S h e a r I m a g e %
10888 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10890 % MagickShearImage() slides one edge of an image along the X or Y axis,
10891 % creating a parallelogram. An X direction shear slides an edge along the X
10892 % axis, while a Y direction shear slides an edge along the Y axis. The amount
10893 % of the shear is controlled by a shear angle. For X direction shears, x_shear
10894 % is measured relative to the Y axis, and similarly, for Y direction shears
10895 % y_shear is measured relative to the X axis. Empty triangles left over from
10896 % shearing the image are filled with the background color.
10898 % The format of the MagickShearImage method is:
10900 % MagickBooleanType MagickShearImage(MagickWand *wand,
10901 % const PixelWand *background,const double x_shear,const double y_shear)
10903 % A description of each parameter follows:
10905 % o wand: the magick wand.
10907 % o background: the background pixel wand.
10909 % o x_shear: the number of degrees to shear the image.
10911 % o y_shear: the number of degrees to shear the image.
10914 WandExport MagickBooleanType MagickShearImage(MagickWand *wand,
10915 const PixelWand *background,const double x_shear,const double y_shear)
10920 assert(wand != (MagickWand *) NULL);
10921 assert(wand->signature == MagickWandSignature);
10922 if (wand->debug != MagickFalse)
10923 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10924 if (wand->images == (Image *) NULL)
10925 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10926 PixelGetQuantumPacket(background,&wand->images->background_color);
10927 shear_image=ShearImage(wand->images,x_shear,y_shear,wand->exception);
10928 if (shear_image == (Image *) NULL)
10929 return(MagickFalse);
10930 ReplaceImageInList(&wand->images,shear_image);
10931 return(MagickTrue);
10935 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10939 % M a g i c k S i g m o i d a l C o n t r a s t I m a g e %
10943 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10945 % MagickSigmoidalContrastImage() adjusts the contrast of an image with a
10946 % non-linear sigmoidal contrast algorithm. Increase the contrast of the
10947 % image using a sigmoidal transfer function without saturating highlights or
10948 % shadows. Contrast indicates how much to increase the contrast (0 is none;
10949 % 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in
10950 % the resultant image (0 is white; 50% is middle-gray; 100% is black). Set
10951 % sharpen to MagickTrue to increase the image contrast otherwise the contrast
10954 % The format of the MagickSigmoidalContrastImage method is:
10956 % MagickBooleanType MagickSigmoidalContrastImage(MagickWand *wand,
10957 % const MagickBooleanType sharpen,const double alpha,const double beta)
10959 % A description of each parameter follows:
10961 % o wand: the magick wand.
10963 % o sharpen: Increase or decrease image contrast.
10965 % o alpha: strength of the contrast, the larger the number the more
10966 % 'threshold-like' it becomes.
10968 % o beta: midpoint of the function as a color value 0 to QuantumRange.
10971 WandExport MagickBooleanType MagickSigmoidalContrastImage(
10972 MagickWand *wand,const MagickBooleanType sharpen,const double alpha,
10978 assert(wand != (MagickWand *) NULL);
10979 assert(wand->signature == MagickWandSignature);
10980 if (wand->debug != MagickFalse)
10981 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10982 if (wand->images == (Image *) NULL)
10983 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10984 status=SigmoidalContrastImage(wand->images,sharpen,alpha,beta,
10990 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10994 % M a g i c k S i m i l a r i t y I m a g e %
10998 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11000 % MagickSimilarityImage() compares the reference image of the image and
11001 % returns the best match offset. In addition, it returns a similarity image
11002 % such that an exact match location is completely white and if none of the
11003 % pixels match, black, otherwise some gray level in-between.
11005 % The format of the MagickSimilarityImage method is:
11007 % MagickWand *MagickSimilarityImage(MagickWand *wand,
11008 % const MagickWand *reference,const MetricType metric,
11009 % const double similarity_threshold,RectangeInfo *offset,
11010 % double *similarity)
11012 % A description of each parameter follows:
11014 % o wand: the magick wand.
11016 % o reference: the reference wand.
11018 % o metric: the metric.
11020 % o similarity_threshold: minimum distortion for (sub)image match.
11022 % o offset: the best match offset of the reference image within the image.
11024 % o similarity: the computed similarity between the images.
11027 WandExport MagickWand *MagickSimilarityImage(MagickWand *wand,
11028 const MagickWand *reference,const MetricType metric,
11029 const double similarity_threshold,RectangleInfo *offset,double *similarity)
11034 assert(wand != (MagickWand *) NULL);
11035 assert(wand->signature == MagickWandSignature);
11036 if (wand->debug != MagickFalse)
11037 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11038 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
11040 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
11041 "ContainsNoImages","`%s'",wand->name);
11042 return((MagickWand *) NULL);
11044 similarity_image=SimilarityImage(wand->images,reference->images,metric,
11045 similarity_threshold,offset,similarity,wand->exception);
11046 if (similarity_image == (Image *) NULL)
11047 return((MagickWand *) NULL);
11048 return(CloneMagickWandFromImages(wand,similarity_image));
11052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11056 % M a g i c k S k e t c h I m a g e %
11060 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11062 % MagickSketchImage() simulates a pencil sketch. We convolve the image with
11063 % a Gaussian operator of the given radius and standard deviation (sigma).
11064 % For reasonable results, radius should be larger than sigma. Use a
11065 % radius of 0 and SketchImage() selects a suitable radius for you.
11066 % Angle gives the angle of the blurring motion.
11068 % The format of the MagickSketchImage method is:
11070 % MagickBooleanType MagickSketchImage(MagickWand *wand,
11071 % const double radius,const double sigma,const double angle)
11073 % A description of each parameter follows:
11075 % o wand: the magick wand.
11077 % o radius: the radius of the Gaussian, in pixels, not counting
11078 % the center pixel.
11080 % o sigma: the standard deviation of the Gaussian, in pixels.
11082 % o angle: apply the effect along this angle.
11085 WandExport MagickBooleanType MagickSketchImage(MagickWand *wand,
11086 const double radius,const double sigma,const double angle)
11091 assert(wand != (MagickWand *) NULL);
11092 assert(wand->signature == MagickWandSignature);
11093 if (wand->debug != MagickFalse)
11094 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11095 if (wand->images == (Image *) NULL)
11096 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11097 sketch_image=SketchImage(wand->images,radius,sigma,angle,wand->exception);
11098 if (sketch_image == (Image *) NULL)
11099 return(MagickFalse);
11100 ReplaceImageInList(&wand->images,sketch_image);
11101 return(MagickTrue);
11105 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11109 % M a g i c k S m u s h I m a g e s %
11113 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11115 % MagickSmushImages() takes all images from the current image pointer to the
11116 % end of the image list and smushs them to each other top-to-bottom if the
11117 % stack parameter is true, otherwise left-to-right.
11119 % The format of the MagickSmushImages method is:
11121 % MagickWand *MagickSmushImages(MagickWand *wand,
11122 % const MagickBooleanType stack,const ssize_t offset)
11124 % A description of each parameter follows:
11126 % o wand: the magick wand.
11128 % o stack: By default, images are stacked left-to-right. Set stack to
11129 % MagickTrue to stack them top-to-bottom.
11131 % o offset: minimum distance in pixels between images.
11134 WandExport MagickWand *MagickSmushImages(MagickWand *wand,
11135 const MagickBooleanType stack,const ssize_t offset)
11140 assert(wand != (MagickWand *) NULL);
11141 assert(wand->signature == MagickWandSignature);
11142 if (wand->debug != MagickFalse)
11143 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11144 if (wand->images == (Image *) NULL)
11145 return((MagickWand *) NULL);
11146 smush_image=SmushImages(wand->images,stack,offset,wand->exception);
11147 if (smush_image == (Image *) NULL)
11148 return((MagickWand *) NULL);
11149 return(CloneMagickWandFromImages(wand,smush_image));
11153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11157 % M a g i c k S o l a r i z e I m a g e %
11161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11163 % MagickSolarizeImage() applies a special effect to the image, similar to the
11164 % effect achieved in a photo darkroom by selectively exposing areas of photo
11165 % sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a
11166 % measure of the extent of the solarization.
11168 % The format of the MagickSolarizeImage method is:
11170 % MagickBooleanType MagickSolarizeImage(MagickWand *wand,
11171 % const double threshold)
11173 % A description of each parameter follows:
11175 % o wand: the magick wand.
11177 % o threshold: Define the extent of the solarization.
11180 WandExport MagickBooleanType MagickSolarizeImage(MagickWand *wand,
11181 const double threshold)
11186 assert(wand != (MagickWand *) NULL);
11187 assert(wand->signature == MagickWandSignature);
11188 if (wand->debug != MagickFalse)
11189 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11190 if (wand->images == (Image *) NULL)
11191 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11192 status=SolarizeImage(wand->images,threshold,wand->exception);
11197 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11201 % M a g i c k S p a r s e C o l o r I m a g e %
11205 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11207 % MagickSparseColorImage(), given a set of coordinates, interpolates the
11208 % colors found at those coordinates, across the whole image, using various
11211 % The format of the MagickSparseColorImage method is:
11213 % MagickBooleanType MagickSparseColorImage(MagickWand *wand,
11214 % const SparseColorMethod method,const size_t number_arguments,
11215 % const double *arguments)
11217 % A description of each parameter follows:
11219 % o image: the image to be sparseed.
11221 % o method: the method of image sparseion.
11223 % ArcSparseColorion will always ignore source image offset, and always
11224 % 'bestfit' the destination image with the top left corner offset
11225 % relative to the polar mapping center.
11227 % Bilinear has no simple inverse mapping so will not allow 'bestfit'
11228 % style of image sparseion.
11230 % Affine, Perspective, and Bilinear, will do least squares fitting of
11231 % the distrotion when more than the minimum number of control point
11232 % pairs are provided.
11234 % Perspective, and Bilinear, will fall back to a Affine sparseion when
11235 % less than 4 control point pairs are provided. While Affine sparseions
11236 % will let you use any number of control point pairs, that is Zero pairs
11237 % is a No-Op (viewport only) distrotion, one pair is a translation and
11238 % two pairs of control points will do a scale-rotate-translate, without
11241 % o number_arguments: the number of arguments given for this sparseion
11244 % o arguments: the arguments for this sparseion method.
11247 WandExport MagickBooleanType MagickSparseColorImage(MagickWand *wand,
11248 const SparseColorMethod method,const size_t number_arguments,
11249 const double *arguments)
11254 assert(wand != (MagickWand *) NULL);
11255 assert(wand->signature == MagickWandSignature);
11256 if (wand->debug != MagickFalse)
11257 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11258 if (wand->images == (Image *) NULL)
11259 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11260 sparse_image=SparseColorImage(wand->images,method,number_arguments,arguments,
11262 if (sparse_image == (Image *) NULL)
11263 return(MagickFalse);
11264 ReplaceImageInList(&wand->images,sparse_image);
11265 return(MagickTrue);
11269 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11273 % M a g i c k S p l i c e I m a g e %
11277 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11279 % MagickSpliceImage() splices a solid color into the image.
11281 % The format of the MagickSpliceImage method is:
11283 % MagickBooleanType MagickSpliceImage(MagickWand *wand,
11284 % const size_t width,const size_t height,const ssize_t x,
11287 % A description of each parameter follows:
11289 % o wand: the magick wand.
11291 % o width: the region width.
11293 % o height: the region height.
11295 % o x: the region x offset.
11297 % o y: the region y offset.
11300 WandExport MagickBooleanType MagickSpliceImage(MagickWand *wand,
11301 const size_t width,const size_t height,const ssize_t x,
11310 assert(wand != (MagickWand *) NULL);
11311 assert(wand->signature == MagickWandSignature);
11312 if (wand->debug != MagickFalse)
11313 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11314 if (wand->images == (Image *) NULL)
11315 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11316 splice.width=width;
11317 splice.height=height;
11320 splice_image=SpliceImage(wand->images,&splice,wand->exception);
11321 if (splice_image == (Image *) NULL)
11322 return(MagickFalse);
11323 ReplaceImageInList(&wand->images,splice_image);
11324 return(MagickTrue);
11328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11332 % M a g i c k S p r e a d I m a g e %
11336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11338 % MagickSpreadImage() is a special effects method that randomly displaces each
11339 % pixel in a block defined by the radius parameter.
11341 % The format of the MagickSpreadImage method is:
11343 % MagickBooleanType MagickSpreadImage(MagickWand *wand,
11344 % const PixelInterpolateMethod method,const double radius)
11346 % A description of each parameter follows:
11348 % o wand: the magick wand.
11350 % o method: intepolation method.
11352 % o radius: Choose a random pixel in a neighborhood of this extent.
11355 WandExport MagickBooleanType MagickSpreadImage(MagickWand *wand,
11356 const PixelInterpolateMethod method,const double radius)
11361 assert(wand != (MagickWand *) NULL);
11362 assert(wand->signature == MagickWandSignature);
11363 if (wand->debug != MagickFalse)
11364 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11365 if (wand->images == (Image *) NULL)
11366 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11367 spread_image=SpreadImage(wand->images,method,radius,wand->exception);
11368 if (spread_image == (Image *) NULL)
11369 return(MagickFalse);
11370 ReplaceImageInList(&wand->images,spread_image);
11371 return(MagickTrue);
11375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11379 % M a g i c k S t a t i s t i c I m a g e %
11383 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11385 % MagickStatisticImage() replace each pixel with corresponding statistic from
11386 % the neighborhood of the specified width and height.
11388 % The format of the MagickStatisticImage method is:
11390 % MagickBooleanType MagickStatisticImage(MagickWand *wand,
11391 % const StatisticType type,const double width,const size_t height)
11393 % A description of each parameter follows:
11395 % o wand: the magick wand.
11397 % o type: the statistic type (e.g. median, mode, etc.).
11399 % o width: the width of the pixel neighborhood.
11401 % o height: the height of the pixel neighborhood.
11404 WandExport MagickBooleanType MagickStatisticImage(MagickWand *wand,
11405 const StatisticType type,const size_t width,const size_t height)
11410 assert(wand != (MagickWand *) NULL);
11411 assert(wand->signature == MagickWandSignature);
11412 if (wand->debug != MagickFalse)
11413 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11414 if (wand->images == (Image *) NULL)
11415 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11416 statistic_image=StatisticImage(wand->images,type,width,height,
11418 if (statistic_image == (Image *) NULL)
11419 return(MagickFalse);
11420 ReplaceImageInList(&wand->images,statistic_image);
11421 return(MagickTrue);
11425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11429 % M a g i c k S t e g a n o I m a g e %
11433 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11435 % MagickSteganoImage() hides a digital watermark within the image.
11436 % Recover the hidden watermark later to prove that the authenticity of
11437 % an image. Offset defines the start position within the image to hide
11440 % The format of the MagickSteganoImage method is:
11442 % MagickWand *MagickSteganoImage(MagickWand *wand,
11443 % const MagickWand *watermark_wand,const ssize_t offset)
11445 % A description of each parameter follows:
11447 % o wand: the magick wand.
11449 % o watermark_wand: the watermark wand.
11451 % o offset: Start hiding at this offset into the image.
11454 WandExport MagickWand *MagickSteganoImage(MagickWand *wand,
11455 const MagickWand *watermark_wand,const ssize_t offset)
11460 assert(wand != (MagickWand *) NULL);
11461 assert(wand->signature == MagickWandSignature);
11462 if (wand->debug != MagickFalse)
11463 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11464 if ((wand->images == (Image *) NULL) ||
11465 (watermark_wand->images == (Image *) NULL))
11467 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
11468 "ContainsNoImages","`%s'",wand->name);
11469 return((MagickWand *) NULL);
11471 wand->images->offset=offset;
11472 stegano_image=SteganoImage(wand->images,watermark_wand->images,
11474 if (stegano_image == (Image *) NULL)
11475 return((MagickWand *) NULL);
11476 return(CloneMagickWandFromImages(wand,stegano_image));
11480 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11484 % M a g i c k S t e r e o I m a g e %
11488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11490 % MagickStereoImage() composites two images and produces a single image that
11491 % is the composite of a left and right image of a stereo pair
11493 % The format of the MagickStereoImage method is:
11495 % MagickWand *MagickStereoImage(MagickWand *wand,
11496 % const MagickWand *offset_wand)
11498 % A description of each parameter follows:
11500 % o wand: the magick wand.
11502 % o offset_wand: Another image wand.
11505 WandExport MagickWand *MagickStereoImage(MagickWand *wand,
11506 const MagickWand *offset_wand)
11511 assert(wand != (MagickWand *) NULL);
11512 assert(wand->signature == MagickWandSignature);
11513 if (wand->debug != MagickFalse)
11514 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11515 if ((wand->images == (Image *) NULL) ||
11516 (offset_wand->images == (Image *) NULL))
11518 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
11519 "ContainsNoImages","`%s'",wand->name);
11520 return((MagickWand *) NULL);
11522 stereo_image=StereoImage(wand->images,offset_wand->images,wand->exception);
11523 if (stereo_image == (Image *) NULL)
11524 return((MagickWand *) NULL);
11525 return(CloneMagickWandFromImages(wand,stereo_image));
11529 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11533 % M a g i c k S t r i p I m a g e %
11537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11539 % MagickStripImage() strips an image of all profiles and comments.
11541 % The format of the MagickStripImage method is:
11543 % MagickBooleanType MagickStripImage(MagickWand *wand)
11545 % A description of each parameter follows:
11547 % o wand: the magick wand.
11550 WandExport MagickBooleanType MagickStripImage(MagickWand *wand)
11552 assert(wand != (MagickWand *) NULL);
11553 assert(wand->signature == MagickWandSignature);
11554 if (wand->debug != MagickFalse)
11555 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11556 if (wand->images == (Image *) NULL)
11557 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11558 return(StripImage(wand->images,wand->exception));
11562 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11566 % M a g i c k S w i r l I m a g e %
11570 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11572 % MagickSwirlImage() swirls the pixels about the center of the image, where
11573 % degrees indicates the sweep of the arc through which each pixel is moved.
11574 % You get a more dramatic effect as the degrees move from 1 to 360.
11576 % The format of the MagickSwirlImage method is:
11578 % MagickBooleanType MagickSwirlImage(MagickWand *wand,const double degrees,
11579 % const PixelInterpolateMethod method)
11581 % A description of each parameter follows:
11583 % o wand: the magick wand.
11585 % o degrees: Define the tightness of the swirling effect.
11587 % o method: the pixel interpolation method.
11590 WandExport MagickBooleanType MagickSwirlImage(MagickWand *wand,
11591 const double degrees,const PixelInterpolateMethod method)
11596 assert(wand != (MagickWand *) NULL);
11597 assert(wand->signature == MagickWandSignature);
11598 if (wand->debug != MagickFalse)
11599 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11600 if (wand->images == (Image *) NULL)
11601 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11602 swirl_image=SwirlImage(wand->images,degrees,method,wand->exception);
11603 if (swirl_image == (Image *) NULL)
11604 return(MagickFalse);
11605 ReplaceImageInList(&wand->images,swirl_image);
11606 return(MagickTrue);
11610 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11614 % M a g i c k T e x t u r e I m a g e %
11618 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11620 % MagickTextureImage() repeatedly tiles the texture image across and down the
11623 % The format of the MagickTextureImage method is:
11625 % MagickWand *MagickTextureImage(MagickWand *wand,
11626 % const MagickWand *texture_wand)
11628 % A description of each parameter follows:
11630 % o wand: the magick wand.
11632 % o texture_wand: the texture wand
11635 WandExport MagickWand *MagickTextureImage(MagickWand *wand,
11636 const MagickWand *texture_wand)
11644 assert(wand != (MagickWand *) NULL);
11645 assert(wand->signature == MagickWandSignature);
11646 if (wand->debug != MagickFalse)
11647 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11648 if ((wand->images == (Image *) NULL) ||
11649 (texture_wand->images == (Image *) NULL))
11651 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
11652 "ContainsNoImages","`%s'",wand->name);
11653 return((MagickWand *) NULL);
11655 texture_image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
11656 if (texture_image == (Image *) NULL)
11657 return((MagickWand *) NULL);
11658 status=TextureImage(texture_image,texture_wand->images,wand->exception);
11659 if (status == MagickFalse)
11661 texture_image=DestroyImage(texture_image);
11662 return((MagickWand *) NULL);
11664 return(CloneMagickWandFromImages(wand,texture_image));
11668 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11672 % M a g i c k T h r e s h o l d I m a g e %
11676 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11678 % MagickThresholdImage() changes the value of individual pixels based on
11679 % the intensity of each pixel compared to threshold. The result is a
11680 % high-contrast, two color image.
11682 % The format of the MagickThresholdImage method is:
11684 % MagickBooleanType MagickThresholdImage(MagickWand *wand,
11685 % const double threshold)
11686 % MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
11687 % const ChannelType channel,const double threshold)
11689 % A description of each parameter follows:
11691 % o wand: the magick wand.
11693 % o channel: the image channel(s).
11695 % o threshold: Define the threshold value.
11698 WandExport MagickBooleanType MagickThresholdImage(MagickWand *wand,
11699 const double threshold)
11704 status=MagickThresholdImageChannel(wand,DefaultChannels,threshold);
11708 WandExport MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
11709 const ChannelType channel,const double threshold)
11717 assert(wand != (MagickWand *) NULL);
11718 assert(wand->signature == MagickWandSignature);
11719 if (wand->debug != MagickFalse)
11720 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11721 if (wand->images == (Image *) NULL)
11722 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11723 channel_mask=SetImageChannelMask(wand->images,channel);
11724 status=BilevelImage(wand->images,threshold,wand->exception);
11725 (void) SetImageChannelMask(wand->images,channel_mask);
11730 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11734 % M a g i c k T h u m b n a i l I m a g e %
11738 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11740 % MagickThumbnailImage() changes the size of an image to the given dimensions
11741 % and removes any associated profiles. The goal is to produce small low cost
11742 % thumbnail images suited for display on the Web.
11744 % The format of the MagickThumbnailImage method is:
11746 % MagickBooleanType MagickThumbnailImage(MagickWand *wand,
11747 % const size_t columns,const size_t rows)
11749 % A description of each parameter follows:
11751 % o wand: the magick wand.
11753 % o columns: the number of columns in the scaled image.
11755 % o rows: the number of rows in the scaled image.
11758 WandExport MagickBooleanType MagickThumbnailImage(MagickWand *wand,
11759 const size_t columns,const size_t rows)
11764 assert(wand != (MagickWand *) NULL);
11765 assert(wand->signature == MagickWandSignature);
11766 if (wand->debug != MagickFalse)
11767 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11768 if (wand->images == (Image *) NULL)
11769 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11770 thumbnail_image=ThumbnailImage(wand->images,columns,rows,wand->exception);
11771 if (thumbnail_image == (Image *) NULL)
11772 return(MagickFalse);
11773 ReplaceImageInList(&wand->images,thumbnail_image);
11774 return(MagickTrue);
11778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11782 % M a g i c k T i n t I m a g e %
11786 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11788 % MagickTintImage() applies a color vector to each pixel in the image. The
11789 % length of the vector is 0 for black and white and at its maximum for the
11790 % midtones. The vector weighting function is
11791 % f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).
11793 % The format of the MagickTintImage method is:
11795 % MagickBooleanType MagickTintImage(MagickWand *wand,
11796 % const PixelWand *tint,const PixelWand *blend)
11798 % A description of each parameter follows:
11800 % o wand: the magick wand.
11802 % o tint: the tint pixel wand.
11804 % o alpha: the alpha pixel wand.
11807 WandExport MagickBooleanType MagickTintImage(MagickWand *wand,
11808 const PixelWand *tint,const PixelWand *blend)
11811 percent_blend[MagickPathExtent];
11819 assert(wand != (MagickWand *) NULL);
11820 assert(wand->signature == MagickWandSignature);
11821 if (wand->debug != MagickFalse)
11822 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11823 if (wand->images == (Image *) NULL)
11824 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11825 if (wand->images->colorspace != CMYKColorspace)
11826 (void) FormatLocaleString(percent_blend,MagickPathExtent,
11827 "%g,%g,%g,%g",(double) (100.0*QuantumScale*
11828 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
11829 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
11830 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
11831 PixelGetAlphaQuantum(blend)));
11833 (void) FormatLocaleString(percent_blend,MagickPathExtent,
11834 "%g,%g,%g,%g,%g",(double) (100.0*QuantumScale*
11835 PixelGetCyanQuantum(blend)),(double) (100.0*QuantumScale*
11836 PixelGetMagentaQuantum(blend)),(double) (100.0*QuantumScale*
11837 PixelGetYellowQuantum(blend)),(double) (100.0*QuantumScale*
11838 PixelGetBlackQuantum(blend)),(double) (100.0*QuantumScale*
11839 PixelGetAlphaQuantum(blend)));
11840 target=PixelGetPixel(tint);
11841 tint_image=TintImage(wand->images,percent_blend,&target,wand->exception);
11842 if (tint_image == (Image *) NULL)
11843 return(MagickFalse);
11844 ReplaceImageInList(&wand->images,tint_image);
11845 return(MagickTrue);
11849 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11853 % M a g i c k T r a n s f o r m I m a g e C o l o r s p a c e %
11857 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11859 % MagickTransformImageColorspace() transform the image colorspace, setting
11860 % the images colorspace while transforming the images data to that
11863 % The format of the MagickTransformImageColorspace method is:
11865 % MagickBooleanType MagickTransformImageColorspace(MagickWand *wand,
11866 % const ColorspaceType colorspace)
11868 % A description of each parameter follows:
11870 % o wand: the magick wand.
11872 % o colorspace: the image colorspace: UndefinedColorspace,
11873 % sRGBColorspace, RGBColorspace, GRAYColorspace,
11874 % OHTAColorspace, XYZColorspace, YCbCrColorspace,
11875 % YCCColorspace, YIQColorspace, YPbPrColorspace,
11876 % YPbPrColorspace, YUVColorspace, CMYKColorspace,
11877 % HSLColorspace, HWBColorspace.
11880 WandExport MagickBooleanType MagickTransformImageColorspace(MagickWand *wand,
11881 const ColorspaceType colorspace)
11883 assert(wand != (MagickWand *) NULL);
11884 assert(wand->signature == MagickWandSignature);
11885 if (wand->debug != MagickFalse)
11886 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11887 if (wand->images == (Image *) NULL)
11888 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11889 return(TransformImageColorspace(wand->images,colorspace,wand->exception));
11893 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11897 % M a g i c k T r a n s p a r e n t P a i n t I m a g e %
11901 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11903 % MagickTransparentPaintImage() changes any pixel that matches color with the
11904 % color defined by fill.
11906 % The format of the MagickTransparentPaintImage method is:
11908 % MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
11909 % const PixelWand *target,const double alpha,const double fuzz,
11910 % const MagickBooleanType invert)
11912 % A description of each parameter follows:
11914 % o wand: the magick wand.
11916 % o target: Change this target color to specified alpha value within
11919 % o alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully
11922 % o fuzz: By default target must match a particular pixel color
11923 % exactly. However, in many cases two colors may differ by a small amount.
11924 % The fuzz member of image defines how much tolerance is acceptable to
11925 % consider two colors as the same. For example, set fuzz to 10 and the
11926 % color red at intensities of 100 and 102 respectively are now interpreted
11927 % as the same color for the purposes of the floodfill.
11929 % o invert: paint any pixel that does not match the target color.
11932 WandExport MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
11933 const PixelWand *target,const double alpha,const double fuzz,
11934 const MagickBooleanType invert)
11942 assert(wand != (MagickWand *) NULL);
11943 assert(wand->signature == MagickWandSignature);
11944 if (wand->debug != MagickFalse)
11945 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11946 if (wand->images == (Image *) NULL)
11947 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11948 PixelGetMagickColor(target,&target_pixel);
11949 wand->images->fuzz=fuzz;
11950 status=TransparentPaintImage(wand->images,&target_pixel,ClampToQuantum(
11951 QuantumRange*alpha),invert,wand->exception);
11956 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11960 % M a g i c k T r a n s p o s e I m a g e %
11964 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11966 % MagickTransposeImage() creates a vertical mirror image by reflecting the
11967 % pixels around the central x-axis while rotating them 90-degrees.
11969 % The format of the MagickTransposeImage method is:
11971 % MagickBooleanType MagickTransposeImage(MagickWand *wand)
11973 % A description of each parameter follows:
11975 % o wand: the magick wand.
11978 WandExport MagickBooleanType MagickTransposeImage(MagickWand *wand)
11983 assert(wand != (MagickWand *) NULL);
11984 assert(wand->signature == MagickWandSignature);
11985 if (wand->debug != MagickFalse)
11986 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11987 if (wand->images == (Image *) NULL)
11988 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11989 transpose_image=TransposeImage(wand->images,wand->exception);
11990 if (transpose_image == (Image *) NULL)
11991 return(MagickFalse);
11992 ReplaceImageInList(&wand->images,transpose_image);
11993 return(MagickTrue);
11997 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12001 % M a g i c k T r a n s v e r s e I m a g e %
12005 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12007 % MagickTransverseImage() creates a horizontal mirror image by reflecting the
12008 % pixels around the central y-axis while rotating them 270-degrees.
12010 % The format of the MagickTransverseImage method is:
12012 % MagickBooleanType MagickTransverseImage(MagickWand *wand)
12014 % A description of each parameter follows:
12016 % o wand: the magick wand.
12019 WandExport MagickBooleanType MagickTransverseImage(MagickWand *wand)
12024 assert(wand != (MagickWand *) NULL);
12025 assert(wand->signature == MagickWandSignature);
12026 if (wand->debug != MagickFalse)
12027 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12028 if (wand->images == (Image *) NULL)
12029 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12030 transverse_image=TransverseImage(wand->images,wand->exception);
12031 if (transverse_image == (Image *) NULL)
12032 return(MagickFalse);
12033 ReplaceImageInList(&wand->images,transverse_image);
12034 return(MagickTrue);
12038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12042 % M a g i c k T r i m I m a g e %
12046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12048 % MagickTrimImage() remove edges that are the background color from the image.
12050 % The format of the MagickTrimImage method is:
12052 % MagickBooleanType MagickTrimImage(MagickWand *wand,const double fuzz)
12054 % A description of each parameter follows:
12056 % o wand: the magick wand.
12058 % o fuzz: By default target must match a particular pixel color
12059 % exactly. However, in many cases two colors may differ by a small amount.
12060 % The fuzz member of image defines how much tolerance is acceptable to
12061 % consider two colors as the same. For example, set fuzz to 10 and the
12062 % color red at intensities of 100 and 102 respectively are now interpreted
12063 % as the same color for the purposes of the floodfill.
12066 WandExport MagickBooleanType MagickTrimImage(MagickWand *wand,const double fuzz)
12071 assert(wand != (MagickWand *) NULL);
12072 assert(wand->signature == MagickWandSignature);
12073 if (wand->debug != MagickFalse)
12074 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12075 if (wand->images == (Image *) NULL)
12076 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12077 wand->images->fuzz=fuzz;
12078 trim_image=TrimImage(wand->images,wand->exception);
12079 if (trim_image == (Image *) NULL)
12080 return(MagickFalse);
12081 ReplaceImageInList(&wand->images,trim_image);
12082 return(MagickTrue);
12086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12090 % M a g i c k U n i q u e I m a g e C o l o r s %
12094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12096 % MagickUniqueImageColors() discards all but one of any pixel color.
12098 % The format of the MagickUniqueImageColors method is:
12100 % MagickBooleanType MagickUniqueImageColors(MagickWand *wand)
12102 % A description of each parameter follows:
12104 % o wand: the magick wand.
12107 WandExport MagickBooleanType MagickUniqueImageColors(MagickWand *wand)
12112 assert(wand != (MagickWand *) NULL);
12113 assert(wand->signature == MagickWandSignature);
12114 if (wand->debug != MagickFalse)
12115 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12116 if (wand->images == (Image *) NULL)
12117 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12118 unique_image=UniqueImageColors(wand->images,wand->exception);
12119 if (unique_image == (Image *) NULL)
12120 return(MagickFalse);
12121 ReplaceImageInList(&wand->images,unique_image);
12122 return(MagickTrue);
12126 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12130 % M a g i c k U n s h a r p M a s k I m a g e %
12134 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12136 % MagickUnsharpMaskImage() sharpens an image. We convolve the image with a
12137 % Gaussian operator of the given radius and standard deviation (sigma).
12138 % For reasonable results, radius should be larger than sigma. Use a radius
12139 % of 0 and UnsharpMaskImage() selects a suitable radius for you.
12141 % The format of the MagickUnsharpMaskImage method is:
12143 % MagickBooleanType MagickUnsharpMaskImage(MagickWand *wand,
12144 % const double radius,const double sigma,const double gain,
12145 % const double threshold)
12147 % A description of each parameter follows:
12149 % o wand: the magick wand.
12151 % o radius: the radius of the Gaussian, in pixels, not counting the center
12154 % o sigma: the standard deviation of the Gaussian, in pixels.
12156 % o gain: the percentage of the difference between the original and the
12157 % blur image that is added back into the original.
12159 % o threshold: the threshold in pixels needed to apply the diffence gain.
12162 WandExport MagickBooleanType MagickUnsharpMaskImage(MagickWand *wand,
12163 const double radius,const double sigma,const double gain,
12164 const double threshold)
12169 assert(wand != (MagickWand *) NULL);
12170 assert(wand->signature == MagickWandSignature);
12171 if (wand->debug != MagickFalse)
12172 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12173 if (wand->images == (Image *) NULL)
12174 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12175 unsharp_image=UnsharpMaskImage(wand->images,radius,sigma,gain,threshold,
12177 if (unsharp_image == (Image *) NULL)
12178 return(MagickFalse);
12179 ReplaceImageInList(&wand->images,unsharp_image);
12180 return(MagickTrue);
12184 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12188 % M a g i c k V i g n e t t e I m a g e %
12192 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12194 % MagickVignetteImage() softens the edges of the image in vignette style.
12196 % The format of the MagickVignetteImage method is:
12198 % MagickBooleanType MagickVignetteImage(MagickWand *wand,
12199 % const double radius,const double sigma,const ssize_t x,
12202 % A description of each parameter follows:
12204 % o wand: the magick wand.
12206 % o radius: the radius.
12208 % o sigma: the sigma.
12210 % o x, y: Define the x and y ellipse offset.
12213 WandExport MagickBooleanType MagickVignetteImage(MagickWand *wand,
12214 const double radius,const double sigma,const ssize_t x,const ssize_t y)
12219 assert(wand != (MagickWand *) NULL);
12220 assert(wand->signature == MagickWandSignature);
12221 if (wand->debug != MagickFalse)
12222 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12223 if (wand->images == (Image *) NULL)
12224 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12225 vignette_image=VignetteImage(wand->images,radius,sigma,x,y,wand->exception);
12226 if (vignette_image == (Image *) NULL)
12227 return(MagickFalse);
12228 ReplaceImageInList(&wand->images,vignette_image);
12229 return(MagickTrue);
12233 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12237 % M a g i c k W a v e I m a g e %
12241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12243 % MagickWaveImage() creates a "ripple" effect in the image by shifting
12244 % the pixels vertically along a sine wave whose amplitude and wavelength
12245 % is specified by the given parameters.
12247 % The format of the MagickWaveImage method is:
12249 % MagickBooleanType MagickWaveImage(MagickWand *wand,
12250 % const double amplitude,const double wave_length,
12251 % const PixelInterpolateMethod method)
12253 % A description of each parameter follows:
12255 % o wand: the magick wand.
12257 % o amplitude, wave_length: Define the amplitude and wave length of the
12260 % o method: the pixel interpolation method.
12263 WandExport MagickBooleanType MagickWaveImage(MagickWand *wand,
12264 const double amplitude,const double wave_length,
12265 const PixelInterpolateMethod method)
12270 assert(wand != (MagickWand *) NULL);
12271 assert(wand->signature == MagickWandSignature);
12272 if (wand->debug != MagickFalse)
12273 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12274 if (wand->images == (Image *) NULL)
12275 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12276 wave_image=WaveImage(wand->images,amplitude,wave_length,method,
12278 if (wave_image == (Image *) NULL)
12279 return(MagickFalse);
12280 ReplaceImageInList(&wand->images,wave_image);
12281 return(MagickTrue);
12285 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12289 % M a g i c k W h i t e T h r e s h o l d I m a g e %
12293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12295 % MagickWhiteThresholdImage() is like ThresholdImage() but force all pixels
12296 % above the threshold into white while leaving all pixels below the threshold
12299 % The format of the MagickWhiteThresholdImage method is:
12301 % MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
12302 % const PixelWand *threshold)
12304 % A description of each parameter follows:
12306 % o wand: the magick wand.
12308 % o threshold: the pixel wand.
12311 WandExport MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
12312 const PixelWand *threshold)
12315 thresholds[MagickPathExtent];
12317 assert(wand != (MagickWand *) NULL);
12318 assert(wand->signature == MagickWandSignature);
12319 if (wand->debug != MagickFalse)
12320 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12321 if (wand->images == (Image *) NULL)
12322 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12323 (void) FormatLocaleString(thresholds,MagickPathExtent,
12324 QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
12325 PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
12326 PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
12327 return(WhiteThresholdImage(wand->images,thresholds,wand->exception));
12331 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12335 % M a g i c k W r i t e I m a g e %
12339 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12341 % MagickWriteImage() writes an image to the specified filename. If the
12342 % filename parameter is NULL, the image is written to the filename set
12343 % by MagickReadImage() or MagickSetImageFilename().
12345 % The format of the MagickWriteImage method is:
12347 % MagickBooleanType MagickWriteImage(MagickWand *wand,
12348 % const char *filename)
12350 % A description of each parameter follows:
12352 % o wand: the magick wand.
12354 % o filename: the image filename.
12358 WandExport MagickBooleanType MagickWriteImage(MagickWand *wand,
12359 const char *filename)
12370 assert(wand != (MagickWand *) NULL);
12371 assert(wand->signature == MagickWandSignature);
12372 if (wand->debug != MagickFalse)
12373 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12374 if (wand->images == (Image *) NULL)
12375 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12376 if (filename != (const char *) NULL)
12377 (void) CopyMagickString(wand->images->filename,filename,MagickPathExtent);
12378 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
12379 if (image == (Image *) NULL)
12380 return(MagickFalse);
12381 write_info=CloneImageInfo(wand->image_info);
12382 write_info->adjoin=MagickTrue;
12383 status=WriteImage(write_info,image,wand->exception);
12384 image=DestroyImage(image);
12385 write_info=DestroyImageInfo(write_info);
12390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12394 % M a g i c k W r i t e I m a g e F i l e %
12398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12400 % MagickWriteImageFile() writes an image to an open file descriptor.
12402 % The format of the MagickWriteImageFile method is:
12404 % MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)
12406 % A description of each parameter follows:
12408 % o wand: the magick wand.
12410 % o file: the file descriptor.
12413 WandExport MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)
12424 assert(wand != (MagickWand *) NULL);
12425 assert(wand->signature == MagickWandSignature);
12426 assert(file != (FILE *) NULL);
12427 if (wand->debug != MagickFalse)
12428 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12429 if (wand->images == (Image *) NULL)
12430 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12431 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
12432 if (image == (Image *) NULL)
12433 return(MagickFalse);
12434 write_info=CloneImageInfo(wand->image_info);
12435 SetImageInfoFile(write_info,file);
12436 write_info->adjoin=MagickTrue;
12437 status=WriteImage(write_info,image,wand->exception);
12438 write_info=DestroyImageInfo(write_info);
12439 image=DestroyImage(image);
12444 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12448 % M a g i c k W r i t e I m a g e s %
12452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12454 % MagickWriteImages() writes an image or image sequence.
12456 % The format of the MagickWriteImages method is:
12458 % MagickBooleanType MagickWriteImages(MagickWand *wand,
12459 % const char *filename,const MagickBooleanType adjoin)
12461 % A description of each parameter follows:
12463 % o wand: the magick wand.
12465 % o filename: the image filename.
12467 % o adjoin: join images into a single multi-image file.
12470 WandExport MagickBooleanType MagickWriteImages(MagickWand *wand,
12471 const char *filename,const MagickBooleanType adjoin)
12479 assert(wand != (MagickWand *) NULL);
12480 assert(wand->signature == MagickWandSignature);
12481 if (wand->debug != MagickFalse)
12482 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12483 if (wand->images == (Image *) NULL)
12484 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12485 write_info=CloneImageInfo(wand->image_info);
12486 write_info->adjoin=adjoin;
12487 status=WriteImages(write_info,wand->images,filename,wand->exception);
12488 write_info=DestroyImageInfo(write_info);
12493 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12497 % M a g i c k W r i t e I m a g e s F i l e %
12501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12503 % MagickWriteImagesFile() writes an image sequence to an open file descriptor.
12505 % The format of the MagickWriteImagesFile method is:
12507 % MagickBooleanType MagickWriteImagesFile(MagickWand *wand,FILE *file)
12509 % A description of each parameter follows:
12511 % o wand: the magick wand.
12513 % o file: the file descriptor.
12516 WandExport MagickBooleanType MagickWriteImagesFile(MagickWand *wand,FILE *file)
12524 assert(wand != (MagickWand *) NULL);
12525 assert(wand->signature == MagickWandSignature);
12526 if (wand->debug != MagickFalse)
12527 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12528 if (wand->images == (Image *) NULL)
12529 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12530 write_info=CloneImageInfo(wand->image_info);
12531 SetImageInfoFile(write_info,file);
12532 write_info->adjoin=MagickTrue;
12533 status=WriteImages(write_info,wand->images,(const char *) NULL,
12535 write_info=DestroyImageInfo(write_info);