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-2011 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 % http://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"
58 #define ThrowWandException(severity,tag,context) \
60 (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
61 tag,"`%s'",context); \
62 return(MagickFalse); \
64 #define MagickWandId "MagickWand"
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71 + 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 %
75 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77 % CloneMagickWandFromImages() clones the magick wand and inserts a new image
80 % The format of the CloneMagickWandFromImages method is:
82 % MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
85 % A description of each parameter follows:
87 % o wand: the magick wand.
89 % o images: replace the image list with these image(s).
92 static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
98 assert(wand != (MagickWand *) NULL);
99 assert(wand->signature == WandSignature);
100 if (wand->debug != MagickFalse)
101 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
102 clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
103 if (clone_wand == (MagickWand *) NULL)
104 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
106 (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
107 clone_wand->id=AcquireWandId();
108 (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
109 MagickWandId,(double) clone_wand->id);
110 clone_wand->exception=AcquireExceptionInfo();
111 InheritException(clone_wand->exception,wand->exception);
112 clone_wand->image_info=CloneImageInfo(wand->image_info);
113 clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
114 clone_wand->images=images;
115 clone_wand->debug=IsEventLogging();
116 if (clone_wand->debug != MagickFalse)
117 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
118 clone_wand->signature=WandSignature;
123 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 % G e t I m a g e F r o m M a g i c k W a n d %
131 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
133 % GetImageFromMagickWand() returns the current image from the magick wand.
135 % The format of the GetImageFromMagickWand method is:
137 % Image *GetImageFromMagickWand(const MagickWand *wand)
139 % A description of each parameter follows:
141 % o wand: the magick wand.
144 WandExport Image *GetImageFromMagickWand(const MagickWand *wand)
146 assert(wand != (MagickWand *) NULL);
147 assert(wand->signature == WandSignature);
148 if (wand->debug != MagickFalse)
149 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
150 if (wand->images == (Image *) NULL)
152 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
153 "ContainsNoImages","`%s'",wand->name);
154 return((Image *) NULL);
156 return(wand->images);
160 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 % 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 %
168 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 % MagickAdaptiveBlurImage() adaptively blurs the image by blurring
171 % less intensely near image edges and more intensely far from edges. We
172 % blur the image with a Gaussian operator of the given radius and standard
173 % deviation (sigma). For reasonable results, radius should be larger than
174 % sigma. Use a radius of 0 and MagickAdaptiveBlurImage() selects a
175 % suitable radius for you.
177 % The format of the MagickAdaptiveBlurImage method is:
179 % MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
180 % const double radius,const double sigma,const double bias)
182 % A description of each parameter follows:
184 % o wand: the magick wand.
186 % o radius: the radius of the Gaussian, in pixels, not counting the center
189 % o sigma: the standard deviation of the Gaussian, in pixels.
194 WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
195 const double radius,const double sigma,const double bias)
200 assert(wand != (MagickWand *) NULL);
201 assert(wand->signature == WandSignature);
202 if (wand->debug != MagickFalse)
203 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
204 if (wand->images == (Image *) NULL)
205 ThrowWandException(WandError,"ContainsNoImages",wand->name);
206 sharp_image=AdaptiveBlurImage(wand->images,radius,sigma,bias,wand->exception);
207 if (sharp_image == (Image *) NULL)
209 ReplaceImageInList(&wand->images,sharp_image);
214 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
218 % 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 %
222 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
224 % MagickAdaptiveResizeImage() adaptively resize image with data dependent
227 % MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
228 % const size_t columns,const size_t rows,
229 % const PixelInterpolateMethod method)
231 % A description of each parameter follows:
233 % o wand: the magick wand.
235 % o columns: the number of columns in the scaled image.
237 % o rows: the number of rows in the scaled image.
239 % o interpolate: the pixel interpolation method.
242 WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
243 const size_t columns,const size_t rows,const PixelInterpolateMethod method)
248 assert(wand != (MagickWand *) NULL);
249 assert(wand->signature == WandSignature);
250 if (wand->debug != MagickFalse)
251 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
252 if (wand->images == (Image *) NULL)
253 ThrowWandException(WandError,"ContainsNoImages",wand->name);
254 resize_image=AdaptiveResizeImage(wand->images,columns,rows,method,
256 if (resize_image == (Image *) NULL)
258 ReplaceImageInList(&wand->images,resize_image);
263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
267 % 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 %
271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273 % MagickAdaptiveSharpenImage() adaptively sharpens the image by sharpening
274 % more intensely near image edges and less intensely far from edges. We
275 % sharpen the image with a Gaussian operator of the given radius and standard
276 % deviation (sigma). For reasonable results, radius should be larger than
277 % sigma. Use a radius of 0 and MagickAdaptiveSharpenImage() selects a
278 % suitable radius for you.
280 % The format of the MagickAdaptiveSharpenImage method is:
282 % MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
283 % const double radius,const double sigma,const double bias)
285 % A description of each parameter follows:
287 % o wand: the magick wand.
289 % o radius: the radius of the Gaussian, in pixels, not counting the center
292 % o sigma: the standard deviation of the Gaussian, in pixels.
297 WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
298 const double radius,const double sigma,const double bias)
303 assert(wand != (MagickWand *) NULL);
304 assert(wand->signature == WandSignature);
305 if (wand->debug != MagickFalse)
306 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
307 if (wand->images == (Image *) NULL)
308 ThrowWandException(WandError,"ContainsNoImages",wand->name);
309 sharp_image=AdaptiveSharpenImage(wand->images,radius,sigma,bias,
311 if (sharp_image == (Image *) NULL)
313 ReplaceImageInList(&wand->images,sharp_image);
318 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322 % 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 %
326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
328 % MagickAdaptiveThresholdImage() selects an individual threshold for each pixel
329 % based on the range of intensity values in its local neighborhood. This
330 % allows for thresholding of an image whose global intensity histogram
331 % doesn't contain distinctive peaks.
333 % The format of the AdaptiveThresholdImage method is:
335 % MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
336 % const size_t width,const size_t height,const double bias)
338 % A description of each parameter follows:
340 % o wand: the magick wand.
342 % o width: the width of the local neighborhood.
344 % o height: the height of the local neighborhood.
346 % o offset: the mean bias.
349 WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
350 const size_t width,const size_t height,const double bias)
355 assert(wand != (MagickWand *) NULL);
356 assert(wand->signature == WandSignature);
357 if (wand->debug != MagickFalse)
358 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
359 if (wand->images == (Image *) NULL)
360 ThrowWandException(WandError,"ContainsNoImages",wand->name);
361 threshold_image=AdaptiveThresholdImage(wand->images,width,height,bias,
363 if (threshold_image == (Image *) NULL)
365 ReplaceImageInList(&wand->images,threshold_image);
370 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
374 % M a g i c k A d d I m a g e %
378 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
380 % MagickAddImage() adds a clone of the images in the second wand and
381 % inserts them into the first wand, at the current image location.
383 % Use MagickSetFirstIterator(), to insert new images before all the current
384 % images in the wand, otherwise image is placed after the current image.
386 % The format of the MagickAddImage method is:
388 % MagickBooleanType MagickAddImage(MagickWand *wand,
389 % const MagickWand *add_wand)
391 % A description of each parameter follows:
393 % o wand: the magick wand.
395 % o add_wand: A wand that contains images to add at the current image
400 static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
406 current=wand->images; /* note the current image */
408 /* if no images in wand, just add them and set first image as current */
409 if (current == (Image *) NULL)
411 wand->images=GetFirstImageInList(images);
415 /* user jumped to first image, so prepend new images - remain active */
416 if ((wand->set_first != MagickFalse) &&
417 (current->previous == (Image *) NULL) )
419 PrependImageToList(¤t,images);
420 wand->images=GetFirstImageInList(images);
423 wand->set_first = MagickFalse; /* flag no longer valid */
425 /* Current image was flaged as 'pending' iterative processing. */
426 if (wand->image_pending != MagickFalse)
428 /* current pending image is the last, append new images */
429 if (current->next == (Image *) NULL)
431 AppendImageToList(¤t,images);
432 wand->images=GetLastImageInList(images);
435 /* current pending image is the first image, prepend it */
436 if (current->previous == (Image *) NULL)
438 PrependImageToList(¤t,images);
439 wand->images=GetFirstImageInList(images);
444 /* if at last image append new images */
445 if (current->next == (Image *) NULL)
447 InsertImageInList(¤t,images);
448 wand->images=GetLastImageInList(images);
451 /* otherwise just insert image, just after the current image */
452 InsertImageInList(¤t,images);
453 wand->images=GetFirstImageInList(images);
457 WandExport MagickBooleanType MagickAddImage(MagickWand *wand,
458 const MagickWand *add_wand)
463 assert(wand != (MagickWand *) NULL);
464 assert(wand->signature == WandSignature);
465 if (wand->debug != MagickFalse)
466 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
467 assert(add_wand != (MagickWand *) NULL);
468 assert(add_wand->signature == WandSignature);
469 if (add_wand->images == (Image *) NULL)
470 ThrowWandException(WandError,"ContainsNoImages",add_wand->name);
472 /* clone images in second wand, and insert into first */
473 images=CloneImageList(add_wand->images,wand->exception);
474 if (images == (Image *) NULL)
476 return(InsertImageInWand(wand,images));
480 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
484 % M a g i c k A d d N o i s e I m a g e %
488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
490 % MagickAddNoiseImage() adds random noise to the image.
492 % The format of the MagickAddNoiseImage method is:
494 % MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
495 % const NoiseType noise_type,const double attenuate)
497 % A description of each parameter follows:
499 % o wand: the magick wand.
501 % o noise_type: The type of noise: Uniform, Gaussian, Multiplicative,
502 % Impulse, Laplacian, or Poisson.
504 % o attenuate: attenuate the random distribution.
507 WandExport MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
508 const NoiseType noise_type,const double attenuate)
513 assert(wand != (MagickWand *) NULL);
514 assert(wand->signature == WandSignature);
515 if (wand->debug != MagickFalse)
516 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
517 if (wand->images == (Image *) NULL)
518 ThrowWandException(WandError,"ContainsNoImages",wand->name);
519 noise_image=AddNoiseImage(wand->images,noise_type,attenuate,wand->exception);
520 if (noise_image == (Image *) NULL)
522 ReplaceImageInList(&wand->images,noise_image);
527 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
531 % 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 %
535 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
537 % MagickAffineTransformImage() transforms an image as dictated by the affine
538 % matrix of the drawing wand.
540 % The format of the MagickAffineTransformImage method is:
542 % MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
543 % const DrawingWand *drawing_wand)
545 % A description of each parameter follows:
547 % o wand: the magick wand.
549 % o drawing_wand: the draw wand.
552 WandExport MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
553 const DrawingWand *drawing_wand)
561 assert(wand != (MagickWand *) NULL);
562 assert(wand->signature == WandSignature);
563 if (wand->debug != MagickFalse)
564 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
565 if (wand->images == (Image *) NULL)
566 ThrowWandException(WandError,"ContainsNoImages",wand->name);
567 draw_info=PeekDrawingWand(drawing_wand);
568 if (draw_info == (DrawInfo *) NULL)
570 affine_image=AffineTransformImage(wand->images,&draw_info->affine,
572 draw_info=DestroyDrawInfo(draw_info);
573 if (affine_image == (Image *) NULL)
575 ReplaceImageInList(&wand->images,affine_image);
580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
584 % M a g i c k A n n o t a t e I m a g e %
588 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
590 % MagickAnnotateImage() annotates an image with text.
592 % The format of the MagickAnnotateImage method is:
594 % MagickBooleanType MagickAnnotateImage(MagickWand *wand,
595 % const DrawingWand *drawing_wand,const double x,const double y,
596 % const double angle,const char *text)
598 % A description of each parameter follows:
600 % o wand: the magick wand.
602 % o drawing_wand: the draw wand.
604 % o x: x ordinate to left of text
606 % o y: y ordinate to text baseline
608 % o angle: rotate text relative to this angle.
610 % o text: text to draw
613 WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand,
614 const DrawingWand *drawing_wand,const double x,const double y,
615 const double angle,const char *text)
618 geometry[MaxTextExtent];
626 assert(wand != (MagickWand *) NULL);
627 assert(wand->signature == WandSignature);
628 if (wand->debug != MagickFalse)
629 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
630 if (wand->images == (Image *) NULL)
631 ThrowWandException(WandError,"ContainsNoImages",wand->name);
632 draw_info=PeekDrawingWand(drawing_wand);
633 if (draw_info == (DrawInfo *) NULL)
635 (void) CloneString(&draw_info->text,text);
636 (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",x,y);
637 draw_info->affine.sx=cos((double) DegreesToRadians(fmod(angle,360.0)));
638 draw_info->affine.rx=sin((double) DegreesToRadians(fmod(angle,360.0)));
639 draw_info->affine.ry=(-sin((double) DegreesToRadians(fmod(angle,360.0))));
640 draw_info->affine.sy=cos((double) DegreesToRadians(fmod(angle,360.0)));
641 (void) CloneString(&draw_info->geometry,geometry);
642 status=AnnotateImage(wand->images,draw_info,wand->exception);
643 draw_info=DestroyDrawInfo(draw_info);
648 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
652 % M a g i c k A n i m a t e I m a g e s %
656 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
658 % MagickAnimateImages() animates an image or image sequence.
660 % The format of the MagickAnimateImages method is:
662 % MagickBooleanType MagickAnimateImages(MagickWand *wand,
663 % const char *server_name)
665 % A description of each parameter follows:
667 % o wand: the magick wand.
669 % o server_name: the X server name.
672 WandExport MagickBooleanType MagickAnimateImages(MagickWand *wand,
673 const char *server_name)
678 assert(wand != (MagickWand *) NULL);
679 assert(wand->signature == WandSignature);
680 if (wand->debug != MagickFalse)
681 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
682 (void) CloneString(&wand->image_info->server_name,server_name);
683 status=AnimateImages(wand->image_info,wand->images,wand->exception);
688 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
692 % M a g i c k A p p e n d I m a g e s %
696 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
698 % MagickAppendImages() append a set of images.
700 % The format of the MagickAppendImages method is:
702 % MagickWand *MagickAppendImages(MagickWand *wand,
703 % const MagickBooleanType stack)
705 % A description of each parameter follows:
707 % o wand: the magick wand.
709 % o stack: By default, images are stacked left-to-right. Set stack to
710 % MagickTrue to stack them top-to-bottom.
713 WandExport MagickWand *MagickAppendImages(MagickWand *wand,
714 const MagickBooleanType stack)
719 assert(wand != (MagickWand *) NULL);
720 assert(wand->signature == WandSignature);
721 if (wand->debug != MagickFalse)
722 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
723 if (wand->images == (Image *) NULL)
724 return((MagickWand *) NULL);
725 append_image=AppendImages(wand->images,stack,wand->exception);
726 if (append_image == (Image *) NULL)
727 return((MagickWand *) NULL);
728 return(CloneMagickWandFromImages(wand,append_image));
732 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
736 % M a g i c k A u t o G a m m a I m a g e %
740 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
742 % MagickAutoGammaImage() extracts the 'mean' from the image and adjust the
743 % image to try make set its gamma appropriatally.
745 % The format of the MagickAutoGammaImage method is:
747 % MagickBooleanType MagickAutoGammaImage(MagickWand *wand)
749 % A description of each parameter follows:
751 % o wand: the magick wand.
754 WandExport MagickBooleanType MagickAutoGammaImage(MagickWand *wand)
759 assert(wand != (MagickWand *) NULL);
760 assert(wand->signature == WandSignature);
761 if (wand->debug != MagickFalse)
762 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
763 if (wand->images == (Image *) NULL)
764 ThrowWandException(WandError,"ContainsNoImages",wand->name);
765 status=AutoGammaImage(wand->images,wand->exception);
770 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
774 % M a g i c k A u t o L e v e l I m a g e %
778 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
780 % MagickAutoLevelImage() adjusts the levels of a particular image channel by
781 % scaling the minimum and maximum values to the full quantum range.
783 % The format of the MagickAutoLevelImage method is:
785 % MagickBooleanType MagickAutoLevelImage(MagickWand *wand)
787 % A description of each parameter follows:
789 % o wand: the magick wand.
792 WandExport MagickBooleanType MagickAutoLevelImage(MagickWand *wand)
797 assert(wand != (MagickWand *) NULL);
798 assert(wand->signature == WandSignature);
799 if (wand->debug != MagickFalse)
800 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
801 if (wand->images == (Image *) NULL)
802 ThrowWandException(WandError,"ContainsNoImages",wand->name);
803 status=AutoLevelImage(wand->images,wand->exception);
808 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
812 % 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 %
816 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
818 % MagickBlackThresholdImage() is like MagickThresholdImage() but forces all
819 % pixels below the threshold into black while leaving all pixels above the
820 % threshold unchanged.
822 % The format of the MagickBlackThresholdImage method is:
824 % MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
825 % const PixelWand *threshold)
827 % A description of each parameter follows:
829 % o wand: the magick wand.
831 % o threshold: the pixel wand.
834 WandExport MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
835 const PixelWand *threshold)
838 thresholds[MaxTextExtent];
843 assert(wand != (MagickWand *) NULL);
844 assert(wand->signature == WandSignature);
845 if (wand->debug != MagickFalse)
846 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
847 if (wand->images == (Image *) NULL)
848 ThrowWandException(WandError,"ContainsNoImages",wand->name);
849 (void) FormatLocaleString(thresholds,MaxTextExtent,
850 QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
851 PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
852 PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
853 status=BlackThresholdImage(wand->images,thresholds,wand->exception);
858 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
862 % M a g i c k B l u e S h i f t I m a g e %
866 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
868 % MagickBlueShiftImage() mutes the colors of the image to simulate a scene at
869 % nighttime in the moonlight.
871 % The format of the MagickBlueShiftImage method is:
873 % MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
874 % const double factor)
876 % A description of each parameter follows:
878 % o wand: the magick wand.
880 % o factor: the blue shift factor (default 1.5)
883 WandExport MagickBooleanType MagickBlueShiftImage(MagickWand *wand,
889 assert(wand != (MagickWand *) NULL);
890 assert(wand->signature == WandSignature);
891 if (wand->debug != MagickFalse)
892 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
893 if (wand->images == (Image *) NULL)
894 ThrowWandException(WandError,"ContainsNoImages",wand->name);
895 shift_image=BlueShiftImage(wand->images,factor,wand->exception);
896 if (shift_image == (Image *) NULL)
898 ReplaceImageInList(&wand->images,shift_image);
903 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
907 % M a g i c k B l u r I m a g e %
911 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
913 % MagickBlurImage() blurs an image. We convolve the image with a
914 % gaussian operator of the given radius and standard deviation (sigma).
915 % For reasonable results, the radius should be larger than sigma. Use a
916 % radius of 0 and BlurImage() selects a suitable radius for you.
918 % The format of the MagickBlurImage method is:
920 % MagickBooleanType MagickBlurImage(MagickWand *wand,const double radius,
921 % const double sigmaconst double bias)
923 % A description of each parameter follows:
925 % o wand: the magick wand.
927 % o radius: the radius of the , in pixels, not counting the center
930 % o sigma: the standard deviation of the , in pixels.
935 WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
936 const double radius,const double sigma,const double bias)
941 assert(wand != (MagickWand *) NULL);
942 assert(wand->signature == WandSignature);
943 if (wand->debug != MagickFalse)
944 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
945 if (wand->images == (Image *) NULL)
946 ThrowWandException(WandError,"ContainsNoImages",wand->name);
947 blur_image=BlurImage(wand->images,radius,sigma,bias,wand->exception);
948 if (blur_image == (Image *) NULL)
950 ReplaceImageInList(&wand->images,blur_image);
955 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
959 % M a g i c k B o r d e r I m a g e %
963 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
965 % MagickBorderImage() surrounds the image with a border of the color defined
966 % by the bordercolor pixel wand.
968 % The format of the MagickBorderImage method is:
970 % MagickBooleanType MagickBorderImage(MagickWand *wand,
971 % const PixelWand *bordercolor,const size_t width,
972 % const size_t height,const CompositeOperator compose)
974 % A description of each parameter follows:
976 % o wand: the magick wand.
978 % o bordercolor: the border color pixel wand.
980 % o width: the border width.
982 % o height: the border height.
984 % o compose: the composite operator.
987 WandExport MagickBooleanType MagickBorderImage(MagickWand *wand,
988 const PixelWand *bordercolor,const size_t width,const size_t height,
989 const CompositeOperator compose)
997 assert(wand != (MagickWand *) NULL);
998 assert(wand->signature == WandSignature);
999 if (wand->debug != MagickFalse)
1000 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1001 if (wand->images == (Image *) NULL)
1002 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1003 border_info.width=width;
1004 border_info.height=height;
1007 PixelGetQuantumPacket(bordercolor,&wand->images->border_color);
1008 border_image=BorderImage(wand->images,&border_info,compose,wand->exception);
1009 if (border_image == (Image *) NULL)
1010 return(MagickFalse);
1011 ReplaceImageInList(&wand->images,border_image);
1016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1020 % 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 %
1024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1026 % Use MagickBrightnessContrastImage() to change the brightness and/or contrast
1027 % of an image. It converts the brightness and contrast parameters into slope
1028 % and intercept and calls a polynomical function to apply to the image.
1031 % The format of the MagickBrightnessContrastImage method is:
1033 % MagickBooleanType MagickBrightnessContrastImage(MagickWand *wand,
1034 % const double brightness,const double contrast)
1036 % A description of each parameter follows:
1038 % o wand: the magick wand.
1040 % o brightness: the brightness percent (-100 .. 100).
1042 % o contrast: the contrast percent (-100 .. 100).
1045 WandExport MagickBooleanType MagickBrightnessContrastImage(
1046 MagickWand *wand,const double brightness,const double contrast)
1051 assert(wand != (MagickWand *) NULL);
1052 assert(wand->signature == WandSignature);
1053 if (wand->debug != MagickFalse)
1054 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1055 if (wand->images == (Image *) NULL)
1056 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1057 status=BrightnessContrastImage(wand->images,brightness,contrast,
1063 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1067 % M a g i c k C h a r c o a l I m a g e %
1071 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1073 % MagickCharcoalImage() simulates a charcoal drawing.
1075 % The format of the MagickCharcoalImage method is:
1077 % MagickBooleanType MagickCharcoalImage(MagickWand *wand,
1078 % const double radius,const double sigma,const double bias)
1080 % A description of each parameter follows:
1082 % o wand: the magick wand.
1084 % o radius: the radius of the Gaussian, in pixels, not counting the center
1087 % o sigma: the standard deviation of the Gaussian, in pixels.
1092 WandExport MagickBooleanType MagickCharcoalImage(MagickWand *wand,
1093 const double radius,const double sigma,const double bias)
1098 assert(wand != (MagickWand *) NULL);
1099 assert(wand->signature == WandSignature);
1100 if (wand->debug != MagickFalse)
1101 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1102 if (wand->images == (Image *) NULL)
1103 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1104 charcoal_image=CharcoalImage(wand->images,radius,sigma,bias,wand->exception);
1105 if (charcoal_image == (Image *) NULL)
1106 return(MagickFalse);
1107 ReplaceImageInList(&wand->images,charcoal_image);
1112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1116 % M a g i c k C h o p I m a g e %
1120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1122 % MagickChopImage() removes a region of an image and collapses the image to
1123 % occupy the removed portion
1125 % The format of the MagickChopImage method is:
1127 % MagickBooleanType MagickChopImage(MagickWand *wand,
1128 % const size_t width,const size_t height,const ssize_t x,
1131 % A description of each parameter follows:
1133 % o wand: the magick wand.
1135 % o width: the region width.
1137 % o height: the region height.
1139 % o x: the region x offset.
1141 % o y: the region y offset.
1145 WandExport MagickBooleanType MagickChopImage(MagickWand *wand,
1146 const size_t width,const size_t height,const ssize_t x,
1155 assert(wand != (MagickWand *) NULL);
1156 assert(wand->signature == WandSignature);
1157 if (wand->debug != MagickFalse)
1158 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1159 if (wand->images == (Image *) NULL)
1160 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1165 chop_image=ChopImage(wand->images,&chop,wand->exception);
1166 if (chop_image == (Image *) NULL)
1167 return(MagickFalse);
1168 ReplaceImageInList(&wand->images,chop_image);
1173 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1177 % M a g i c k C l a m p I m a g e %
1181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1183 % MagickClampImage() restricts the color range from 0 to the quantum depth.
1185 % The format of the MagickClampImage method is:
1187 % MagickBooleanType MagickClampImage(MagickWand *wand)
1189 % A description of each parameter follows:
1191 % o wand: the magick wand.
1193 % o channel: the channel.
1196 WandExport MagickBooleanType MagickClampImage(MagickWand *wand)
1198 assert(wand != (MagickWand *) NULL);
1199 assert(wand->signature == WandSignature);
1200 if (wand->debug != MagickFalse)
1201 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1202 if (wand->images == (Image *) NULL)
1203 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1204 return(ClampImage(wand->images,wand->exception));
1208 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1212 % M a g i c k C l i p I m a g e %
1216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1218 % MagickClipImage() clips along the first path from the 8BIM profile, if
1221 % The format of the MagickClipImage method is:
1223 % MagickBooleanType MagickClipImage(MagickWand *wand)
1225 % A description of each parameter follows:
1227 % o wand: the magick wand.
1230 WandExport MagickBooleanType MagickClipImage(MagickWand *wand)
1235 assert(wand != (MagickWand *) NULL);
1236 assert(wand->signature == WandSignature);
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);
1241 status=ClipImage(wand->images,wand->exception);
1246 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1250 % M a g i c k C l i p I m a g e P a t h %
1254 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1256 % MagickClipImagePath() clips along the named paths from the 8BIM profile, if
1257 % present. Later operations take effect inside the path. Id may be a number
1258 % if preceded with #, to work on a numbered path, e.g., "#1" to use the first
1261 % The format of the MagickClipImagePath method is:
1263 % MagickBooleanType MagickClipImagePath(MagickWand *wand,
1264 % const char *pathname,const MagickBooleanType inside)
1266 % A description of each parameter follows:
1268 % o wand: the magick wand.
1270 % o pathname: name of clipping path resource. If name is preceded by #, use
1271 % clipping path numbered by name.
1273 % o inside: if non-zero, later operations take effect inside clipping path.
1274 % Otherwise later operations take effect outside clipping path.
1277 WandExport MagickBooleanType MagickClipImagePath(MagickWand *wand,
1278 const char *pathname,const MagickBooleanType inside)
1283 assert(wand != (MagickWand *) NULL);
1284 assert(wand->signature == WandSignature);
1285 if (wand->debug != MagickFalse)
1286 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1287 if (wand->images == (Image *) NULL)
1288 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1289 status=ClipImagePath(wand->images,pathname,inside,wand->exception);
1294 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1298 % M a g i c k C l u t I m a g e %
1302 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1304 % MagickClutImage() replaces colors in the image from a color lookup table.
1306 % The format of the MagickClutImage method is:
1308 % MagickBooleanType MagickClutImage(MagickWand *wand,
1309 % const MagickWand *clut_wand,const PixelInterpolateMethod method)
1311 % A description of each parameter follows:
1313 % o wand: the magick wand.
1315 % o clut_image: the clut image.
1317 % o method: the pixel interpolation method.
1320 WandExport MagickBooleanType MagickClutImage(MagickWand *wand,
1321 const MagickWand *clut_wand,const PixelInterpolateMethod method)
1326 assert(wand != (MagickWand *) NULL);
1327 assert(wand->signature == WandSignature);
1328 if (wand->debug != MagickFalse)
1329 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1330 if ((wand->images == (Image *) NULL) || (clut_wand->images == (Image *) NULL))
1331 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1332 status=ClutImage(wand->images,clut_wand->images,method,wand->exception);
1337 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1341 % M a g i c k C o a l e s c e I m a g e s %
1345 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1347 % MagickCoalesceImages() composites a set of images while respecting any page
1348 % offsets and disposal methods. GIF, MIFF, and MNG animation sequences
1349 % typically start with an image background and each subsequent image
1350 % varies in size and offset. MagickCoalesceImages() returns a new sequence
1351 % where each image in the sequence is the same size as the first and
1352 % composited with the next image in the sequence.
1354 % The format of the MagickCoalesceImages method is:
1356 % MagickWand *MagickCoalesceImages(MagickWand *wand)
1358 % A description of each parameter follows:
1360 % o wand: the magick wand.
1363 WandExport MagickWand *MagickCoalesceImages(MagickWand *wand)
1368 assert(wand != (MagickWand *) NULL);
1369 assert(wand->signature == WandSignature);
1370 if (wand->debug != MagickFalse)
1371 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1372 if (wand->images == (Image *) NULL)
1373 return((MagickWand *) NULL);
1374 coalesce_image=CoalesceImages(wand->images,wand->exception);
1375 if (coalesce_image == (Image *) NULL)
1376 return((MagickWand *) NULL);
1377 return(CloneMagickWandFromImages(wand,coalesce_image));
1381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1385 % M a g i c k C o l o r D e c i s i o n I m a g e %
1389 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1391 % MagickColorDecisionListImage() accepts a lightweight Color Correction
1392 % Collection (CCC) file which solely contains one or more color corrections
1393 % and applies the color correction to the image. Here is a sample CCC file:
1395 % <ColorCorrectionCollection xmlns="urn:ASC:CDL:v1.2">
1396 % <ColorCorrection id="cc03345">
1398 % <Slope> 0.9 1.2 0.5 </Slope>
1399 % <Offset> 0.4 -0.5 0.6 </Offset>
1400 % <Power> 1.0 0.8 1.5 </Power>
1403 % <Saturation> 0.85 </Saturation>
1405 % </ColorCorrection>
1406 % </ColorCorrectionCollection>
1408 % which includes the offset, slope, and power for each of the RGB channels
1409 % as well as the saturation.
1411 % The format of the MagickColorDecisionListImage method is:
1413 % MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
1414 % const double gamma)
1416 % A description of each parameter follows:
1418 % o wand: the magick wand.
1420 % o color_correction_collection: the color correction collection in XML.
1423 WandExport MagickBooleanType MagickColorDecisionListImage(MagickWand *wand,
1424 const char *color_correction_collection)
1429 assert(wand != (MagickWand *) NULL);
1430 assert(wand->signature == WandSignature);
1431 if (wand->debug != MagickFalse)
1432 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1433 if (wand->images == (Image *) NULL)
1434 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1435 status=ColorDecisionListImage(wand->images,color_correction_collection,
1441 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1445 % M a g i c k C o l o r i z e I m a g e %
1449 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1451 % MagickColorizeImage() blends the fill color with each pixel in the image.
1453 % The format of the MagickColorizeImage method is:
1455 % MagickBooleanType MagickColorizeImage(MagickWand *wand,
1456 % const PixelWand *colorize,const PixelWand *blend)
1458 % A description of each parameter follows:
1460 % o wand: the magick wand.
1462 % o colorize: the colorize pixel wand.
1464 % o alpha: the alpha pixel wand.
1467 WandExport MagickBooleanType MagickColorizeImage(MagickWand *wand,
1468 const PixelWand *colorize,const PixelWand *blend)
1471 percent_blend[MaxTextExtent];
1479 assert(wand != (MagickWand *) NULL);
1480 assert(wand->signature == WandSignature);
1481 if (wand->debug != MagickFalse)
1482 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1483 if (wand->images == (Image *) NULL)
1484 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1485 GetPixelInfo(wand->images,&target);
1486 if (target.colorspace != CMYKColorspace)
1487 (void) FormatLocaleString(percent_blend,MaxTextExtent,
1488 "%g,%g,%g,%g",(double) (100.0*QuantumScale*
1489 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
1490 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
1491 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
1492 PixelGetAlphaQuantum(blend)));
1494 (void) FormatLocaleString(percent_blend,MaxTextExtent,
1495 "%g,%g,%g,%g,%g",(double) (100.0*QuantumScale*
1496 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
1497 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
1498 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
1499 PixelGetBlackQuantum(blend)),(double) (100.0*QuantumScale*
1500 PixelGetAlphaQuantum(blend)));
1501 target=PixelGetPixel(colorize);
1502 colorize_image=ColorizeImage(wand->images,percent_blend,&target,
1504 if (colorize_image == (Image *) NULL)
1505 return(MagickFalse);
1506 ReplaceImageInList(&wand->images,colorize_image);
1511 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1515 % M a g i c k C o l o r M a t r i x I m a g e %
1519 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1521 % MagickColorMatrixImage() apply color transformation to an image. The method
1522 % permits saturation changes, hue rotation, luminance to alpha, and various
1523 % other effects. Although variable-sized transformation matrices can be used,
1524 % typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA
1525 % (or RGBA with offsets). The matrix is similar to those used by Adobe Flash
1526 % except offsets are in column 6 rather than 5 (in support of CMYKA images)
1527 % and offsets are normalized (divide Flash offset by 255).
1529 % The format of the MagickColorMatrixImage method is:
1531 % MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
1532 % const KernelInfo *color_matrix)
1534 % A description of each parameter follows:
1536 % o wand: the magick wand.
1538 % o color_matrix: the color matrix.
1541 WandExport MagickBooleanType MagickColorMatrixImage(MagickWand *wand,
1542 const KernelInfo *color_matrix)
1547 assert(wand != (MagickWand *) NULL);
1548 assert(wand->signature == WandSignature);
1549 if (wand->debug != MagickFalse)
1550 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1551 if (color_matrix == (const KernelInfo *) NULL)
1552 return(MagickFalse);
1553 if (wand->images == (Image *) NULL)
1554 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1555 color_image=ColorMatrixImage(wand->images,color_matrix,wand->exception);
1556 if (color_image == (Image *) NULL)
1557 return(MagickFalse);
1558 ReplaceImageInList(&wand->images,color_image);
1563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1567 % M a g i c k C o m b i n e I m a g e s %
1571 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1573 % MagickCombineImages() combines one or more images into a single image. The
1574 % grayscale value of the pixels of each image in the sequence is assigned in
1575 % order to the specified hannels of the combined image. The typical
1576 % ordering would be image 1 => Red, 2 => Green, 3 => Blue, etc.
1578 % The format of the MagickCombineImages method is:
1580 % MagickWand *MagickCombineImages(MagickWand *wand)
1582 % A description of each parameter follows:
1584 % o wand: the magick wand.
1587 WandExport MagickWand *MagickCombineImages(MagickWand *wand)
1592 assert(wand != (MagickWand *) NULL);
1593 assert(wand->signature == WandSignature);
1594 if (wand->debug != MagickFalse)
1595 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1596 if (wand->images == (Image *) NULL)
1597 return((MagickWand *) NULL);
1598 combine_image=CombineImages(wand->images,wand->exception);
1599 if (combine_image == (Image *) NULL)
1600 return((MagickWand *) NULL);
1601 return(CloneMagickWandFromImages(wand,combine_image));
1605 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1609 % M a g i c k C o m m e n t I m a g e %
1613 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1615 % MagickCommentImage() adds a comment to your image.
1617 % The format of the MagickCommentImage method is:
1619 % MagickBooleanType MagickCommentImage(MagickWand *wand,
1620 % const char *comment)
1622 % A description of each parameter follows:
1624 % o wand: the magick wand.
1626 % o comment: the image comment.
1629 WandExport MagickBooleanType MagickCommentImage(MagickWand *wand,
1630 const char *comment)
1635 assert(wand != (MagickWand *) NULL);
1636 assert(wand->signature == WandSignature);
1637 if (wand->debug != MagickFalse)
1638 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1639 if (wand->images == (Image *) NULL)
1640 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1641 status=SetImageProperty(wand->images,"comment",comment,wand->exception);
1646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1650 % M a g i c k C o m p a r e I m a g e L a y e r s %
1654 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1656 % MagickCompareImagesLayers() compares each image with the next in a sequence
1657 % and returns the maximum bounding region of any pixel differences it
1660 % The format of the MagickCompareImagesLayers method is:
1662 % MagickWand *MagickCompareImagesLayers(MagickWand *wand,
1663 % const ImageLayerMethod method)
1665 % A description of each parameter follows:
1667 % o wand: the magick wand.
1669 % o method: the compare method.
1672 WandExport MagickWand *MagickCompareImagesLayers(MagickWand *wand,
1673 const ImageLayerMethod method)
1678 assert(wand != (MagickWand *) NULL);
1679 assert(wand->signature == WandSignature);
1680 if (wand->debug != MagickFalse)
1681 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1682 if (wand->images == (Image *) NULL)
1683 return((MagickWand *) NULL);
1684 layers_image=CompareImagesLayers(wand->images,method,wand->exception);
1685 if (layers_image == (Image *) NULL)
1686 return((MagickWand *) NULL);
1687 return(CloneMagickWandFromImages(wand,layers_image));
1691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1695 % M a g i c k C o m p a r e I m a g e s %
1699 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1701 % MagickCompareImages() compares an image to a reconstructed image and returns
1702 % the specified difference image.
1704 % The format of the MagickCompareImages method is:
1706 % MagickWand *MagickCompareImages(MagickWand *wand,
1707 % const MagickWand *reference,const MetricType metric,
1708 % double *distortion)
1710 % A description of each parameter follows:
1712 % o wand: the magick wand.
1714 % o reference: the reference wand.
1716 % o metric: the metric.
1718 % o distortion: the computed distortion between the images.
1721 WandExport MagickWand *MagickCompareImages(MagickWand *wand,
1722 const MagickWand *reference,const MetricType metric,double *distortion)
1728 assert(wand != (MagickWand *) NULL);
1729 assert(wand->signature == WandSignature);
1730 if (wand->debug != MagickFalse)
1731 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1732 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
1734 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
1735 "ContainsNoImages","`%s'",wand->name);
1736 return((MagickWand *) NULL);
1738 compare_image=CompareImages(wand->images,reference->images,metric,distortion,
1740 if (compare_image == (Image *) NULL)
1741 return((MagickWand *) NULL);
1742 return(CloneMagickWandFromImages(wand,compare_image));
1746 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1750 % M a g i c k C o m p o s i t e I m a g e %
1754 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1756 % MagickCompositeImage() composite one image onto another at the specified
1759 % The format of the MagickCompositeImage method is:
1761 % MagickBooleanType MagickCompositeImage(MagickWand *wand,
1762 % const MagickWand *composite_wand,const CompositeOperator compose,
1763 % const ssize_t x,const ssize_t y)
1765 % A description of each parameter follows:
1767 % o wand: the magick wand.
1769 % o composite_image: the composite image.
1771 % o compose: This operator affects how the composite is applied to the
1772 % image. The default is Over. Choose from these operators:
1774 % OverCompositeOp InCompositeOp OutCompositeOp
1775 % AtopCompositeOp XorCompositeOp PlusCompositeOp
1776 % MinusCompositeOp AddCompositeOp SubtractCompositeOp
1777 % DifferenceCompositeOp BumpmapCompositeOp CopyCompositeOp
1778 % DisplaceCompositeOp
1780 % o x: the column offset of the composited image.
1782 % o y: the row offset of the composited image.
1785 WandExport MagickBooleanType MagickCompositeImage(MagickWand *wand,
1786 const MagickWand *composite_wand,const CompositeOperator compose,
1787 const ssize_t x,const ssize_t y)
1792 assert(wand != (MagickWand *) NULL);
1793 assert(wand->signature == WandSignature);
1794 if (wand->debug != MagickFalse)
1795 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1796 if ((wand->images == (Image *) NULL) ||
1797 (composite_wand->images == (Image *) NULL))
1798 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1799 status=CompositeImage(wand->images,compose,composite_wand->images,x,y,
1805 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1809 % M a g i c k C o n t r a s t I m a g e %
1813 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1815 % MagickContrastImage() enhances the intensity differences between the lighter
1816 % and darker elements of the image. Set sharpen to a value other than 0 to
1817 % increase the image contrast otherwise the contrast is reduced.
1819 % The format of the MagickContrastImage method is:
1821 % MagickBooleanType MagickContrastImage(MagickWand *wand,
1822 % const MagickBooleanType sharpen)
1824 % A description of each parameter follows:
1826 % o wand: the magick wand.
1828 % o sharpen: Increase or decrease image contrast.
1832 WandExport MagickBooleanType MagickContrastImage(MagickWand *wand,
1833 const MagickBooleanType sharpen)
1838 assert(wand != (MagickWand *) NULL);
1839 assert(wand->signature == WandSignature);
1840 if (wand->debug != MagickFalse)
1841 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1842 if (wand->images == (Image *) NULL)
1843 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1844 status=ContrastImage(wand->images,sharpen,wand->exception);
1849 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1853 % 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 %
1857 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1859 % MagickContrastStretchImage() enhances the contrast of a color image by
1860 % adjusting the pixels color to span the entire range of colors available.
1861 % You can also reduce the influence of a particular channel with a gamma
1864 % The format of the MagickContrastStretchImage method is:
1866 % MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
1867 % const double black_point,const double white_point)
1869 % A description of each parameter follows:
1871 % o wand: the magick wand.
1873 % o black_point: the black point.
1875 % o white_point: the white point.
1878 WandExport MagickBooleanType MagickContrastStretchImage(MagickWand *wand,
1879 const double black_point,const double white_point)
1884 assert(wand != (MagickWand *) NULL);
1885 assert(wand->signature == WandSignature);
1886 if (wand->debug != MagickFalse)
1887 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1888 if (wand->images == (Image *) NULL)
1889 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1890 status=ContrastStretchImage(wand->images,black_point,white_point,
1896 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1900 % M a g i c k C o n v o l v e I m a g e %
1904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1906 % MagickConvolveImage() applies a custom convolution kernel to the image.
1908 % The format of the MagickConvolveImage method is:
1910 % MagickBooleanType MagickConvolveImage(MagickWand *wand,
1911 % const KernelInfo *kernel)
1913 % A description of each parameter follows:
1915 % o wand: the magick wand.
1917 % o kernel: An array of doubles representing the convolution kernel.
1920 WandExport MagickBooleanType MagickConvolveImage(MagickWand *wand,
1921 const KernelInfo *kernel)
1926 assert(wand != (MagickWand *) NULL);
1927 assert(wand->signature == WandSignature);
1928 if (wand->debug != MagickFalse)
1929 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1930 if (kernel == (const KernelInfo *) NULL)
1931 return(MagickFalse);
1932 if (wand->images == (Image *) NULL)
1933 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1934 filter_image=ConvolveImage(wand->images,kernel,wand->exception);
1935 if (filter_image == (Image *) NULL)
1936 return(MagickFalse);
1937 ReplaceImageInList(&wand->images,filter_image);
1942 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1946 % M a g i c k C r o p I m a g e %
1950 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1952 % MagickCropImage() extracts a region of the image.
1954 % The format of the MagickCropImage method is:
1956 % MagickBooleanType MagickCropImage(MagickWand *wand,
1957 % const size_t width,const size_t height,const ssize_t x,const ssize_t y)
1959 % A description of each parameter follows:
1961 % o wand: the magick wand.
1963 % o width: the region width.
1965 % o height: the region height.
1967 % o x: the region x-offset.
1969 % o y: the region y-offset.
1972 WandExport MagickBooleanType MagickCropImage(MagickWand *wand,
1973 const size_t width,const size_t height,const ssize_t x,const ssize_t y)
1981 assert(wand != (MagickWand *) NULL);
1982 assert(wand->signature == WandSignature);
1983 if (wand->debug != MagickFalse)
1984 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
1985 if (wand->images == (Image *) NULL)
1986 ThrowWandException(WandError,"ContainsNoImages",wand->name);
1991 crop_image=CropImage(wand->images,&crop,wand->exception);
1992 if (crop_image == (Image *) NULL)
1993 return(MagickFalse);
1994 ReplaceImageInList(&wand->images,crop_image);
1999 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2003 % M a g i c k C y c l e C o l o r m a p I m a g e %
2007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2009 % MagickCycleColormapImage() displaces an image's colormap by a given number
2010 % of positions. If you cycle the colormap a number of times you can produce
2011 % a psychodelic effect.
2013 % The format of the MagickCycleColormapImage method is:
2015 % MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
2016 % const ssize_t displace)
2018 % A description of each parameter follows:
2020 % o wand: the magick wand.
2022 % o pixel_wand: the pixel wand.
2025 WandExport MagickBooleanType MagickCycleColormapImage(MagickWand *wand,
2026 const ssize_t displace)
2031 assert(wand != (MagickWand *) NULL);
2032 assert(wand->signature == WandSignature);
2033 if (wand->debug != MagickFalse)
2034 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2035 if (wand->images == (Image *) NULL)
2036 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2037 status=CycleColormapImage(wand->images,displace,wand->exception);
2042 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2046 % M a g i c k C o n s t i t u t e I m a g e %
2050 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2052 % MagickConstituteImage() adds an image to the wand comprised of the pixel
2053 % data you supply. The pixel data must be in scanline order top-to-bottom.
2054 % The data can be char, short int, int, float, or double. Float and double
2055 % require the pixels to be normalized [0..1], otherwise [0..Max], where Max
2056 % is the maximum value the type can accomodate (e.g. 255 for char). For
2057 % example, to create a 640x480 image from unsigned red-green-blue character
2060 % MagickConstituteImage(wand,640,640,"RGB",CharPixel,pixels);
2062 % The format of the MagickConstituteImage method is:
2064 % MagickBooleanType MagickConstituteImage(MagickWand *wand,
2065 % const size_t columns,const size_t rows,const char *map,
2066 % const StorageType storage,void *pixels)
2068 % A description of each parameter follows:
2070 % o wand: the magick wand.
2072 % o columns: width in pixels of the image.
2074 % o rows: height in pixels of the image.
2076 % o map: This string reflects the expected ordering of the pixel array.
2077 % It can be any combination or order of R = red, G = green, B = blue,
2078 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
2079 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
2082 % o storage: Define the data type of the pixels. Float and double types are
2083 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
2084 % these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel,
2085 % LongPixel, QuantumPixel, or ShortPixel.
2087 % o pixels: This array of values contain the pixel components as defined by
2088 % map and type. You must preallocate this array where the expected
2089 % length varies depending on the values of width, height, map, and type.
2093 WandExport MagickBooleanType MagickConstituteImage(MagickWand *wand,
2094 const size_t columns,const size_t rows,const char *map,
2095 const StorageType storage,const void *pixels)
2100 assert(wand != (MagickWand *) NULL);
2101 assert(wand->signature == WandSignature);
2102 if (wand->debug != MagickFalse)
2103 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2104 images=ConstituteImage(columns,rows,map,storage,pixels,wand->exception);
2105 if (images == (Image *) NULL)
2106 return(MagickFalse);
2107 return(InsertImageInWand(wand,images));
2111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2115 % M a g i c k D e c i p h e r I m a g e %
2119 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2121 % MagickDecipherImage() converts cipher pixels to plain pixels.
2123 % The format of the MagickDecipherImage method is:
2125 % MagickBooleanType MagickDecipherImage(MagickWand *wand,
2126 % const char *passphrase)
2128 % A description of each parameter follows:
2130 % o wand: the magick wand.
2132 % o passphrase: the passphrase.
2135 WandExport MagickBooleanType MagickDecipherImage(MagickWand *wand,
2136 const char *passphrase)
2138 assert(wand != (MagickWand *) NULL);
2139 assert(wand->signature == WandSignature);
2140 if (wand->debug != MagickFalse)
2141 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2142 if (wand->images == (Image *) NULL)
2143 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2144 return(DecipherImage(wand->images,passphrase,wand->exception));
2148 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2152 % M a g i c k D e c o n s t r u c t I m a g e s %
2156 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2158 % MagickDeconstructImages() compares each image with the next in a sequence
2159 % and returns the maximum bounding region of any pixel differences it
2162 % The format of the MagickDeconstructImages method is:
2164 % MagickWand *MagickDeconstructImages(MagickWand *wand)
2166 % A description of each parameter follows:
2168 % o wand: the magick wand.
2171 WandExport MagickWand *MagickDeconstructImages(MagickWand *wand)
2176 assert(wand != (MagickWand *) NULL);
2177 assert(wand->signature == WandSignature);
2178 if (wand->debug != MagickFalse)
2179 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2180 if (wand->images == (Image *) NULL)
2181 return((MagickWand *) NULL);
2182 deconstruct_image=CompareImagesLayers(wand->images,CompareAnyLayer,
2184 if (deconstruct_image == (Image *) NULL)
2185 return((MagickWand *) NULL);
2186 return(CloneMagickWandFromImages(wand,deconstruct_image));
2190 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2194 % M a g i c k D e s k e w I m a g e %
2198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2200 % MagickDeskewImage() removes skew from the image. Skew is an artifact that
2201 % occurs in scanned images because of the camera being misaligned,
2202 % imperfections in the scanning or surface, or simply because the paper was
2203 % not placed completely flat when scanned.
2205 % The format of the MagickDeskewImage method is:
2207 % MagickBooleanType MagickDeskewImage(MagickWand *wand,
2208 % const double threshold)
2210 % A description of each parameter follows:
2212 % o wand: the magick wand.
2214 % o threshold: separate background from foreground.
2217 WandExport MagickBooleanType MagickDeskewImage(MagickWand *wand,
2218 const double threshold)
2223 assert(wand != (MagickWand *) NULL);
2224 assert(wand->signature == WandSignature);
2225 if (wand->debug != MagickFalse)
2226 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2227 if (wand->images == (Image *) NULL)
2228 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2229 sepia_image=DeskewImage(wand->images,threshold,wand->exception);
2230 if (sepia_image == (Image *) NULL)
2231 return(MagickFalse);
2232 ReplaceImageInList(&wand->images,sepia_image);
2237 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2241 % M a g i c k D e s p e c k l e I m a g e %
2245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2247 % MagickDespeckleImage() reduces the speckle noise in an image while
2248 % perserving the edges of the original image.
2250 % The format of the MagickDespeckleImage method is:
2252 % MagickBooleanType MagickDespeckleImage(MagickWand *wand)
2254 % A description of each parameter follows:
2256 % o wand: the magick wand.
2259 WandExport MagickBooleanType MagickDespeckleImage(MagickWand *wand)
2264 assert(wand != (MagickWand *) NULL);
2265 assert(wand->signature == WandSignature);
2266 if (wand->debug != MagickFalse)
2267 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2268 if (wand->images == (Image *) NULL)
2269 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2270 despeckle_image=DespeckleImage(wand->images,wand->exception);
2271 if (despeckle_image == (Image *) NULL)
2272 return(MagickFalse);
2273 ReplaceImageInList(&wand->images,despeckle_image);
2278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2282 % M a g i c k D e s t r o y I m a g e %
2286 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2288 % MagickDestroyImage() dereferences an image, deallocating memory associated
2289 % with the image if the reference count becomes zero.
2291 % The format of the MagickDestroyImage method is:
2293 % Image *MagickDestroyImage(Image *image)
2295 % A description of each parameter follows:
2297 % o image: the image.
2300 WandExport Image *MagickDestroyImage(Image *image)
2302 return(DestroyImage(image));
2306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2310 % M a g i c k D i s p l a y I m a g e %
2314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2316 % MagickDisplayImage() displays an image.
2318 % The format of the MagickDisplayImage method is:
2320 % MagickBooleanType MagickDisplayImage(MagickWand *wand,
2321 % const char *server_name)
2323 % A description of each parameter follows:
2325 % o wand: the magick wand.
2327 % o server_name: the X server name.
2330 WandExport MagickBooleanType MagickDisplayImage(MagickWand *wand,
2331 const char *server_name)
2339 assert(wand != (MagickWand *) NULL);
2340 assert(wand->signature == WandSignature);
2341 if (wand->debug != MagickFalse)
2342 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2343 if (wand->images == (Image *) NULL)
2344 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2345 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
2346 if (image == (Image *) NULL)
2347 return(MagickFalse);
2348 (void) CloneString(&wand->image_info->server_name,server_name);
2349 status=DisplayImages(wand->image_info,image,wand->exception);
2350 image=DestroyImage(image);
2355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2359 % M a g i c k D i s p l a y I m a g e s %
2363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2365 % MagickDisplayImages() displays an image or image sequence.
2367 % The format of the MagickDisplayImages method is:
2369 % MagickBooleanType MagickDisplayImages(MagickWand *wand,
2370 % const char *server_name)
2372 % A description of each parameter follows:
2374 % o wand: the magick wand.
2376 % o server_name: the X server name.
2379 WandExport MagickBooleanType MagickDisplayImages(MagickWand *wand,
2380 const char *server_name)
2385 assert(wand != (MagickWand *) NULL);
2386 assert(wand->signature == WandSignature);
2387 if (wand->debug != MagickFalse)
2388 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2389 (void) CloneString(&wand->image_info->server_name,server_name);
2390 status=DisplayImages(wand->image_info,wand->images,wand->exception);
2395 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2399 % M a g i c k D i s t o r t I m a g e %
2403 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2405 % MagickDistortImage() distorts an image using various distortion methods, by
2406 % mapping color lookups of the source image to a new destination image
2407 % usally of the same size as the source image, unless 'bestfit' is set to
2410 % If 'bestfit' is enabled, and distortion allows it, the destination image is
2411 % adjusted to ensure the whole source 'image' will just fit within the final
2412 % destination image, which will be sized and offset accordingly. Also in
2413 % many cases the virtual offset of the source image will be taken into
2414 % account in the mapping.
2416 % The format of the MagickDistortImage method is:
2418 % MagickBooleanType MagickDistortImage(MagickWand *wand,
2419 % const DistortImageMethod method,const size_t number_arguments,
2420 % const double *arguments,const MagickBooleanType bestfit)
2422 % A description of each parameter follows:
2424 % o image: the image to be distorted.
2426 % o method: the method of image distortion.
2428 % ArcDistortion always ignores the source image offset, and always
2429 % 'bestfit' the destination image with the top left corner offset
2430 % relative to the polar mapping center.
2432 % Bilinear has no simple inverse mapping so it does not allow 'bestfit'
2433 % style of image distortion.
2435 % Affine, Perspective, and Bilinear, do least squares fitting of the
2436 % distortion when more than the minimum number of control point pairs
2439 % Perspective, and Bilinear, falls back to a Affine distortion when less
2440 % that 4 control point pairs are provided. While Affine distortions let
2441 % you use any number of control point pairs, that is Zero pairs is a
2442 % no-Op (viewport only) distrotion, one pair is a translation and two
2443 % pairs of control points do a scale-rotate-translate, without any
2446 % o number_arguments: the number of arguments given for this distortion
2449 % o arguments: the arguments for this distortion method.
2451 % o bestfit: Attempt to resize destination to fit distorted source.
2454 WandExport MagickBooleanType MagickDistortImage(MagickWand *wand,
2455 const DistortImageMethod method,const size_t number_arguments,
2456 const double *arguments,const MagickBooleanType bestfit)
2461 assert(wand != (MagickWand *) NULL);
2462 assert(wand->signature == WandSignature);
2463 if (wand->debug != MagickFalse)
2464 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2465 if (wand->images == (Image *) NULL)
2466 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2467 distort_image=DistortImage(wand->images,method,number_arguments,arguments,
2468 bestfit,wand->exception);
2469 if (distort_image == (Image *) NULL)
2470 return(MagickFalse);
2471 ReplaceImageInList(&wand->images,distort_image);
2476 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2480 % M a g i c k D r a w I m a g e %
2484 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2486 % MagickDrawImage() renders the drawing wand on the current image.
2488 % The format of the MagickDrawImage method is:
2490 % MagickBooleanType MagickDrawImage(MagickWand *wand,
2491 % const DrawingWand *drawing_wand)
2493 % A description of each parameter follows:
2495 % o wand: the magick wand.
2497 % o drawing_wand: the draw wand.
2500 WandExport MagickBooleanType MagickDrawImage(MagickWand *wand,
2501 const DrawingWand *drawing_wand)
2512 assert(wand != (MagickWand *) NULL);
2513 assert(wand->signature == WandSignature);
2514 if (wand->debug != MagickFalse)
2515 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2516 if (wand->images == (Image *) NULL)
2517 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2518 draw_info=PeekDrawingWand(drawing_wand);
2519 if ((draw_info == (DrawInfo *) NULL) ||
2520 (draw_info->primitive == (char *) NULL))
2521 return(MagickFalse);
2522 primitive=AcquireString(draw_info->primitive);
2523 draw_info=DestroyDrawInfo(draw_info);
2524 draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
2525 draw_info->primitive=primitive;
2526 status=DrawImage(wand->images,draw_info,wand->exception);
2527 draw_info=DestroyDrawInfo(draw_info);
2532 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2536 % M a g i c k E d g e I m a g e %
2540 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2542 % MagickEdgeImage() enhance edges within the image with a convolution filter
2543 % of the given radius. Use a radius of 0 and Edge() selects a suitable
2546 % The format of the MagickEdgeImage method is:
2548 % MagickBooleanType MagickEdgeImage(MagickWand *wand,const double radius,
2549 % const double sigma)
2551 % A description of each parameter follows:
2553 % o wand: the magick wand.
2555 % o radius: the radius of the pixel neighborhood.
2557 % o sigma: the standard deviation of the Gaussian, in pixels.
2560 WandExport MagickBooleanType MagickEdgeImage(MagickWand *wand,
2561 const double radius,const double sigma)
2566 assert(wand != (MagickWand *) NULL);
2567 assert(wand->signature == WandSignature);
2568 if (wand->debug != MagickFalse)
2569 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2570 if (wand->images == (Image *) NULL)
2571 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2572 edge_image=EdgeImage(wand->images,radius,sigma,wand->exception);
2573 if (edge_image == (Image *) NULL)
2574 return(MagickFalse);
2575 ReplaceImageInList(&wand->images,edge_image);
2580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2584 % M a g i c k E m b o s s I m a g e %
2588 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2590 % MagickEmbossImage() returns a grayscale image with a three-dimensional
2591 % effect. We convolve the image with a Gaussian operator of the given radius
2592 % and standard deviation (sigma). For reasonable results, radius should be
2593 % larger than sigma. Use a radius of 0 and Emboss() selects a suitable
2596 % The format of the MagickEmbossImage method is:
2598 % MagickBooleanType MagickEmbossImage(MagickWand *wand,const double radius,
2599 % const double sigma)
2601 % A description of each parameter follows:
2603 % o wand: the magick wand.
2605 % o radius: the radius of the Gaussian, in pixels, not counting the center
2608 % o sigma: the standard deviation of the Gaussian, in pixels.
2611 WandExport MagickBooleanType MagickEmbossImage(MagickWand *wand,
2612 const double radius,const double sigma)
2617 assert(wand != (MagickWand *) NULL);
2618 assert(wand->signature == WandSignature);
2619 if (wand->debug != MagickFalse)
2620 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2621 if (wand->images == (Image *) NULL)
2622 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2623 emboss_image=EmbossImage(wand->images,radius,sigma,wand->exception);
2624 if (emboss_image == (Image *) NULL)
2625 return(MagickFalse);
2626 ReplaceImageInList(&wand->images,emboss_image);
2631 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2635 % M a g i c k E n c i p h e r I m a g e %
2639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2641 % MagickEncipherImage() converts plaint pixels to cipher pixels.
2643 % The format of the MagickEncipherImage method is:
2645 % MagickBooleanType MagickEncipherImage(MagickWand *wand,
2646 % const char *passphrase)
2648 % A description of each parameter follows:
2650 % o wand: the magick wand.
2652 % o passphrase: the passphrase.
2655 WandExport MagickBooleanType MagickEncipherImage(MagickWand *wand,
2656 const char *passphrase)
2658 assert(wand != (MagickWand *) NULL);
2659 assert(wand->signature == WandSignature);
2660 if (wand->debug != MagickFalse)
2661 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2662 if (wand->images == (Image *) NULL)
2663 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2664 return(EncipherImage(wand->images,passphrase,wand->exception));
2668 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2672 % M a g i c k E n h a n c e I m a g e %
2676 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2678 % MagickEnhanceImage() applies a digital filter that improves the quality of a
2681 % The format of the MagickEnhanceImage method is:
2683 % MagickBooleanType MagickEnhanceImage(MagickWand *wand)
2685 % A description of each parameter follows:
2687 % o wand: the magick wand.
2690 WandExport MagickBooleanType MagickEnhanceImage(MagickWand *wand)
2695 assert(wand != (MagickWand *) NULL);
2696 assert(wand->signature == WandSignature);
2697 if (wand->debug != MagickFalse)
2698 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2699 if (wand->images == (Image *) NULL)
2700 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2701 enhance_image=EnhanceImage(wand->images,wand->exception);
2702 if (enhance_image == (Image *) NULL)
2703 return(MagickFalse);
2704 ReplaceImageInList(&wand->images,enhance_image);
2709 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2713 % M a g i c k E q u a l i z e I m a g e %
2717 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2719 % MagickEqualizeImage() equalizes the image histogram.
2721 % The format of the MagickEqualizeImage method is:
2723 % MagickBooleanType MagickEqualizeImage(MagickWand *wand)
2725 % A description of each parameter follows:
2727 % o wand: the magick wand.
2729 % o channel: the image channel(s).
2732 WandExport MagickBooleanType MagickEqualizeImage(MagickWand *wand)
2737 assert(wand != (MagickWand *) NULL);
2738 assert(wand->signature == WandSignature);
2739 if (wand->debug != MagickFalse)
2740 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2741 if (wand->images == (Image *) NULL)
2742 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2743 status=EqualizeImage(wand->images,wand->exception);
2748 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2752 % M a g i c k E v a l u a t e I m a g e %
2756 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2758 % MagickEvaluateImage() applys an arithmetic, relational, or logical
2759 % expression to an image. Use these operators to lighten or darken an image,
2760 % to increase or decrease contrast in an image, or to produce the "negative"
2763 % The format of the MagickEvaluateImage method is:
2765 % MagickBooleanType MagickEvaluateImage(MagickWand *wand,
2766 % const MagickEvaluateOperator operator,const double value)
2767 % MagickBooleanType MagickEvaluateImages(MagickWand *wand,
2768 % const MagickEvaluateOperator operator)
2770 % A description of each parameter follows:
2772 % o wand: the magick wand.
2774 % o op: A channel operator.
2776 % o value: A value value.
2780 WandExport MagickWand *MagickEvaluateImages(MagickWand *wand,
2781 const MagickEvaluateOperator op)
2786 assert(wand != (MagickWand *) NULL);
2787 assert(wand->signature == WandSignature);
2788 if (wand->debug != MagickFalse)
2789 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2790 if (wand->images == (Image *) NULL)
2791 return((MagickWand *) NULL);
2792 evaluate_image=EvaluateImages(wand->images,op,wand->exception);
2793 if (evaluate_image == (Image *) NULL)
2794 return((MagickWand *) NULL);
2795 return(CloneMagickWandFromImages(wand,evaluate_image));
2798 WandExport MagickBooleanType MagickEvaluateImage(MagickWand *wand,
2799 const MagickEvaluateOperator op,const double value)
2804 assert(wand != (MagickWand *) NULL);
2805 assert(wand->signature == WandSignature);
2806 if (wand->debug != MagickFalse)
2807 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2808 if (wand->images == (Image *) NULL)
2809 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2810 status=EvaluateImage(wand->images,op,value,wand->exception);
2815 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2819 % M a g i c k E x p o r t I m a g e P i x e l s %
2823 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2825 % MagickExportImagePixels() extracts pixel data from an image and returns it
2826 % to you. The method returns MagickTrue on success otherwise MagickFalse if
2827 % an error is encountered. The data is returned as char, short int, int,
2828 % ssize_t, float, or double in the order specified by map.
2830 % Suppose you want to extract the first scanline of a 640x480 image as
2831 % character data in red-green-blue order:
2833 % MagickExportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
2835 % The format of the MagickExportImagePixels method is:
2837 % MagickBooleanType MagickExportImagePixels(MagickWand *wand,
2838 % const ssize_t x,const ssize_t y,const size_t columns,
2839 % const size_t rows,const char *map,const StorageType storage,
2842 % A description of each parameter follows:
2844 % o wand: the magick wand.
2846 % o x, y, columns, rows: These values define the perimeter
2847 % of a region of pixels you want to extract.
2849 % o map: This string reflects the expected ordering of the pixel array.
2850 % It can be any combination or order of R = red, G = green, B = blue,
2851 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
2852 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
2855 % o storage: Define the data type of the pixels. Float and double types are
2856 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
2857 % these types: CharPixel, DoublePixel, FloatPixel, IntegerPixel,
2858 % LongPixel, QuantumPixel, or ShortPixel.
2860 % o pixels: This array of values contain the pixel components as defined by
2861 % map and type. You must preallocate this array where the expected
2862 % length varies depending on the values of width, height, map, and type.
2865 WandExport MagickBooleanType MagickExportImagePixels(MagickWand *wand,
2866 const ssize_t x,const ssize_t y,const size_t columns,
2867 const size_t rows,const char *map,const StorageType storage,
2873 assert(wand != (MagickWand *) NULL);
2874 assert(wand->signature == WandSignature);
2875 if (wand->debug != MagickFalse)
2876 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2877 if (wand->images == (Image *) NULL)
2878 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2879 status=ExportImagePixels(wand->images,x,y,columns,rows,map,
2880 storage,pixels,wand->exception);
2885 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2889 % M a g i c k E x t e n t I m a g e %
2893 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2895 % MagickExtentImage() extends the image as defined by the geometry, gravity,
2896 % and wand background color. Set the (x,y) offset of the geometry to move
2897 % the original wand relative to the extended wand.
2899 % The format of the MagickExtentImage method is:
2901 % MagickBooleanType MagickExtentImage(MagickWand *wand,
2902 % const size_t width,const size_t height,const ssize_t x,
2905 % A description of each parameter follows:
2907 % o wand: the magick wand.
2909 % o width: the region width.
2911 % o height: the region height.
2913 % o x: the region x offset.
2915 % o y: the region y offset.
2918 WandExport MagickBooleanType MagickExtentImage(MagickWand *wand,
2919 const size_t width,const size_t height,const ssize_t x,
2928 assert(wand != (MagickWand *) NULL);
2929 assert(wand->signature == WandSignature);
2930 if (wand->debug != MagickFalse)
2931 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2932 if (wand->images == (Image *) NULL)
2933 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2935 extent.height=height;
2938 extent_image=ExtentImage(wand->images,&extent,wand->exception);
2939 if (extent_image == (Image *) NULL)
2940 return(MagickFalse);
2941 ReplaceImageInList(&wand->images,extent_image);
2946 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2950 % M a g i c k F l i p I m a g e %
2954 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2956 % MagickFlipImage() creates a vertical mirror image by reflecting the pixels
2957 % around the central x-axis.
2959 % The format of the MagickFlipImage method is:
2961 % MagickBooleanType MagickFlipImage(MagickWand *wand)
2963 % A description of each parameter follows:
2965 % o wand: the magick wand.
2968 WandExport MagickBooleanType MagickFlipImage(MagickWand *wand)
2973 assert(wand != (MagickWand *) NULL);
2974 assert(wand->signature == WandSignature);
2975 if (wand->debug != MagickFalse)
2976 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2977 if (wand->images == (Image *) NULL)
2978 ThrowWandException(WandError,"ContainsNoImages",wand->name);
2979 flip_image=FlipImage(wand->images,wand->exception);
2980 if (flip_image == (Image *) NULL)
2981 return(MagickFalse);
2982 ReplaceImageInList(&wand->images,flip_image);
2987 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2991 % 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 %
2995 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2997 % MagickFloodfillPaintImage() changes the color value of any pixel that matches
2998 % target and is an immediate neighbor. If the method FillToBorderMethod is
2999 % specified, the color value is changed for any neighbor pixel that does not
3000 % match the bordercolor member of image.
3002 % The format of the MagickFloodfillPaintImage method is:
3004 % MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
3005 % const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
3006 % const ssize_t x,const ssize_t y,const MagickBooleanType invert)
3008 % A description of each parameter follows:
3010 % o wand: the magick wand.
3012 % o fill: the floodfill color pixel wand.
3014 % o fuzz: By default target must match a particular pixel color
3015 % exactly. However, in many cases two colors may differ by a small amount.
3016 % The fuzz member of image defines how much tolerance is acceptable to
3017 % consider two colors as the same. For example, set fuzz to 10 and the
3018 % color red at intensities of 100 and 102 respectively are now interpreted
3019 % as the same color for the purposes of the floodfill.
3021 % o bordercolor: the border color pixel wand.
3023 % o x,y: the starting location of the operation.
3025 % o invert: paint any pixel that does not match the target color.
3028 WandExport MagickBooleanType MagickFloodfillPaintImage(MagickWand *wand,
3029 const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
3030 const ssize_t x,const ssize_t y,const MagickBooleanType invert)
3041 assert(wand != (MagickWand *) NULL);
3042 assert(wand->signature == WandSignature);
3043 if (wand->debug != MagickFalse)
3044 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3045 if (wand->images == (Image *) NULL)
3046 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3047 draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
3048 PixelGetQuantumPacket(fill,&draw_info->fill);
3049 (void) GetOneVirtualMagickPixel(wand->images,TileVirtualPixelMethod,x %
3050 wand->images->columns,y % wand->images->rows,&target,wand->exception);
3051 if (bordercolor != (PixelWand *) NULL)
3052 PixelGetMagickColor(bordercolor,&target);
3053 wand->images->fuzz=fuzz;
3054 status=FloodfillPaintImage(wand->images,draw_info,&target,x,y,invert,
3056 draw_info=DestroyDrawInfo(draw_info);
3061 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3065 % M a g i c k F l o p I m a g e %
3069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3071 % MagickFlopImage() creates a horizontal mirror image by reflecting the pixels
3072 % around the central y-axis.
3074 % The format of the MagickFlopImage method is:
3076 % MagickBooleanType MagickFlopImage(MagickWand *wand)
3078 % A description of each parameter follows:
3080 % o wand: the magick wand.
3083 WandExport MagickBooleanType MagickFlopImage(MagickWand *wand)
3088 assert(wand != (MagickWand *) NULL);
3089 assert(wand->signature == WandSignature);
3090 if (wand->debug != MagickFalse)
3091 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3092 if (wand->images == (Image *) NULL)
3093 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3094 flop_image=FlopImage(wand->images,wand->exception);
3095 if (flop_image == (Image *) NULL)
3096 return(MagickFalse);
3097 ReplaceImageInList(&wand->images,flop_image);
3102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3106 % 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 %
3110 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3112 % MagickForwardFourierTransformImage() implements the discrete Fourier
3113 % transform (DFT) of the image either as a magnitude / phase or real /
3114 % imaginary image pair.
3116 % The format of the MagickForwardFourierTransformImage method is:
3118 % MagickBooleanType MagickForwardFourierTransformImage(MagickWand *wand,
3119 % const MagickBooleanType magnitude)
3121 % A description of each parameter follows:
3123 % o wand: the magick wand.
3125 % o magnitude: if true, return as magnitude / phase pair otherwise a real /
3126 % imaginary image pair.
3129 WandExport MagickBooleanType MagickForwardFourierTransformImage(
3130 MagickWand *wand,const MagickBooleanType magnitude)
3135 assert(wand != (MagickWand *) NULL);
3136 assert(wand->signature == WandSignature);
3137 if (wand->debug != MagickFalse)
3138 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3139 if (wand->images == (Image *) NULL)
3140 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3141 forward_image=ForwardFourierTransformImage(wand->images,magnitude,
3143 if (forward_image == (Image *) NULL)
3144 return(MagickFalse);
3145 ReplaceImageInList(&wand->images,forward_image);
3150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3154 % M a g i c k F r a m e I m a g e %
3158 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3160 % MagickFrameImage() adds a simulated three-dimensional border around the
3161 % image. The width and height specify the border width of the vertical and
3162 % horizontal sides of the frame. The inner and outer bevels indicate the
3163 % width of the inner and outer shadows of the frame.
3165 % The format of the MagickFrameImage method is:
3167 % MagickBooleanType MagickFrameImage(MagickWand *wand,
3168 % const PixelWand *matte_color,const size_t width,
3169 % const size_t height,const ssize_t inner_bevel,
3170 % const ssize_t outer_bevel,const CompositeOperator compose)
3172 % A description of each parameter follows:
3174 % o wand: the magick wand.
3176 % o matte_color: the frame color pixel wand.
3178 % o width: the border width.
3180 % o height: the border height.
3182 % o inner_bevel: the inner bevel width.
3184 % o outer_bevel: the outer bevel width.
3186 % o compose: the composite operator.
3189 WandExport MagickBooleanType MagickFrameImage(MagickWand *wand,
3190 const PixelWand *matte_color,const size_t width,const size_t height,
3191 const ssize_t inner_bevel,const ssize_t outer_bevel,
3192 const CompositeOperator compose)
3200 assert(wand != (MagickWand *) NULL);
3201 assert(wand->signature == WandSignature);
3202 if (wand->debug != MagickFalse)
3203 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3204 if (wand->images == (Image *) NULL)
3205 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3206 (void) ResetMagickMemory(&frame_info,0,sizeof(frame_info));
3207 frame_info.width=wand->images->columns+2*width;
3208 frame_info.height=wand->images->rows+2*height;
3209 frame_info.x=(ssize_t) width;
3210 frame_info.y=(ssize_t) height;
3211 frame_info.inner_bevel=inner_bevel;
3212 frame_info.outer_bevel=outer_bevel;
3213 PixelGetQuantumPacket(matte_color,&wand->images->matte_color);
3214 frame_image=FrameImage(wand->images,&frame_info,compose,wand->exception);
3215 if (frame_image == (Image *) NULL)
3216 return(MagickFalse);
3217 ReplaceImageInList(&wand->images,frame_image);
3222 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3226 % M a g i c k F u n c t i o n I m a g e %
3230 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3232 % MagickFunctionImage() applys an arithmetic, relational, or logical
3233 % expression to an image. Use these operators to lighten or darken an image,
3234 % to increase or decrease contrast in an image, or to produce the "negative"
3237 % The format of the MagickFunctionImage method is:
3239 % MagickBooleanType MagickFunctionImage(MagickWand *wand,
3240 % const MagickFunction function,const size_t number_arguments,
3241 % const double *arguments)
3243 % A description of each parameter follows:
3245 % o wand: the magick wand.
3247 % o function: the image function.
3249 % o number_arguments: the number of function arguments.
3251 % o arguments: the function arguments.
3254 WandExport MagickBooleanType MagickFunctionImage(MagickWand *wand,
3255 const MagickFunction function,const size_t number_arguments,
3256 const double *arguments)
3261 assert(wand != (MagickWand *) NULL);
3262 assert(wand->signature == WandSignature);
3263 if (wand->debug != MagickFalse)
3264 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3265 if (wand->images == (Image *) NULL)
3266 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3267 status=FunctionImage(wand->images,function,number_arguments,arguments,
3273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3277 % M a g i c k F x I m a g e %
3281 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3283 % MagickFxImage() evaluate expression for each pixel in the image.
3285 % The format of the MagickFxImage method is:
3287 % MagickWand *MagickFxImage(MagickWand *wand,const char *expression)
3289 % A description of each parameter follows:
3291 % o wand: the magick wand.
3293 % o expression: the expression.
3296 WandExport MagickWand *MagickFxImage(MagickWand *wand,const char *expression)
3301 assert(wand != (MagickWand *) NULL);
3302 assert(wand->signature == WandSignature);
3303 if (wand->debug != MagickFalse)
3304 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3305 if (wand->images == (Image *) NULL)
3306 return((MagickWand *) NULL);
3307 fx_image=FxImage(wand->images,expression,wand->exception);
3308 if (fx_image == (Image *) NULL)
3309 return((MagickWand *) NULL);
3310 return(CloneMagickWandFromImages(wand,fx_image));
3314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3318 % M a g i c k G a m m a I m a g e %
3322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3324 % MagickGammaImage() gamma-corrects an image. The same image viewed on
3325 % different devices will have perceptual differences in the way the image's
3326 % intensities are represented on the screen. Specify individual gamma levels
3327 % for the red, green, and blue channels, or adjust all three with the gamma
3328 % parameter. Values typically range from 0.8 to 2.3.
3330 % You can also reduce the influence of a particular channel with a gamma
3333 % The format of the MagickGammaImage method is:
3335 % MagickBooleanType MagickGammaImage(MagickWand *wand,const double gamma)
3337 % A description of each parameter follows:
3339 % o wand: the magick wand.
3341 % o level: Define the level of gamma correction.
3344 WandExport MagickBooleanType MagickGammaImage(MagickWand *wand,
3350 assert(wand != (MagickWand *) NULL);
3351 assert(wand->signature == WandSignature);
3352 if (wand->debug != MagickFalse)
3353 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3354 if (wand->images == (Image *) NULL)
3355 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3356 status=GammaImage(wand->images,gamma,wand->exception);
3361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3365 % M a g i c k G a u s s i a n B l u r I m a g e %
3369 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3371 % MagickGaussianBlurImage() blurs an image. We convolve the image with a
3372 % Gaussian operator of the given radius and standard deviation (sigma).
3373 % For reasonable results, the radius should be larger than sigma. Use a
3374 % radius of 0 and MagickGaussianBlurImage() selects a suitable radius for you.
3376 % The format of the MagickGaussianBlurImage method is:
3378 % MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
3379 % const double radius,const double sigma,const double bias)
3381 % A description of each parameter follows:
3383 % o wand: the magick wand.
3385 % o radius: the radius of the Gaussian, in pixels, not counting the center
3388 % o sigma: the standard deviation of the Gaussian, in pixels.
3393 WandExport MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
3394 const double radius,const double sigma,const double bias)
3399 assert(wand != (MagickWand *) NULL);
3400 assert(wand->signature == WandSignature);
3401 if (wand->debug != MagickFalse)
3402 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3403 if (wand->images == (Image *) NULL)
3404 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3405 blur_image=GaussianBlurImage(wand->images,radius,sigma,bias,wand->exception);
3406 if (blur_image == (Image *) NULL)
3407 return(MagickFalse);
3408 ReplaceImageInList(&wand->images,blur_image);
3413 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3417 % M a g i c k G e t I m a g e %
3421 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3423 % MagickGetImage() gets the image at the current image index.
3425 % The format of the MagickGetImage method is:
3427 % MagickWand *MagickGetImage(MagickWand *wand)
3429 % A description of each parameter follows:
3431 % o wand: the magick wand.
3434 WandExport MagickWand *MagickGetImage(MagickWand *wand)
3439 assert(wand != (MagickWand *) NULL);
3440 assert(wand->signature == WandSignature);
3441 if (wand->debug != MagickFalse)
3442 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3443 if (wand->images == (Image *) NULL)
3445 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3446 "ContainsNoImages","`%s'",wand->name);
3447 return((MagickWand *) NULL);
3449 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
3450 if (image == (Image *) NULL)
3451 return((MagickWand *) NULL);
3452 return(CloneMagickWandFromImages(wand,image));
3456 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3460 % 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 %
3464 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3466 % MagickGetImageAlphaChannel() returns MagickFalse if the image alpha channel
3467 % is not activated. That is, the image is RGB rather than RGBA or CMYK rather
3470 % The format of the MagickGetImageAlphaChannel method is:
3472 % size_t MagickGetImageAlphaChannel(MagickWand *wand)
3474 % A description of each parameter follows:
3476 % o wand: the magick wand.
3479 WandExport MagickBooleanType MagickGetImageAlphaChannel(MagickWand *wand)
3481 assert(wand != (MagickWand *) NULL);
3482 assert(wand->signature == WandSignature);
3483 if (wand->debug != MagickFalse)
3484 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3485 if (wand->images == (Image *) NULL)
3486 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3487 return(GetImageAlphaChannel(wand->images));
3491 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3495 % M a g i c k G e t I m a g e C l i p M a s k %
3499 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3501 % MagickGetImageClipMask() gets the image clip mask at the current image index.
3503 % The format of the MagickGetImageClipMask method is:
3505 % MagickWand *MagickGetImageClipMask(MagickWand *wand)
3507 % A description of each parameter follows:
3509 % o wand: the magick wand.
3512 WandExport MagickWand *MagickGetImageClipMask(MagickWand *wand)
3517 assert(wand != (MagickWand *) NULL);
3518 assert(wand->signature == WandSignature);
3519 if (wand->debug != MagickFalse)
3520 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3521 if (wand->images == (Image *) NULL)
3523 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3524 "ContainsNoImages","`%s'",wand->name);
3525 return((MagickWand *) NULL);
3527 image=GetImageClipMask(wand->images,wand->exception);
3528 if (image == (Image *) NULL)
3529 return((MagickWand *) NULL);
3530 return(CloneMagickWandFromImages(wand,image));
3534 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3538 % 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 %
3542 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3544 % MagickGetImageBackgroundColor() returns the image background color.
3546 % The format of the MagickGetImageBackgroundColor method is:
3548 % MagickBooleanType MagickGetImageBackgroundColor(MagickWand *wand,
3549 % PixelWand *background_color)
3551 % A description of each parameter follows:
3553 % o wand: the magick wand.
3555 % o background_color: Return the background color.
3558 WandExport MagickBooleanType MagickGetImageBackgroundColor(MagickWand *wand,
3559 PixelWand *background_color)
3561 assert(wand != (MagickWand *) NULL);
3562 assert(wand->signature == WandSignature);
3563 if (wand->debug != MagickFalse)
3564 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3565 if (wand->images == (Image *) NULL)
3566 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3567 PixelSetQuantumPacket(background_color,&wand->images->background_color);
3572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3576 % M a g i c k G e t I m a g e B l o b %
3580 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3582 % MagickGetImageBlob() implements direct to memory image formats. It returns
3583 % the image as a blob (a formatted "file" in memory) and its length, starting
3584 % from the current position in the image sequence. Use MagickSetImageFormat()
3585 % to set the format to write to the blob (GIF, JPEG, PNG, etc.).
3587 % Utilize MagickResetIterator() to ensure the write is from the beginning of
3588 % the image sequence.
3590 % Use MagickRelinquishMemory() to free the blob when you are done with it.
3592 % The format of the MagickGetImageBlob method is:
3594 % unsigned char *MagickGetImageBlob(MagickWand *wand,size_t *length)
3596 % A description of each parameter follows:
3598 % o wand: the magick wand.
3600 % o length: the length of the blob.
3603 WandExport unsigned char *MagickGetImageBlob(MagickWand *wand,size_t *length)
3605 assert(wand != (MagickWand *) NULL);
3606 assert(wand->signature == WandSignature);
3607 if (wand->debug != MagickFalse)
3608 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3609 if (wand->images == (Image *) NULL)
3611 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3612 "ContainsNoImages","`%s'",wand->name);
3613 return((unsigned char *) NULL);
3615 return(ImageToBlob(wand->image_info,wand->images,length,wand->exception));
3619 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3623 % M a g i c k G e t I m a g e s B l o b %
3627 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3629 % MagickGetImageBlob() implements direct to memory image formats. It
3630 % returns the image sequence as a blob and its length. The format of the image
3631 % determines the format of the returned blob (GIF, JPEG, PNG, etc.). To
3632 % return a different image format, use MagickSetImageFormat().
3634 % Note, some image formats do not permit multiple images to the same image
3635 % stream (e.g. JPEG). in this instance, just the first image of the
3636 % sequence is returned as a blob.
3638 % The format of the MagickGetImagesBlob method is:
3640 % unsigned char *MagickGetImagesBlob(MagickWand *wand,size_t *length)
3642 % A description of each parameter follows:
3644 % o wand: the magick wand.
3646 % o length: the length of the blob.
3649 WandExport unsigned char *MagickGetImagesBlob(MagickWand *wand,size_t *length)
3654 assert(wand != (MagickWand *) NULL);
3655 assert(wand->signature == WandSignature);
3656 if (wand->debug != MagickFalse)
3657 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3658 if (wand->images == (Image *) NULL)
3660 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3661 "ContainsNoImages","`%s'",wand->name);
3662 return((unsigned char *) NULL);
3664 blob=ImagesToBlob(wand->image_info,GetFirstImageInList(wand->images),length,
3670 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3674 % 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 %
3678 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3680 % MagickGetImageBluePrimary() returns the chromaticy blue primary point for the
3683 % The format of the MagickGetImageBluePrimary method is:
3685 % MagickBooleanType MagickGetImageBluePrimary(MagickWand *wand,double *x,
3688 % A description of each parameter follows:
3690 % o wand: the magick wand.
3692 % o x: the chromaticity blue primary x-point.
3694 % o y: the chromaticity blue primary y-point.
3697 WandExport MagickBooleanType MagickGetImageBluePrimary(MagickWand *wand,
3698 double *x,double *y)
3700 assert(wand != (MagickWand *) NULL);
3701 assert(wand->signature == WandSignature);
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 *x=wand->images->chromaticity.blue_primary.x;
3707 *y=wand->images->chromaticity.blue_primary.y;
3712 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3716 % 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 %
3720 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3722 % MagickGetImageBorderColor() returns the image border color.
3724 % The format of the MagickGetImageBorderColor method is:
3726 % MagickBooleanType MagickGetImageBorderColor(MagickWand *wand,
3727 % PixelWand *border_color)
3729 % A description of each parameter follows:
3731 % o wand: the magick wand.
3733 % o border_color: Return the border color.
3736 WandExport MagickBooleanType MagickGetImageBorderColor(MagickWand *wand,
3737 PixelWand *border_color)
3739 assert(wand != (MagickWand *) NULL);
3740 assert(wand->signature == WandSignature);
3741 if (wand->debug != MagickFalse)
3742 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3743 if (wand->images == (Image *) NULL)
3744 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3745 PixelSetQuantumPacket(border_color,&wand->images->border_color);
3750 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3754 % M a g i c k G e t I m a g e F e a t u r e s %
3758 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3760 % MagickGetImageFeatures() returns features for each channel in the
3761 % image in each of four directions (horizontal, vertical, left and right
3762 % diagonals) for the specified distance. The features include the angular
3763 % second moment, contrast, correlation, sum of squares: variance, inverse
3764 % difference moment, sum average, sum varience, sum entropy, entropy,
3765 % difference variance, difference entropy, information measures of
3766 % correlation 1, information measures of correlation 2, and maximum
3767 % correlation coefficient. You can access the red channel contrast, for
3768 % example, like this:
3770 % channel_features=MagickGetImageFeatures(wand,1);
3771 % contrast=channel_features[RedPixelChannel].contrast[0];
3773 % Use MagickRelinquishMemory() to free the statistics buffer.
3775 % The format of the MagickGetImageFeatures method is:
3777 % ChannelFeatures *MagickGetImageFeatures(MagickWand *wand,
3778 % const size_t distance)
3780 % A description of each parameter follows:
3782 % o wand: the magick wand.
3784 % o distance: the distance.
3787 WandExport ChannelFeatures *MagickGetImageFeatures(MagickWand *wand,
3788 const size_t distance)
3790 assert(wand != (MagickWand *) NULL);
3791 assert(wand->signature == WandSignature);
3792 if (wand->debug != MagickFalse)
3793 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3794 if (wand->images == (Image *) NULL)
3796 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3797 "ContainsNoImages","`%s'",wand->name);
3798 return((ChannelFeatures *) NULL);
3800 return(GetImageFeatures(wand->images,distance,wand->exception));
3804 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3808 % M a g i c k G e t I m a g e K u r t o s i s %
3812 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3814 % MagickGetImageKurtosis() gets the kurtosis and skewness of one or
3815 % more image channels.
3817 % The format of the MagickGetImageKurtosis method is:
3819 % MagickBooleanType MagickGetImageKurtosis(MagickWand *wand,
3820 % double *kurtosis,double *skewness)
3822 % A description of each parameter follows:
3824 % o wand: the magick wand.
3826 % o kurtosis: The kurtosis for the specified channel(s).
3828 % o skewness: The skewness for the specified channel(s).
3831 WandExport MagickBooleanType MagickGetImageKurtosis(MagickWand *wand,
3832 double *kurtosis,double *skewness)
3837 assert(wand != (MagickWand *) NULL);
3838 assert(wand->signature == WandSignature);
3839 if (wand->debug != MagickFalse)
3840 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3841 if (wand->images == (Image *) NULL)
3842 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3843 status=GetImageKurtosis(wand->images,kurtosis,skewness,wand->exception);
3848 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3852 % M a g i c k G e t I m a g e M e a n %
3856 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3858 % MagickGetImageMean() gets the mean and standard deviation of one or more
3861 % The format of the MagickGetImageMean method is:
3863 % MagickBooleanType MagickGetImageMean(MagickWand *wand,double *mean,
3864 % double *standard_deviation)
3866 % A description of each parameter follows:
3868 % o wand: the magick wand.
3870 % o channel: the image channel(s).
3872 % o mean: The mean pixel value for the specified channel(s).
3874 % o standard_deviation: The standard deviation for the specified channel(s).
3877 WandExport MagickBooleanType MagickGetImageMean(MagickWand *wand,double *mean,
3878 double *standard_deviation)
3883 assert(wand != (MagickWand *) NULL);
3884 assert(wand->signature == WandSignature);
3885 if (wand->debug != MagickFalse)
3886 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3887 if (wand->images == (Image *) NULL)
3888 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3889 status=GetImageMean(wand->images,mean,standard_deviation,wand->exception);
3894 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3898 % M a g i c k G e t I m a g e R a n g e %
3902 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3904 % MagickGetImageRange() gets the range for one or more image channels.
3906 % The format of the MagickGetImageRange method is:
3908 % MagickBooleanType MagickGetImageRange(MagickWand *wand,double *minima,
3911 % A description of each parameter follows:
3913 % o wand: the magick wand.
3915 % o minima: The minimum pixel value for the specified channel(s).
3917 % o maxima: The maximum pixel value for the specified channel(s).
3920 WandExport MagickBooleanType MagickGetImageRange(MagickWand *wand,
3921 double *minima,double *maxima)
3926 assert(wand != (MagickWand *) NULL);
3927 assert(wand->signature == WandSignature);
3928 if (wand->debug != MagickFalse)
3929 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3930 if (wand->images == (Image *) NULL)
3931 ThrowWandException(WandError,"ContainsNoImages",wand->name);
3932 status=GetImageRange(wand->images,minima,maxima,wand->exception);
3937 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3941 % M a g i c k G e t I m a g e S t a t i s t i c s %
3945 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3947 % MagickGetImageStatistics() returns statistics for each channel in the
3948 % image. The statistics include the channel depth, its minima and
3949 % maxima, the mean, the standard deviation, the kurtosis and the skewness.
3950 % You can access the red channel mean, for example, like this:
3952 % channel_statistics=MagickGetImageStatistics(wand);
3953 % red_mean=channel_statistics[RedPixelChannel].mean;
3955 % Use MagickRelinquishMemory() to free the statistics buffer.
3957 % The format of the MagickGetImageStatistics method is:
3959 % ChannelStatistics *MagickGetImageStatistics(MagickWand *wand)
3961 % A description of each parameter follows:
3963 % o wand: the magick wand.
3966 WandExport ChannelStatistics *MagickGetImageStatistics(MagickWand *wand)
3968 assert(wand != (MagickWand *) NULL);
3969 assert(wand->signature == WandSignature);
3970 if (wand->debug != MagickFalse)
3971 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
3972 if (wand->images == (Image *) NULL)
3974 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
3975 "ContainsNoImages","`%s'",wand->name);
3976 return((ChannelStatistics *) NULL);
3978 return(GetImageStatistics(wand->images,wand->exception));
3982 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3986 % 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 %
3990 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3992 % MagickGetImageColormapColor() returns the color of the specified colormap
3995 % The format of the MagickGetImageColormapColor method is:
3997 % MagickBooleanType MagickGetImageColormapColor(MagickWand *wand,
3998 % const size_t index,PixelWand *color)
4000 % A description of each parameter follows:
4002 % o wand: the magick wand.
4004 % o index: the offset into the image colormap.
4006 % o color: Return the colormap color in this wand.
4009 WandExport MagickBooleanType MagickGetImageColormapColor(MagickWand *wand,
4010 const size_t index,PixelWand *color)
4012 assert(wand != (MagickWand *) NULL);
4013 assert(wand->signature == WandSignature);
4014 if (wand->debug != MagickFalse)
4015 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4016 if (wand->images == (Image *) NULL)
4017 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4018 if ((wand->images->colormap == (PixelInfo *) NULL) ||
4019 (index >= wand->images->colors))
4021 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4022 "InvalidColormapIndex","`%s'",wand->name);
4023 return(MagickFalse);
4025 PixelSetQuantumPacket(color,wand->images->colormap+index);
4030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4034 % M a g i c k G e t I m a g e C o l o r s %
4038 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4040 % MagickGetImageColors() gets the number of unique colors in the image.
4042 % The format of the MagickGetImageColors method is:
4044 % size_t MagickGetImageColors(MagickWand *wand)
4046 % A description of each parameter follows:
4048 % o wand: the magick wand.
4051 WandExport size_t MagickGetImageColors(MagickWand *wand)
4053 assert(wand != (MagickWand *) NULL);
4054 assert(wand->signature == WandSignature);
4055 if (wand->debug != MagickFalse)
4056 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4057 if (wand->images == (Image *) NULL)
4059 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4060 "ContainsNoImages","`%s'",wand->name);
4063 return(GetNumberColors(wand->images,(FILE *) NULL,wand->exception));
4067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4071 % M a g i c k G e t I m a g e C o l o r s p a c e %
4075 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4077 % MagickGetImageColorspace() gets the image colorspace.
4079 % The format of the MagickGetImageColorspace method is:
4081 % ColorspaceType MagickGetImageColorspace(MagickWand *wand)
4083 % A description of each parameter follows:
4085 % o wand: the magick wand.
4088 WandExport ColorspaceType MagickGetImageColorspace(MagickWand *wand)
4090 assert(wand != (MagickWand *) NULL);
4091 assert(wand->signature == WandSignature);
4092 if (wand->debug != MagickFalse)
4093 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4094 if (wand->images == (Image *) NULL)
4096 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4097 "ContainsNoImages","`%s'",wand->name);
4098 return(UndefinedColorspace);
4100 return(wand->images->colorspace);
4104 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4108 % M a g i c k G e t I m a g e C o m p o s e %
4112 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4114 % MagickGetImageCompose() returns the composite operator associated with the
4117 % The format of the MagickGetImageCompose method is:
4119 % CompositeOperator MagickGetImageCompose(MagickWand *wand)
4121 % A description of each parameter follows:
4123 % o wand: the magick wand.
4126 WandExport CompositeOperator MagickGetImageCompose(MagickWand *wand)
4128 assert(wand != (MagickWand *) NULL);
4129 assert(wand->signature == WandSignature);
4130 if (wand->debug != MagickFalse)
4131 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4132 if (wand->images == (Image *) NULL)
4134 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4135 "ContainsNoImages","`%s'",wand->name);
4136 return(UndefinedCompositeOp);
4138 return(wand->images->compose);
4142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4146 % 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 %
4150 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4152 % MagickGetImageCompression() gets the image compression.
4154 % The format of the MagickGetImageCompression method is:
4156 % CompressionType MagickGetImageCompression(MagickWand *wand)
4158 % A description of each parameter follows:
4160 % o wand: the magick wand.
4163 WandExport CompressionType MagickGetImageCompression(MagickWand *wand)
4165 assert(wand != (MagickWand *) NULL);
4166 assert(wand->signature == WandSignature);
4167 if (wand->debug != MagickFalse)
4168 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4169 if (wand->images == (Image *) NULL)
4171 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4172 "ContainsNoImages","`%s'",wand->name);
4173 return(UndefinedCompression);
4175 return(wand->images->compression);
4179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4183 % 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 %
4187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4189 % MagickGetImageCompression() gets the image compression quality.
4191 % The format of the MagickGetImageCompression method is:
4193 % size_t MagickGetImageCompression(MagickWand *wand)
4195 % A description of each parameter follows:
4197 % o wand: the magick wand.
4200 WandExport size_t MagickGetImageCompressionQuality(MagickWand *wand)
4202 assert(wand != (MagickWand *) NULL);
4203 assert(wand->signature == WandSignature);
4204 if (wand->debug != MagickFalse)
4205 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4206 if (wand->images == (Image *) NULL)
4208 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4209 "ContainsNoImages","`%s'",wand->name);
4212 return(wand->images->quality);
4216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4220 % M a g i c k G e t I m a g e D e l a y %
4224 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4226 % MagickGetImageDelay() gets the image delay.
4228 % The format of the MagickGetImageDelay method is:
4230 % size_t MagickGetImageDelay(MagickWand *wand)
4232 % A description of each parameter follows:
4234 % o wand: the magick wand.
4237 WandExport size_t MagickGetImageDelay(MagickWand *wand)
4239 assert(wand != (MagickWand *) NULL);
4240 assert(wand->signature == WandSignature);
4241 if (wand->debug != MagickFalse)
4242 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4243 if (wand->images == (Image *) NULL)
4244 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4245 return(wand->images->delay);
4249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4253 % M a g i c k G e t I m a g e D e p t h %
4257 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4259 % MagickGetImageDepth() gets the image depth.
4261 % The format of the MagickGetImageDepth method is:
4263 % size_t MagickGetImageDepth(MagickWand *wand)
4265 % A description of each parameter follows:
4267 % o wand: the magick wand.
4270 WandExport size_t MagickGetImageDepth(MagickWand *wand)
4272 assert(wand != (MagickWand *) NULL);
4273 assert(wand->signature == WandSignature);
4274 if (wand->debug != MagickFalse)
4275 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4276 if (wand->images == (Image *) NULL)
4277 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4278 return(GetImageDepth(wand->images,wand->exception));
4282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4286 % M a g i c k G e t I m a g e D i s p o s e %
4290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4292 % MagickGetImageDispose() gets the image disposal method.
4294 % The format of the MagickGetImageDispose method is:
4296 % DisposeType MagickGetImageDispose(MagickWand *wand)
4298 % A description of each parameter follows:
4300 % o wand: the magick wand.
4303 WandExport DisposeType MagickGetImageDispose(MagickWand *wand)
4305 assert(wand != (MagickWand *) NULL);
4306 assert(wand->signature == WandSignature);
4307 if (wand->debug != MagickFalse)
4308 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4309 if (wand->images == (Image *) NULL)
4311 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4312 "ContainsNoImages","`%s'",wand->name);
4313 return(UndefinedDispose);
4315 return((DisposeType) wand->images->dispose);
4319 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4323 % M a g i c k G e t I m a g e D i s t o r t i o n %
4327 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4329 % MagickGetImageDistortion() compares an image to a reconstructed image and
4330 % returns the specified distortion metric.
4332 % The format of the MagickGetImageDistortion method is:
4334 % MagickBooleanType MagickGetImageDistortion(MagickWand *wand,
4335 % const MagickWand *reference,const MetricType metric,
4336 % double *distortion)
4338 % A description of each parameter follows:
4340 % o wand: the magick wand.
4342 % o reference: the reference wand.
4344 % o metric: the metric.
4346 % o distortion: the computed distortion between the images.
4349 WandExport MagickBooleanType MagickGetImageDistortion(MagickWand *wand,
4350 const MagickWand *reference,const MetricType metric,double *distortion)
4355 assert(wand != (MagickWand *) NULL);
4356 assert(wand->signature == WandSignature);
4357 if (wand->debug != MagickFalse)
4358 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4359 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
4360 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4361 status=GetImageDistortion(wand->images,reference->images,metric,distortion,
4367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4371 % 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 %
4375 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4377 % MagickGetImageDistortions() compares one or more pixel channels of an
4378 % image to a reconstructed image and returns the specified distortion metrics.
4380 % Use MagickRelinquishMemory() to free the metrics when you are done with them.
4382 % The format of the MagickGetImageDistortion method is:
4384 % double *MagickGetImageDistortion(MagickWand *wand,
4385 % const MagickWand *reference,const MetricType metric)
4387 % A description of each parameter follows:
4389 % o wand: the magick wand.
4391 % o reference: the reference wand.
4393 % o metric: the metric.
4396 WandExport double *MagickGetImageDistortions(MagickWand *wand,
4397 const MagickWand *reference,const MetricType metric)
4400 *channel_distortion;
4402 assert(wand != (MagickWand *) NULL);
4403 assert(wand->signature == WandSignature);
4404 if (wand->debug != MagickFalse)
4405 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4406 assert(reference != (MagickWand *) NULL);
4407 assert(reference->signature == WandSignature);
4408 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
4410 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4411 "ContainsNoImages","`%s'",wand->name);
4412 return((double *) NULL);
4414 channel_distortion=GetImageDistortions(wand->images,reference->images,
4415 metric,wand->exception);
4416 return(channel_distortion);
4420 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4424 % M a g i c k G e t I m a g e F i l e n a m e %
4428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4430 % MagickGetImageFilename() returns the filename of a particular image in a
4433 % The format of the MagickGetImageFilename method is:
4435 % char *MagickGetImageFilename(MagickWand *wand)
4437 % A description of each parameter follows:
4439 % o wand: the magick wand.
4442 WandExport char *MagickGetImageFilename(MagickWand *wand)
4444 assert(wand != (MagickWand *) NULL);
4445 assert(wand->signature == WandSignature);
4446 if (wand->debug != MagickFalse)
4447 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4448 if (wand->images == (Image *) NULL)
4450 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4451 "ContainsNoImages","`%s'",wand->name);
4452 return((char *) NULL);
4454 return(AcquireString(wand->images->filename));
4458 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4462 % M a g i c k G e t I m a g e F o r m a t %
4466 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4468 % MagickGetImageFormat() returns the format of a particular image in a
4471 % The format of the MagickGetImageFormat method is:
4473 % const char *MagickGetImageFormat(MagickWand *wand)
4475 % A description of each parameter follows:
4477 % o wand: the magick wand.
4480 WandExport char *MagickGetImageFormat(MagickWand *wand)
4482 assert(wand != (MagickWand *) NULL);
4483 assert(wand->signature == WandSignature);
4484 if (wand->debug != MagickFalse)
4485 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4486 if (wand->images == (Image *) NULL)
4488 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4489 "ContainsNoImages","`%s'",wand->name);
4490 return((char *) NULL);
4492 return(AcquireString(wand->images->magick));
4496 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4500 % M a g i c k G e t I m a g e F u z z %
4504 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4506 % MagickGetImageFuzz() gets the image fuzz.
4508 % The format of the MagickGetImageFuzz method is:
4510 % double MagickGetImageFuzz(MagickWand *wand)
4512 % A description of each parameter follows:
4514 % o wand: the magick wand.
4517 WandExport double MagickGetImageFuzz(MagickWand *wand)
4519 assert(wand != (MagickWand *) NULL);
4520 assert(wand->signature == WandSignature);
4521 if (wand->debug != MagickFalse)
4522 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4523 if (wand->images == (Image *) NULL)
4525 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4526 "ContainsNoImages","`%s'",wand->name);
4529 return(wand->images->fuzz);
4533 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4537 % M a g i c k G e t I m a g e G a m m a %
4541 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4543 % MagickGetImageGamma() gets the image gamma.
4545 % The format of the MagickGetImageGamma method is:
4547 % double MagickGetImageGamma(MagickWand *wand)
4549 % A description of each parameter follows:
4551 % o wand: the magick wand.
4554 WandExport double MagickGetImageGamma(MagickWand *wand)
4556 assert(wand != (MagickWand *) NULL);
4557 assert(wand->signature == WandSignature);
4558 if (wand->debug != MagickFalse)
4559 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4560 if (wand->images == (Image *) NULL)
4562 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4563 "ContainsNoImages","`%s'",wand->name);
4566 return(wand->images->gamma);
4570 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4574 % 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 %
4578 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4580 % MagickGetImageGravity() gets the image gravity.
4582 % The format of the MagickGetImageGravity method is:
4584 % GravityType MagickGetImageGravity(MagickWand *wand)
4586 % A description of each parameter follows:
4588 % o wand: the magick wand.
4591 WandExport GravityType MagickGetImageGravity(MagickWand *wand)
4593 assert(wand != (MagickWand *) NULL);
4594 assert(wand->signature == WandSignature);
4595 if (wand->debug != MagickFalse)
4596 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4597 if (wand->images == (Image *) NULL)
4599 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4600 "ContainsNoImages","`%s'",wand->name);
4601 return(UndefinedGravity);
4603 return(wand->images->gravity);
4607 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4611 % 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 %
4615 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4617 % MagickGetImageGreenPrimary() returns the chromaticy green primary point.
4619 % The format of the MagickGetImageGreenPrimary method is:
4621 % MagickBooleanType MagickGetImageGreenPrimary(MagickWand *wand,double *x,
4624 % A description of each parameter follows:
4626 % o wand: the magick wand.
4628 % o x: the chromaticity green primary x-point.
4630 % o y: the chromaticity green primary y-point.
4633 WandExport MagickBooleanType MagickGetImageGreenPrimary(MagickWand *wand,
4634 double *x,double *y)
4636 assert(wand != (MagickWand *) NULL);
4637 assert(wand->signature == WandSignature);
4638 if (wand->debug != MagickFalse)
4639 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4640 if (wand->images == (Image *) NULL)
4641 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4642 *x=wand->images->chromaticity.green_primary.x;
4643 *y=wand->images->chromaticity.green_primary.y;
4648 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4652 % M a g i c k G e t I m a g e H e i g h t %
4656 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4658 % MagickGetImageHeight() returns the image height.
4660 % The format of the MagickGetImageHeight method is:
4662 % size_t MagickGetImageHeight(MagickWand *wand)
4664 % A description of each parameter follows:
4666 % o wand: the magick wand.
4669 WandExport size_t MagickGetImageHeight(MagickWand *wand)
4671 assert(wand != (MagickWand *) NULL);
4672 assert(wand->signature == WandSignature);
4673 if (wand->debug != MagickFalse)
4674 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4675 if (wand->images == (Image *) NULL)
4676 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4677 return(wand->images->rows);
4681 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4685 % M a g i c k G e t I m a g e H i s t o g r a m %
4689 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4691 % MagickGetImageHistogram() returns the image histogram as an array of
4694 % The format of the MagickGetImageHistogram method is:
4696 % PixelWand **MagickGetImageHistogram(MagickWand *wand,
4697 % size_t *number_colors)
4699 % A description of each parameter follows:
4701 % o wand: the magick wand.
4703 % o number_colors: the number of unique colors in the image and the number
4704 % of pixel wands returned.
4707 WandExport PixelWand **MagickGetImageHistogram(MagickWand *wand,
4708 size_t *number_colors)
4719 assert(wand != (MagickWand *) NULL);
4720 assert(wand->signature == WandSignature);
4721 if (wand->debug != MagickFalse)
4722 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4723 if (wand->images == (Image *) NULL)
4725 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4726 "ContainsNoImages","`%s'",wand->name);
4727 return((PixelWand **) NULL);
4729 histogram=GetImageHistogram(wand->images,number_colors,wand->exception);
4730 if (histogram == (PixelInfo *) NULL)
4731 return((PixelWand **) NULL);
4732 pixel_wands=NewPixelWands(*number_colors);
4733 for (i=0; i < (ssize_t) *number_colors; i++)
4735 PixelSetQuantumPacket(pixel_wands[i],&histogram[i]);
4736 PixelSetColorCount(pixel_wands[i],(size_t) histogram[i].count);
4738 histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
4739 return(pixel_wands);
4743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4747 % 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 %
4751 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4753 % MagickGetImageInterlaceScheme() gets the image interlace scheme.
4755 % The format of the MagickGetImageInterlaceScheme method is:
4757 % InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)
4759 % A description of each parameter follows:
4761 % o wand: the magick wand.
4764 WandExport InterlaceType MagickGetImageInterlaceScheme(MagickWand *wand)
4766 assert(wand != (MagickWand *) NULL);
4767 assert(wand->signature == WandSignature);
4768 if (wand->debug != MagickFalse)
4769 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4770 if (wand->images == (Image *) NULL)
4772 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4773 "ContainsNoImages","`%s'",wand->name);
4774 return(UndefinedInterlace);
4776 return(wand->images->interlace);
4780 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4784 % 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 %
4788 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4790 % MagickGetImageInterpolateMethod() returns the interpolation method for the
4793 % The format of the MagickGetImageInterpolateMethod method is:
4795 % PixelInterpolateMethod MagickGetImagePixelInterpolateMethod(
4798 % A description of each parameter follows:
4800 % o wand: the magick wand.
4803 WandExport PixelInterpolateMethod MagickGetImageInterpolateMethod(
4806 assert(wand != (MagickWand *) NULL);
4807 assert(wand->signature == WandSignature);
4808 if (wand->debug != MagickFalse)
4809 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4810 if (wand->images == (Image *) NULL)
4812 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4813 "ContainsNoImages","`%s'",wand->name);
4814 return(UndefinedInterpolatePixel);
4816 return(wand->images->interpolate);
4820 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4824 % M a g i c k G e t I m a g e I t e r a t i o n s %
4828 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4830 % MagickGetImageIterations() gets the image iterations.
4832 % The format of the MagickGetImageIterations method is:
4834 % size_t MagickGetImageIterations(MagickWand *wand)
4836 % A description of each parameter follows:
4838 % o wand: the magick wand.
4841 WandExport size_t MagickGetImageIterations(MagickWand *wand)
4843 assert(wand != (MagickWand *) NULL);
4844 assert(wand->signature == WandSignature);
4845 if (wand->debug != MagickFalse)
4846 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4847 if (wand->images == (Image *) NULL)
4848 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4849 return(wand->images->iterations);
4853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4857 % M a g i c k G e t I m a g e L e n g t h %
4861 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4863 % MagickGetImageLength() returns the image length in bytes.
4865 % The format of the MagickGetImageLength method is:
4867 % MagickBooleanType MagickGetImageLength(MagickWand *wand,
4868 % MagickSizeType *length)
4870 % A description of each parameter follows:
4872 % o wand: the magick wand.
4874 % o length: the image length in bytes.
4877 WandExport MagickBooleanType MagickGetImageLength(MagickWand *wand,
4878 MagickSizeType *length)
4880 assert(wand != (MagickWand *) NULL);
4881 assert(wand->signature == WandSignature);
4882 if (wand->debug != MagickFalse)
4883 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4884 if (wand->images == (Image *) NULL)
4885 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4886 *length=GetBlobSize(wand->images);
4891 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4895 % M a g i c k G e t I m a g e M a t t e C o l o r %
4899 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4901 % MagickGetImageMatteColor() returns the image matte color.
4903 % The format of the MagickGetImageMatteColor method is:
4905 % MagickBooleanType MagickGetImagematteColor(MagickWand *wand,
4906 % PixelWand *matte_color)
4908 % A description of each parameter follows:
4910 % o wand: the magick wand.
4912 % o matte_color: Return the matte color.
4915 WandExport MagickBooleanType MagickGetImageMatteColor(MagickWand *wand,
4916 PixelWand *matte_color)
4918 assert(wand != (MagickWand *) NULL);
4919 assert(wand->signature == WandSignature);
4920 if (wand->debug != MagickFalse)
4921 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4922 if (wand->images == (Image *) NULL)
4923 ThrowWandException(WandError,"ContainsNoImages",wand->name);
4924 PixelSetQuantumPacket(matte_color,&wand->images->matte_color);
4929 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4933 % 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 %
4937 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4939 % MagickGetImageOrientation() returns the image orientation.
4941 % The format of the MagickGetImageOrientation method is:
4943 % OrientationType MagickGetImageOrientation(MagickWand *wand)
4945 % A description of each parameter follows:
4947 % o wand: the magick wand.
4950 WandExport OrientationType MagickGetImageOrientation(MagickWand *wand)
4952 assert(wand != (MagickWand *) NULL);
4953 assert(wand->signature == WandSignature);
4954 if (wand->debug != MagickFalse)
4955 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
4956 if (wand->images == (Image *) NULL)
4958 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
4959 "ContainsNoImages","`%s'",wand->name);
4960 return(UndefinedOrientation);
4962 return(wand->images->orientation);
4966 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4970 % M a g i c k G e t I m a g e P a g e %
4974 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4976 % MagickGetImagePage() returns the page geometry associated with the image.
4978 % The format of the MagickGetImagePage method is:
4980 % MagickBooleanType MagickGetImagePage(MagickWand *wand,
4981 % size_t *width,size_t *height,ssize_t *x,ssize_t *y)
4983 % A description of each parameter follows:
4985 % o wand: the magick wand.
4987 % o width: the page width.
4989 % o height: the page height.
4991 % o x: the page x-offset.
4993 % o y: the page y-offset.
4996 WandExport MagickBooleanType MagickGetImagePage(MagickWand *wand,
4997 size_t *width,size_t *height,ssize_t *x,ssize_t *y)
4999 assert(wand != (const MagickWand *) NULL);
5000 assert(wand->signature == WandSignature);
5001 if (wand->debug != MagickFalse)
5002 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5003 if (wand->images == (Image *) NULL)
5004 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5005 *width=wand->images->page.width;
5006 *height=wand->images->page.height;
5007 *x=wand->images->page.x;
5008 *y=wand->images->page.y;
5013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5017 % M a g i c k G e t I m a g e P i x e l C o l o r %
5021 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5023 % MagickGetImagePixelColor() returns the color of the specified pixel.
5025 % The format of the MagickGetImagePixelColor method is:
5027 % MagickBooleanType MagickGetImagePixelColor(MagickWand *wand,
5028 % const ssize_t x,const ssize_t y,PixelWand *color)
5030 % A description of each parameter follows:
5032 % o wand: the magick wand.
5034 % o x,y: the pixel offset into the image.
5036 % o color: Return the colormap color in this wand.
5039 WandExport MagickBooleanType MagickGetImagePixelColor(MagickWand *wand,
5040 const ssize_t x,const ssize_t y,PixelWand *color)
5042 register const Quantum
5048 assert(wand != (MagickWand *) NULL);
5049 assert(wand->signature == WandSignature);
5050 if (wand->debug != MagickFalse)
5051 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5052 if (wand->images == (Image *) NULL)
5053 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5054 image_view=AcquireCacheView(wand->images);
5055 p=GetCacheViewVirtualPixels(image_view,x,y,1,1,wand->exception);
5056 if (p == (const Quantum *) NULL)
5058 image_view=DestroyCacheView(image_view);
5059 return(MagickFalse);
5061 PixelSetQuantumPixel(wand->images,p,color);
5062 image_view=DestroyCacheView(image_view);
5067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5071 % M a g i c k G e t I m a g e R e d P r i m a r y %
5075 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5077 % MagickGetImageRedPrimary() returns the chromaticy red primary point.
5079 % The format of the MagickGetImageRedPrimary method is:
5081 % MagickBooleanType MagickGetImageRedPrimary(MagickWand *wand,double *x,
5084 % A description of each parameter follows:
5086 % o wand: the magick wand.
5088 % o x: the chromaticity red primary x-point.
5090 % o y: the chromaticity red primary y-point.
5093 WandExport MagickBooleanType MagickGetImageRedPrimary(MagickWand *wand,
5094 double *x,double *y)
5096 assert(wand != (MagickWand *) NULL);
5097 assert(wand->signature == WandSignature);
5098 if (wand->debug != MagickFalse)
5099 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5100 if (wand->images == (Image *) NULL)
5101 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5102 *x=wand->images->chromaticity.red_primary.x;
5103 *y=wand->images->chromaticity.red_primary.y;
5108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5112 % M a g i c k G e t I m a g e R e g i o n %
5116 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5118 % MagickGetImageRegion() extracts a region of the image and returns it as a
5121 % The format of the MagickGetImageRegion method is:
5123 % MagickWand *MagickGetImageRegion(MagickWand *wand,
5124 % const size_t width,const size_t height,const ssize_t x,
5127 % A description of each parameter follows:
5129 % o wand: the magick wand.
5131 % o width: the region width.
5133 % o height: the region height.
5135 % o x: the region x offset.
5137 % o y: the region y offset.
5140 WandExport MagickWand *MagickGetImageRegion(MagickWand *wand,
5141 const size_t width,const size_t height,const ssize_t x,
5150 assert(wand != (MagickWand *) NULL);
5151 assert(wand->signature == WandSignature);
5152 if (wand->debug != MagickFalse)
5153 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5154 if (wand->images == (Image *) NULL)
5155 return((MagickWand *) NULL);
5157 region.height=height;
5160 region_image=CropImage(wand->images,®ion,wand->exception);
5161 if (region_image == (Image *) NULL)
5162 return((MagickWand *) NULL);
5163 return(CloneMagickWandFromImages(wand,region_image));
5167 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5171 % 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 %
5175 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5177 % MagickGetImageRenderingIntent() gets the image rendering intent.
5179 % The format of the MagickGetImageRenderingIntent method is:
5181 % RenderingIntent MagickGetImageRenderingIntent(MagickWand *wand)
5183 % A description of each parameter follows:
5185 % o wand: the magick wand.
5188 WandExport RenderingIntent MagickGetImageRenderingIntent(MagickWand *wand)
5190 assert(wand != (MagickWand *) NULL);
5191 assert(wand->signature == WandSignature);
5192 if (wand->debug != MagickFalse)
5193 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5194 if (wand->images == (Image *) NULL)
5196 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5197 "ContainsNoImages","`%s'",wand->name);
5198 return(UndefinedIntent);
5200 return((RenderingIntent) wand->images->rendering_intent);
5204 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5208 % M a g i c k G e t I m a g e R e s o l u t i o n %
5212 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5214 % MagickGetImageResolution() gets the image X and Y resolution.
5216 % The format of the MagickGetImageResolution method is:
5218 % MagickBooleanType MagickGetImageResolution(MagickWand *wand,double *x,
5221 % A description of each parameter follows:
5223 % o wand: the magick wand.
5225 % o x: the image x-resolution.
5227 % o y: the image y-resolution.
5230 WandExport MagickBooleanType MagickGetImageResolution(MagickWand *wand,
5231 double *x,double *y)
5233 assert(wand != (MagickWand *) NULL);
5234 assert(wand->signature == WandSignature);
5235 if (wand->debug != MagickFalse)
5236 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5237 if (wand->images == (Image *) NULL)
5238 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5239 *x=wand->images->resolution.x;
5240 *y=wand->images->resolution.y;
5245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5249 % M a g i c k G e t I m a g e S c e n e %
5253 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5255 % MagickGetImageScene() gets the image scene.
5257 % The format of the MagickGetImageScene method is:
5259 % size_t MagickGetImageScene(MagickWand *wand)
5261 % A description of each parameter follows:
5263 % o wand: the magick wand.
5266 WandExport size_t MagickGetImageScene(MagickWand *wand)
5268 assert(wand != (MagickWand *) NULL);
5269 assert(wand->signature == WandSignature);
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 return(wand->images->scene);
5278 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5282 % M a g i c k G e t I m a g e S i g n a t u r e %
5286 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5288 % MagickGetImageSignature() generates an SHA-256 message digest for the image
5291 % The format of the MagickGetImageSignature method is:
5293 % const char MagickGetImageSignature(MagickWand *wand)
5295 % A description of each parameter follows:
5297 % o wand: the magick wand.
5300 WandExport char *MagickGetImageSignature(MagickWand *wand)
5308 assert(wand != (MagickWand *) NULL);
5309 assert(wand->signature == WandSignature);
5310 if (wand->debug != MagickFalse)
5311 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5312 if (wand->images == (Image *) NULL)
5314 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5315 "ContainsNoImages","`%s'",wand->name);
5316 return((char *) NULL);
5318 status=SignatureImage(wand->images,wand->exception);
5319 if (status == MagickFalse)
5320 return((char *) NULL);
5321 value=GetImageProperty(wand->images,"signature",wand->exception);
5322 if (value == (const char *) NULL)
5323 return((char *) NULL);
5324 return(AcquireString(value));
5328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5332 % 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 %
5336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5338 % MagickGetImageTicksPerSecond() gets the image ticks-per-second.
5340 % The format of the MagickGetImageTicksPerSecond method is:
5342 % size_t MagickGetImageTicksPerSecond(MagickWand *wand)
5344 % A description of each parameter follows:
5346 % o wand: the magick wand.
5349 WandExport size_t MagickGetImageTicksPerSecond(MagickWand *wand)
5351 assert(wand != (MagickWand *) NULL);
5352 assert(wand->signature == WandSignature);
5353 if (wand->debug != MagickFalse)
5354 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5355 if (wand->images == (Image *) NULL)
5356 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5357 return((size_t) wand->images->ticks_per_second);
5361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5365 % M a g i c k G e t I m a g e T y p e %
5369 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5371 % MagickGetImageType() gets the potential image type:
5373 % Bilevel Grayscale GrayscaleMatte
5374 % Palette PaletteMatte TrueColor
5375 % TrueColorMatte ColorSeparation ColorSeparationMatte
5377 % To ensure the image type matches its potential, use MagickSetImageType():
5379 % (void) MagickSetImageType(wand,MagickGetImageType(wand));
5381 % The format of the MagickGetImageType method is:
5383 % ImageType MagickGetImageType(MagickWand *wand)
5385 % A description of each parameter follows:
5387 % o wand: the magick wand.
5390 WandExport ImageType MagickGetImageType(MagickWand *wand)
5392 assert(wand != (MagickWand *) NULL);
5393 assert(wand->signature == WandSignature);
5394 if (wand->debug != MagickFalse)
5395 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5396 if (wand->images == (Image *) NULL)
5398 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5399 "ContainsNoImages","`%s'",wand->name);
5400 return(UndefinedType);
5402 return(GetImageType(wand->images,wand->exception));
5406 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5410 % M a g i c k G e t I m a g e U n i t s %
5414 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5416 % MagickGetImageUnits() gets the image units of resolution.
5418 % The format of the MagickGetImageUnits method is:
5420 % ResolutionType MagickGetImageUnits(MagickWand *wand)
5422 % A description of each parameter follows:
5424 % o wand: the magick wand.
5427 WandExport ResolutionType MagickGetImageUnits(MagickWand *wand)
5429 assert(wand != (MagickWand *) NULL);
5430 assert(wand->signature == WandSignature);
5431 if (wand->debug != MagickFalse)
5432 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5433 if (wand->images == (Image *) NULL)
5435 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5436 "ContainsNoImages","`%s'",wand->name);
5437 return(UndefinedResolution);
5439 return(wand->images->units);
5443 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5447 % 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 %
5451 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5453 % MagickGetImageVirtualPixelMethod() returns the virtual pixel method for the
5456 % The format of the MagickGetImageVirtualPixelMethod method is:
5458 % VirtualPixelMethod MagickGetImageVirtualPixelMethod(MagickWand *wand)
5460 % A description of each parameter follows:
5462 % o wand: the magick wand.
5465 WandExport VirtualPixelMethod MagickGetImageVirtualPixelMethod(MagickWand *wand)
5467 assert(wand != (MagickWand *) NULL);
5468 assert(wand->signature == WandSignature);
5469 if (wand->debug != MagickFalse)
5470 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5471 if (wand->images == (Image *) NULL)
5473 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5474 "ContainsNoImages","`%s'",wand->name);
5475 return(UndefinedVirtualPixelMethod);
5477 return(GetImageVirtualPixelMethod(wand->images));
5481 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5485 % M a g i c k G e t I m a g e W h i t e P o i n t %
5489 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5491 % MagickGetImageWhitePoint() returns the chromaticy white point.
5493 % The format of the MagickGetImageWhitePoint method is:
5495 % MagickBooleanType MagickGetImageWhitePoint(MagickWand *wand,double *x,
5498 % A description of each parameter follows:
5500 % o wand: the magick wand.
5502 % o x: the chromaticity white x-point.
5504 % o y: the chromaticity white y-point.
5507 WandExport MagickBooleanType MagickGetImageWhitePoint(MagickWand *wand,
5508 double *x,double *y)
5510 assert(wand != (MagickWand *) NULL);
5511 assert(wand->signature == WandSignature);
5512 if (wand->debug != MagickFalse)
5513 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5514 if (wand->images == (Image *) NULL)
5515 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5516 *x=wand->images->chromaticity.white_point.x;
5517 *y=wand->images->chromaticity.white_point.y;
5522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5526 % M a g i c k G e t I m a g e W i d t h %
5530 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5532 % MagickGetImageWidth() returns the image width.
5534 % The format of the MagickGetImageWidth method is:
5536 % size_t MagickGetImageWidth(MagickWand *wand)
5538 % A description of each parameter follows:
5540 % o wand: the magick wand.
5543 WandExport size_t MagickGetImageWidth(MagickWand *wand)
5545 assert(wand != (MagickWand *) NULL);
5546 assert(wand->signature == WandSignature);
5547 if (wand->debug != MagickFalse)
5548 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5549 if (wand->images == (Image *) NULL)
5550 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5551 return(wand->images->columns);
5555 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5559 % M a g i c k G e t N u m b e r I m a g e s %
5563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5565 % MagickGetNumberImages() returns the number of images associated with a
5568 % The format of the MagickGetNumberImages method is:
5570 % size_t MagickGetNumberImages(MagickWand *wand)
5572 % A description of each parameter follows:
5574 % o wand: the magick wand.
5577 WandExport size_t MagickGetNumberImages(MagickWand *wand)
5579 assert(wand != (MagickWand *) NULL);
5580 assert(wand->signature == WandSignature);
5581 if (wand->debug != MagickFalse)
5582 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5583 return(GetImageListLength(wand->images));
5587 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5591 % 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 %
5595 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5597 % MagickGetImageTotalInkDensity() gets the image total ink density.
5599 % The format of the MagickGetImageTotalInkDensity method is:
5601 % double MagickGetImageTotalInkDensity(MagickWand *wand)
5603 % A description of each parameter follows:
5605 % o wand: the magick wand.
5608 WandExport double MagickGetImageTotalInkDensity(MagickWand *wand)
5610 assert(wand != (MagickWand *) NULL);
5611 assert(wand->signature == WandSignature);
5612 if (wand->debug != MagickFalse)
5613 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5614 if (wand->images == (Image *) NULL)
5616 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5617 "ContainsNoImages","`%s'",wand->name);
5620 return(GetImageTotalInkDensity(wand->images,wand->exception));
5624 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5628 % M a g i c k H a l d C l u t I m a g e %
5632 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5634 % MagickHaldClutImage() replaces colors in the image from a Hald color lookup
5635 % table. A Hald color lookup table is a 3-dimensional color cube mapped to 2
5636 % dimensions. Create it with the HALD coder. You can apply any color
5637 % transformation to the Hald image and then use this method to apply the
5638 % transform to the image.
5640 % The format of the MagickHaldClutImage method is:
5642 % MagickBooleanType MagickHaldClutImage(MagickWand *wand,
5643 % const MagickWand *hald_wand)
5645 % A description of each parameter follows:
5647 % o wand: the magick wand.
5649 % o hald_image: the hald CLUT image.
5652 WandExport MagickBooleanType MagickHaldClutImage(MagickWand *wand,
5653 const MagickWand *hald_wand)
5658 assert(wand != (MagickWand *) NULL);
5659 assert(wand->signature == WandSignature);
5660 if (wand->debug != MagickFalse)
5661 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5662 if ((wand->images == (Image *) NULL) || (hald_wand->images == (Image *) NULL))
5663 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5664 status=HaldClutImage(wand->images,hald_wand->images,wand->exception);
5669 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5673 % M a g i c k H a s N e x t I m a g e %
5677 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5679 % MagickHasNextImage() returns MagickTrue if the wand has more images when
5680 % traversing the list in the forward direction
5682 % The format of the MagickHasNextImage method is:
5684 % MagickBooleanType MagickHasNextImage(MagickWand *wand)
5686 % A description of each parameter follows:
5688 % o wand: the magick wand.
5691 WandExport MagickBooleanType MagickHasNextImage(MagickWand *wand)
5693 assert(wand != (MagickWand *) NULL);
5694 assert(wand->signature == WandSignature);
5695 if (wand->debug != MagickFalse)
5696 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5697 if (wand->images == (Image *) NULL)
5698 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5699 if (GetNextImageInList(wand->images) == (Image *) NULL)
5700 return(MagickFalse);
5705 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5709 % M a g i c k H a s P r e v i o u s I m a g e %
5713 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5715 % MagickHasPreviousImage() returns MagickTrue if the wand has more images when
5716 % traversing the list in the reverse direction
5718 % The format of the MagickHasPreviousImage method is:
5720 % MagickBooleanType MagickHasPreviousImage(MagickWand *wand)
5722 % A description of each parameter follows:
5724 % o wand: the magick wand.
5727 WandExport MagickBooleanType MagickHasPreviousImage(MagickWand *wand)
5729 assert(wand != (MagickWand *) NULL);
5730 assert(wand->signature == WandSignature);
5731 if (wand->debug != MagickFalse)
5732 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5733 if (wand->images == (Image *) NULL)
5734 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5735 if (GetPreviousImageInList(wand->images) == (Image *) NULL)
5736 return(MagickFalse);
5741 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5745 % M a g i c k I d e n t i f y I m a g e %
5749 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5751 % MagickIdentifyImage() identifies an image by printing its attributes to the
5752 % file. Attributes include the image width, height, size, and others.
5754 % The format of the MagickIdentifyImage method is:
5756 % const char *MagickIdentifyImage(MagickWand *wand)
5758 % A description of each parameter follows:
5760 % o wand: the magick wand.
5763 WandExport char *MagickIdentifyImage(MagickWand *wand)
5767 filename[MaxTextExtent];
5775 assert(wand != (MagickWand *) NULL);
5776 assert(wand->signature == WandSignature);
5777 if (wand->debug != MagickFalse)
5778 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5779 if (wand->images == (Image *) NULL)
5781 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5782 "ContainsNoImages","`%s'",wand->name);
5783 return((char *) NULL);
5785 description=(char *) NULL;
5786 unique_file=AcquireUniqueFileResource(filename);
5788 if (unique_file != -1)
5789 file=fdopen(unique_file,"wb");
5790 if ((unique_file == -1) || (file == (FILE *) NULL))
5792 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
5793 "UnableToCreateTemporaryFile","`%s'",wand->name);
5794 return((char *) NULL);
5796 (void) IdentifyImage(wand->images,file,MagickTrue,wand->exception);
5797 (void) fclose(file);
5798 description=FileToString(filename,~0,wand->exception);
5799 (void) RelinquishUniqueFileResource(filename);
5800 return(description);
5804 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5808 % M a g i c k I m p l o d e I m a g e %
5812 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5814 % MagickImplodeImage() creates a new image that is a copy of an existing
5815 % one with the image pixels "implode" by the specified percentage. It
5816 % allocates the memory necessary for the new Image structure and returns a
5817 % pointer to the new image.
5819 % The format of the MagickImplodeImage method is:
5821 % MagickBooleanType MagickImplodeImage(MagickWand *wand,
5822 % const double radius,const PixelInterpolateMethod method)
5824 % A description of each parameter follows:
5826 % o wand: the magick wand.
5828 % o amount: Define the extent of the implosion.
5830 % o method: the pixel interpolation method.
5833 WandExport MagickBooleanType MagickImplodeImage(MagickWand *wand,
5834 const double amount,const PixelInterpolateMethod method)
5839 assert(wand != (MagickWand *) NULL);
5840 assert(wand->signature == WandSignature);
5841 if (wand->debug != MagickFalse)
5842 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5843 if (wand->images == (Image *) NULL)
5844 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5845 implode_image=ImplodeImage(wand->images,amount,method,wand->exception);
5846 if (implode_image == (Image *) NULL)
5847 return(MagickFalse);
5848 ReplaceImageInList(&wand->images,implode_image);
5853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5857 % M a g i c k I m p o r t I m a g e P i x e l s %
5861 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5863 % MagickImportImagePixels() accepts pixel datand stores it in the image at the
5864 % location you specify. The method returns MagickFalse on success otherwise
5865 % MagickTrue if an error is encountered. The pixel data can be either char,
5866 % short int, int, ssize_t, float, or double in the order specified by map.
5868 % Suppose your want to upload the first scanline of a 640x480 image from
5869 % character data in red-green-blue order:
5871 % MagickImportImagePixels(wand,0,0,640,1,"RGB",CharPixel,pixels);
5873 % The format of the MagickImportImagePixels method is:
5875 % MagickBooleanType MagickImportImagePixels(MagickWand *wand,
5876 % const ssize_t x,const ssize_t y,const size_t columns,
5877 % const size_t rows,const char *map,const StorageType storage,
5878 % const void *pixels)
5880 % A description of each parameter follows:
5882 % o wand: the magick wand.
5884 % o x, y, columns, rows: These values define the perimeter of a region
5885 % of pixels you want to define.
5887 % o map: This string reflects the expected ordering of the pixel array.
5888 % It can be any combination or order of R = red, G = green, B = blue,
5889 % A = alpha (0 is transparent), O = alpha (0 is opaque), C = cyan,
5890 % Y = yellow, M = magenta, K = black, I = intensity (for grayscale),
5893 % o storage: Define the data type of the pixels. Float and double types are
5894 % expected to be normalized [0..1] otherwise [0..QuantumRange]. Choose from
5895 % these types: CharPixel, ShortPixel, IntegerPixel, LongPixel, FloatPixel,
5898 % o pixels: This array of values contain the pixel components as defined by
5899 % map and type. You must preallocate this array where the expected
5900 % length varies depending on the values of width, height, map, and type.
5903 WandExport MagickBooleanType MagickImportImagePixels(MagickWand *wand,
5904 const ssize_t x,const ssize_t y,const size_t columns,const size_t rows,
5905 const char *map,const StorageType storage,const void *pixels)
5910 assert(wand != (MagickWand *) NULL);
5911 assert(wand->signature == WandSignature);
5912 if (wand->debug != MagickFalse)
5913 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
5914 if (wand->images == (Image *) NULL)
5915 ThrowWandException(WandError,"ContainsNoImages",wand->name);
5916 status=ImportImagePixels(wand->images,x,y,columns,rows,map,storage,pixels,
5922 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5926 % 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 %
5930 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5932 % MagickInverseFourierTransformImage() implements the inverse discrete
5933 % Fourier transform (DFT) of the image either as a magnitude / phase or real /
5934 % imaginary image pair.
5936 % The format of the MagickInverseFourierTransformImage method is:
5938 % MagickBooleanType MagickInverseFourierTransformImage(
5939 % MagickWand *magnitude_wand,MagickWand *phase_wand,
5940 % const MagickBooleanType magnitude)
5942 % A description of each parameter follows:
5944 % o magnitude_wand: the magnitude or real wand.
5946 % o phase_wand: the phase or imaginary wand.
5948 % o magnitude: if true, return as magnitude / phase pair otherwise a real /
5949 % imaginary image pair.
5952 WandExport MagickBooleanType MagickInverseFourierTransformImage(
5953 MagickWand *magnitude_wand,MagickWand *phase_wand,
5954 const MagickBooleanType magnitude)
5962 assert(magnitude_wand != (MagickWand *) NULL);
5963 assert(magnitude_wand->signature == WandSignature);
5964 if (magnitude_wand->debug != MagickFalse)
5965 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",
5966 magnitude_wand->name);
5967 wand=magnitude_wand;
5968 if (magnitude_wand->images == (Image *) NULL)
5969 ThrowWandException(WandError,"ContainsNoImages",
5970 magnitude_wand->name);
5971 assert(phase_wand != (MagickWand *) NULL);
5972 assert(phase_wand->signature == WandSignature);
5973 inverse_image=InverseFourierTransformImage(magnitude_wand->images,
5974 phase_wand->images,magnitude,wand->exception);
5975 if (inverse_image == (Image *) NULL)
5976 return(MagickFalse);
5977 ReplaceImageInList(&wand->images,inverse_image);
5982 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5986 % M a g i c k L a b e l I m a g e %
5990 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5992 % MagickLabelImage() adds a label to your image.
5994 % The format of the MagickLabelImage method is:
5996 % MagickBooleanType MagickLabelImage(MagickWand *wand,const char *label)
5998 % A description of each parameter follows:
6000 % o wand: the magick wand.
6002 % o label: the image label.
6005 WandExport MagickBooleanType MagickLabelImage(MagickWand *wand,
6011 assert(wand != (MagickWand *) NULL);
6012 assert(wand->signature == WandSignature);
6013 if (wand->debug != MagickFalse)
6014 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6015 if (wand->images == (Image *) NULL)
6016 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6017 status=SetImageProperty(wand->images,"label",label,wand->exception);
6022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6026 % M a g i c k L e v e l I m a g e %
6030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6032 % MagickLevelImage() adjusts the levels of an image by scaling the colors
6033 % falling between specified white and black points to the full available
6034 % quantum range. The parameters provided represent the black, mid, and white
6035 % points. The black point specifies the darkest color in the image. Colors
6036 % darker than the black point are set to zero. Mid point specifies a gamma
6037 % correction to apply to the image. White point specifies the lightest color
6038 % in the image. Colors brighter than the white point are set to the maximum
6041 % The format of the MagickLevelImage method is:
6043 % MagickBooleanType MagickLevelImage(MagickWand *wand,
6044 % const double black_point,const double gamma,const double white_point)
6045 % MagickBooleanType MagickLevelImage(MagickWand *wand,
6046 % const ChannelType channel,const double black_point,const double gamma,
6047 % const double white_point)
6049 % A description of each parameter follows:
6051 % o wand: the magick wand.
6053 % o channel: Identify which channel to level: RedPixelChannel,
6054 % GreenPixelChannel, etc.
6056 % o black_point: the black point.
6058 % o gamma: the gamma.
6060 % o white_point: the white point.
6063 WandExport MagickBooleanType MagickLevelImage(MagickWand *wand,
6064 const double black_point,const double gamma,const double white_point)
6069 assert(wand != (MagickWand *) NULL);
6070 assert(wand->signature == WandSignature);
6071 if (wand->debug != MagickFalse)
6072 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6073 if (wand->images == (Image *) NULL)
6074 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6075 status=LevelImage(wand->images,black_point,white_point,gamma,
6081 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6085 % M a g i c k L i n e a r S t r e t c h I m a g e %
6089 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6091 % MagickLinearStretchImage() stretches with saturation the image intensity.
6093 % You can also reduce the influence of a particular channel with a gamma
6096 % The format of the MagickLinearStretchImage method is:
6098 % MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
6099 % const double black_point,const double white_point)
6101 % A description of each parameter follows:
6103 % o wand: the magick wand.
6105 % o black_point: the black point.
6107 % o white_point: the white point.
6110 WandExport MagickBooleanType MagickLinearStretchImage(MagickWand *wand,
6111 const double black_point,const double white_point)
6116 assert(wand != (MagickWand *) NULL);
6117 assert(wand->signature == WandSignature);
6118 if (wand->debug != MagickFalse)
6119 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6120 if (wand->images == (Image *) NULL)
6121 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6122 status=LinearStretchImage(wand->images,black_point,white_point,
6128 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6132 % M a g i c k L i q u i d R e s c a l e I m a g e %
6136 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6138 % MagickLiquidRescaleImage() rescales image with seam carving.
6140 % MagickBooleanType MagickLiquidRescaleImage(MagickWand *wand,
6141 % const size_t columns,const size_t rows,
6142 % const double delta_x,const double rigidity)
6144 % A description of each parameter follows:
6146 % o wand: the magick wand.
6148 % o columns: the number of columns in the scaled image.
6150 % o rows: the number of rows in the scaled image.
6152 % o delta_x: maximum seam transversal step (0 means straight seams).
6154 % o rigidity: introduce a bias for non-straight seams (typically 0).
6157 WandExport MagickBooleanType MagickLiquidRescaleImage(MagickWand *wand,
6158 const size_t columns,const size_t rows,const double delta_x,
6159 const double rigidity)
6164 assert(wand != (MagickWand *) NULL);
6165 assert(wand->signature == WandSignature);
6166 if (wand->debug != MagickFalse)
6167 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6168 if (wand->images == (Image *) NULL)
6169 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6170 rescale_image=LiquidRescaleImage(wand->images,columns,rows,delta_x,
6171 rigidity,wand->exception);
6172 if (rescale_image == (Image *) NULL)
6173 return(MagickFalse);
6174 ReplaceImageInList(&wand->images,rescale_image);
6179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6183 % M a g i c k M a g n i f y I m a g e %
6187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6189 % MagickMagnifyImage() is a convenience method that scales an image
6190 % proportionally to twice its original size.
6192 % The format of the MagickMagnifyImage method is:
6194 % MagickBooleanType MagickMagnifyImage(MagickWand *wand)
6196 % A description of each parameter follows:
6198 % o wand: the magick wand.
6201 WandExport MagickBooleanType MagickMagnifyImage(MagickWand *wand)
6206 assert(wand != (MagickWand *) NULL);
6207 assert(wand->signature == WandSignature);
6208 if (wand->debug != MagickFalse)
6209 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6210 if (wand->images == (Image *) NULL)
6211 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6212 magnify_image=MagnifyImage(wand->images,wand->exception);
6213 if (magnify_image == (Image *) NULL)
6214 return(MagickFalse);
6215 ReplaceImageInList(&wand->images,magnify_image);
6220 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6224 % M a g i c k M e r g e I m a g e L a y e r s %
6228 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6230 % MagickMergeImageLayers() composes all the image layers from the current
6231 % given image onward to produce a single image of the merged layers.
6233 % The inital canvas's size depends on the given ImageLayerMethod, and is
6234 % initialized using the first images background color. The images
6235 % are then compositied onto that image in sequence using the given
6236 % composition that has been assigned to each individual image.
6238 % The format of the MagickMergeImageLayers method is:
6240 % MagickWand *MagickMergeImageLayers(MagickWand *wand,
6241 % const ImageLayerMethod method)
6243 % A description of each parameter follows:
6245 % o wand: the magick wand.
6247 % o method: the method of selecting the size of the initial canvas.
6249 % MergeLayer: Merge all layers onto a canvas just large enough
6250 % to hold all the actual images. The virtual canvas of the
6251 % first image is preserved but otherwise ignored.
6253 % FlattenLayer: Use the virtual canvas size of first image.
6254 % Images which fall outside this canvas is clipped.
6255 % This can be used to 'fill out' a given virtual canvas.
6257 % MosaicLayer: Start with the virtual canvas of the first image,
6258 % enlarging left and right edges to contain all images.
6259 % Images with negative offsets will be clipped.
6262 WandExport MagickWand *MagickMergeImageLayers(MagickWand *wand,
6263 const ImageLayerMethod method)
6268 assert(wand != (MagickWand *) NULL);
6269 assert(wand->signature == WandSignature);
6270 if (wand->debug != MagickFalse)
6271 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6272 if (wand->images == (Image *) NULL)
6273 return((MagickWand *) NULL);
6274 mosaic_image=MergeImageLayers(wand->images,method,wand->exception);
6275 if (mosaic_image == (Image *) NULL)
6276 return((MagickWand *) NULL);
6277 return(CloneMagickWandFromImages(wand,mosaic_image));
6281 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6285 % M a g i c k M i n i f y I m a g e %
6289 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6291 % MagickMinifyImage() is a convenience method that scales an image
6292 % proportionally to one-half its original size
6294 % The format of the MagickMinifyImage method is:
6296 % MagickBooleanType MagickMinifyImage(MagickWand *wand)
6298 % A description of each parameter follows:
6300 % o wand: the magick wand.
6303 WandExport MagickBooleanType MagickMinifyImage(MagickWand *wand)
6308 assert(wand != (MagickWand *) NULL);
6309 assert(wand->signature == WandSignature);
6310 if (wand->debug != MagickFalse)
6311 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6312 if (wand->images == (Image *) NULL)
6313 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6314 minify_image=MinifyImage(wand->images,wand->exception);
6315 if (minify_image == (Image *) NULL)
6316 return(MagickFalse);
6317 ReplaceImageInList(&wand->images,minify_image);
6322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6326 % M a g i c k M o d u l a t e I m a g e %
6330 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6332 % MagickModulateImage() lets you control the brightness, saturation, and hue
6333 % of an image. Hue is the percentage of absolute rotation from the current
6334 % position. For example 50 results in a counter-clockwise rotation of 90
6335 % degrees, 150 results in a clockwise rotation of 90 degrees, with 0 and 200
6336 % both resulting in a rotation of 180 degrees.
6338 % To increase the color brightness by 20% and decrease the color saturation by
6339 % 10% and leave the hue unchanged, use: 120,90,100.
6341 % The format of the MagickModulateImage method is:
6343 % MagickBooleanType MagickModulateImage(MagickWand *wand,
6344 % const double brightness,const double saturation,const double hue)
6346 % A description of each parameter follows:
6348 % o wand: the magick wand.
6350 % o brightness: the percent change in brighness.
6352 % o saturation: the percent change in saturation.
6354 % o hue: the percent change in hue.
6357 WandExport MagickBooleanType MagickModulateImage(MagickWand *wand,
6358 const double brightness,const double saturation,const double hue)
6361 modulate[MaxTextExtent];
6366 assert(wand != (MagickWand *) NULL);
6367 assert(wand->signature == WandSignature);
6368 if (wand->debug != MagickFalse)
6369 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6370 if (wand->images == (Image *) NULL)
6371 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6372 (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
6373 brightness,saturation,hue);
6374 status=ModulateImage(wand->images,modulate,wand->exception);
6379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6383 % M a g i c k M o n t a g e I m a g e %
6387 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6389 % MagickMontageImage() creates a composite image by combining several
6390 % separate images. The images are tiled on the composite image with the name
6391 % of the image optionally appearing just below the individual tile.
6393 % The format of the MagickMontageImage method is:
6395 % MagickWand *MagickMontageImage(MagickWand *wand,
6396 % const DrawingWand drawing_wand,const char *tile_geometry,
6397 % const char *thumbnail_geometry,const MontageMode mode,
6398 % const char *frame)
6400 % A description of each parameter follows:
6402 % o wand: the magick wand.
6404 % o drawing_wand: the drawing wand. The font name, size, and color are
6405 % obtained from this wand.
6407 % o tile_geometry: the number of tiles per row and page (e.g. 6x4+0+0).
6409 % o thumbnail_geometry: Preferred image size and border size of each
6410 % thumbnail (e.g. 120x120+4+3>).
6412 % o mode: Thumbnail framing mode: Frame, Unframe, or Concatenate.
6414 % o frame: Surround the image with an ornamental border (e.g. 15x15+3+3).
6415 % The frame color is that of the thumbnail's matte color.
6418 WandExport MagickWand *MagickMontageImage(MagickWand *wand,
6419 const DrawingWand *drawing_wand,const char *tile_geometry,
6420 const char *thumbnail_geometry,const MontageMode mode,const char *frame)
6434 assert(wand != (MagickWand *) NULL);
6435 assert(wand->signature == WandSignature);
6436 if (wand->debug != MagickFalse)
6437 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6438 if (wand->images == (Image *) NULL)
6439 return((MagickWand *) NULL);
6440 montage_info=CloneMontageInfo(wand->image_info,(MontageInfo *) NULL);
6445 (void) CloneString(&montage_info->frame,"15x15+3+3");
6446 montage_info->shadow=MagickTrue;
6451 montage_info->frame=(char *) NULL;
6452 montage_info->shadow=MagickFalse;
6453 montage_info->border_width=0;
6456 case ConcatenateMode:
6458 montage_info->frame=(char *) NULL;
6459 montage_info->shadow=MagickFalse;
6460 (void) CloneString(&montage_info->geometry,"+0+0");
6461 montage_info->border_width=0;
6467 font=DrawGetFont(drawing_wand);
6468 if (font != (char *) NULL)
6469 (void) CloneString(&montage_info->font,font);
6470 if (frame != (char *) NULL)
6471 (void) CloneString(&montage_info->frame,frame);
6472 montage_info->pointsize=DrawGetFontSize(drawing_wand);
6473 pixel_wand=NewPixelWand();
6474 DrawGetFillColor(drawing_wand,pixel_wand);
6475 PixelGetQuantumPacket(pixel_wand,&montage_info->fill);
6476 DrawGetStrokeColor(drawing_wand,pixel_wand);
6477 PixelGetQuantumPacket(pixel_wand,&montage_info->stroke);
6478 pixel_wand=DestroyPixelWand(pixel_wand);
6479 if (thumbnail_geometry != (char *) NULL)
6480 (void) CloneString(&montage_info->geometry,thumbnail_geometry);
6481 if (tile_geometry != (char *) NULL)
6482 (void) CloneString(&montage_info->tile,tile_geometry);
6483 montage_image=MontageImageList(wand->image_info,montage_info,wand->images,
6485 montage_info=DestroyMontageInfo(montage_info);
6486 if (montage_image == (Image *) NULL)
6487 return((MagickWand *) NULL);
6488 return(CloneMagickWandFromImages(wand,montage_image));
6492 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6496 % M a g i c k M o r p h I m a g e s %
6500 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6502 % MagickMorphImages() method morphs a set of images. Both the image pixels
6503 % and size are linearly interpolated to give the appearance of a
6504 % meta-morphosis from one image to the next.
6506 % The format of the MagickMorphImages method is:
6508 % MagickWand *MagickMorphImages(MagickWand *wand,
6509 % const size_t number_frames)
6511 % A description of each parameter follows:
6513 % o wand: the magick wand.
6515 % o number_frames: the number of in-between images to generate.
6518 WandExport MagickWand *MagickMorphImages(MagickWand *wand,
6519 const size_t number_frames)
6524 assert(wand != (MagickWand *) NULL);
6525 assert(wand->signature == WandSignature);
6526 if (wand->debug != MagickFalse)
6527 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6528 if (wand->images == (Image *) NULL)
6529 return((MagickWand *) NULL);
6530 morph_image=MorphImages(wand->images,number_frames,wand->exception);
6531 if (morph_image == (Image *) NULL)
6532 return((MagickWand *) NULL);
6533 return(CloneMagickWandFromImages(wand,morph_image));
6537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6541 % M a g i c k M o r p h o l o g y I m a g e %
6545 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6547 % MagickMorphologyImage() applies a user supplied kernel to the image
6548 % according to the given mophology method.
6550 % The format of the MagickMorphologyImage method is:
6552 % MagickBooleanType MagickMorphologyImage(MagickWand *wand,
6553 % MorphologyMethod method,const ssize_t iterations,KernelInfo *kernel)
6555 % A description of each parameter follows:
6557 % o wand: the magick wand.
6559 % o method: the morphology method to be applied.
6561 % o iterations: apply the operation this many times (or no change).
6562 % A value of -1 means loop until no change found. How this is applied
6563 % may depend on the morphology method. Typically this is a value of 1.
6565 % o kernel: An array of doubles representing the morphology kernel.
6568 WandExport MagickBooleanType MagickMorphologyImage(MagickWand *wand,
6569 MorphologyMethod method,const ssize_t iterations,KernelInfo *kernel)
6574 assert(wand != (MagickWand *) NULL);
6575 assert(wand->signature == WandSignature);
6576 if (wand->debug != MagickFalse)
6577 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6578 if (kernel == (const KernelInfo *) NULL)
6579 return(MagickFalse);
6580 if (wand->images == (Image *) NULL)
6581 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6582 morphology_image=MorphologyImage(wand->images,method,iterations,kernel,
6584 if (morphology_image == (Image *) NULL)
6585 return(MagickFalse);
6586 ReplaceImageInList(&wand->images,morphology_image);
6591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6595 % M a g i c k M o t i o n B l u r I m a g e %
6599 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6601 % MagickMotionBlurImage() simulates motion blur. We convolve the image with a
6602 % Gaussian operator of the given radius and standard deviation (sigma).
6603 % For reasonable results, radius should be larger than sigma. Use a
6604 % radius of 0 and MotionBlurImage() selects a suitable radius for you.
6605 % Angle gives the angle of the blurring motion.
6607 % The format of the MagickMotionBlurImage method is:
6609 % MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
6610 % const double radius,const double sigma,const double angle,
6611 % const double bias)
6613 % A description of each parameter follows:
6615 % o wand: the magick wand.
6617 % o radius: the radius of the Gaussian, in pixels, not counting
6620 % o sigma: the standard deviation of the Gaussian, in pixels.
6622 % o angle: Apply the effect along this angle.
6625 WandExport MagickBooleanType MagickMotionBlurImage(MagickWand *wand,
6626 const double radius,const double sigma,const double angle,const double bias)
6631 assert(wand != (MagickWand *) NULL);
6632 assert(wand->signature == WandSignature);
6633 if (wand->debug != MagickFalse)
6634 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6635 if (wand->images == (Image *) NULL)
6636 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6637 blur_image=MotionBlurImage(wand->images,radius,sigma,angle,bias,
6639 if (blur_image == (Image *) NULL)
6640 return(MagickFalse);
6641 ReplaceImageInList(&wand->images,blur_image);
6646 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6650 % M a g i c k N e g a t e I m a g e %
6654 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6656 % MagickNegateImage() negates the colors in the reference image. The
6657 % Grayscale option means that only grayscale values within the image are
6660 % You can also reduce the influence of a particular channel with a gamma
6663 % The format of the MagickNegateImage method is:
6665 % MagickBooleanType MagickNegateImage(MagickWand *wand,
6666 % const MagickBooleanType gray)
6668 % A description of each parameter follows:
6670 % o wand: the magick wand.
6672 % o gray: If MagickTrue, only negate grayscale pixels within the image.
6675 WandExport MagickBooleanType MagickNegateImage(MagickWand *wand,
6676 const MagickBooleanType gray)
6681 assert(wand != (MagickWand *) NULL);
6682 assert(wand->signature == WandSignature);
6683 if (wand->debug != MagickFalse)
6684 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6685 if (wand->images == (Image *) NULL)
6686 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6687 status=NegateImage(wand->images,gray,wand->exception);
6692 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6696 % M a g i c k N e w I m a g e %
6700 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6702 % MagickNewImage() adds a blank image canvas of the specified size and
6703 % background color to the wand.
6705 % The format of the MagickNewImage method is:
6707 % MagickBooleanType MagickNewImage(MagickWand *wand,
6708 % const size_t columns,const size_t rows,
6709 % const PixelWand *background)
6711 % A description of each parameter follows:
6713 % o wand: the magick wand.
6715 % o width: the image width.
6717 % o height: the image height.
6719 % o background: the image color.
6722 WandExport MagickBooleanType MagickNewImage(MagickWand *wand,const size_t width,
6723 const size_t height,const PixelWand *background)
6731 assert(wand != (MagickWand *) NULL);
6732 assert(wand->signature == WandSignature);
6733 if (wand->debug != MagickFalse)
6734 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6735 PixelGetMagickColor(background,&pixel);
6736 images=NewMagickImage(wand->image_info,width,height,&pixel,wand->exception);
6737 if (images == (Image *) NULL)
6738 return(MagickFalse);
6739 return(InsertImageInWand(wand,images));
6743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6747 % M a g i c k N e x t I m a g e %
6751 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6753 % MagickNextImage() associates the next image in the image list with a magick
6754 % wand. It returns true if the it succeeds, meaning the current image is the
6755 % next image to be iterated over.
6757 % The format of the MagickNextImage method is:
6759 % MagickBooleanType MagickNextImage(MagickWand *wand)
6761 % A description of each parameter follows:
6763 % o wand: the magick wand.
6766 WandExport MagickBooleanType MagickNextImage(MagickWand *wand)
6768 assert(wand != (MagickWand *) NULL);
6769 assert(wand->signature == WandSignature);
6770 if (wand->debug != MagickFalse)
6771 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6772 if (wand->images == (Image *) NULL)
6773 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6774 /* If current image is 'pending' just return true. */
6775 if (wand->image_pending != MagickFalse)
6777 wand->image_pending=MagickFalse;
6780 /* If there is no next image, (Iterator is finished) */
6781 if (GetNextImageInList(wand->images) == (Image *) NULL)
6782 return(MagickFalse);
6783 /* just move to next image - current image is not 'pending' */
6784 wand->images=GetNextImageInList(wand->images);
6789 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6793 % M a g i c k N o r m a l i z e I m a g e %
6797 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6799 % MagickNormalizeImage() enhances the contrast of a color image by adjusting
6800 % the pixels color to span the entire range of colors available
6802 % You can also reduce the influence of a particular channel with a gamma
6805 % The format of the MagickNormalizeImage method is:
6807 % MagickBooleanType MagickNormalizeImage(MagickWand *wand)
6809 % A description of each parameter follows:
6811 % o wand: the magick wand.
6814 WandExport MagickBooleanType MagickNormalizeImage(MagickWand *wand)
6819 assert(wand != (MagickWand *) NULL);
6820 assert(wand->signature == WandSignature);
6821 if (wand->debug != MagickFalse)
6822 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6823 if (wand->images == (Image *) NULL)
6824 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6825 status=NormalizeImage(wand->images,wand->exception);
6830 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6834 % M a g i c k O i l P a i n t I m a g e %
6838 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6840 % MagickOilPaintImage() applies a special effect filter that simulates an oil
6841 % painting. Each pixel is replaced by the most frequent color occurring
6842 % in a circular region defined by radius.
6844 % The format of the MagickOilPaintImage method is:
6846 % MagickBooleanType MagickOilPaintImage(MagickWand *wand,
6847 % const double radius,const double sigma)
6849 % A description of each parameter follows:
6851 % o wand: the magick wand.
6853 % o radius: the radius of the circular neighborhood.
6855 % o sigma: the standard deviation of the Gaussian, in pixels.
6858 WandExport MagickBooleanType MagickOilPaintImage(MagickWand *wand,
6859 const double radius,const double sigma)
6864 assert(wand != (MagickWand *) NULL);
6865 assert(wand->signature == WandSignature);
6866 if (wand->debug != MagickFalse)
6867 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6868 if (wand->images == (Image *) NULL)
6869 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6870 paint_image=OilPaintImage(wand->images,radius,sigma,wand->exception);
6871 if (paint_image == (Image *) NULL)
6872 return(MagickFalse);
6873 ReplaceImageInList(&wand->images,paint_image);
6878 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6882 % M a g i c k O p a q u e P a i n t I m a g e %
6886 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6888 % MagickOpaquePaintImage() changes any pixel that matches color with the color
6891 % The format of the MagickOpaquePaintImage method is:
6893 % MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
6894 % const PixelWand *target,const PixelWand *fill,const double fuzz,
6895 % const MagickBooleanType invert)
6897 % A description of each parameter follows:
6899 % o wand: the magick wand.
6901 % o target: Change this target color to the fill color within the image.
6903 % o fill: the fill pixel wand.
6905 % o fuzz: By default target must match a particular pixel color
6906 % exactly. However, in many cases two colors may differ by a small amount.
6907 % The fuzz member of image defines how much tolerance is acceptable to
6908 % consider two colors as the same. For example, set fuzz to 10 and the
6909 % color red at intensities of 100 and 102 respectively are now interpreted
6910 % as the same color for the purposes of the floodfill.
6912 % o invert: paint any pixel that does not match the target color.
6915 WandExport MagickBooleanType MagickOpaquePaintImage(MagickWand *wand,
6916 const PixelWand *target,const PixelWand *fill,const double fuzz,
6917 const MagickBooleanType invert)
6926 assert(wand != (MagickWand *) NULL);
6927 assert(wand->signature == WandSignature);
6928 if (wand->debug != MagickFalse)
6929 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6930 if (wand->images == (Image *) NULL)
6931 ThrowWandException(WandError,"ContainsNoImages",wand->name);
6932 PixelGetMagickColor(target,&target_pixel);
6933 PixelGetMagickColor(fill,&fill_pixel);
6934 wand->images->fuzz=fuzz;
6935 status=OpaquePaintImage(wand->images,&target_pixel,&fill_pixel,invert,
6941 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6945 % 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 %
6949 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6951 % MagickOptimizeImageLayers() compares each image the GIF disposed forms of the
6952 % previous image in the sequence. From this it attempts to select the
6953 % smallest cropped image to replace each frame, while preserving the results
6956 % The format of the MagickOptimizeImageLayers method is:
6958 % MagickWand *MagickOptimizeImageLayers(MagickWand *wand)
6960 % A description of each parameter follows:
6962 % o wand: the magick wand.
6965 WandExport MagickWand *MagickOptimizeImageLayers(MagickWand *wand)
6970 assert(wand != (MagickWand *) NULL);
6971 assert(wand->signature == WandSignature);
6972 if (wand->debug != MagickFalse)
6973 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
6974 if (wand->images == (Image *) NULL)
6975 return((MagickWand *) NULL);
6976 optimize_image=OptimizeImageLayers(wand->images,wand->exception);
6977 if (optimize_image == (Image *) NULL)
6978 return((MagickWand *) NULL);
6979 return(CloneMagickWandFromImages(wand,optimize_image));
6983 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6987 % M a g i c k O r d e r e d P o s t e r i z e I m a g e %
6991 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6993 % MagickOrderedPosterizeImage() performs an ordered dither based on a number
6994 % of pre-defined dithering threshold maps, but over multiple intensity levels,
6995 % which can be different for different channels, according to the input
6998 % The format of the MagickOrderedPosterizeImage method is:
7000 % MagickBooleanType MagickOrderedPosterizeImage(MagickWand *wand,
7001 % const char *threshold_map)
7003 % A description of each parameter follows:
7005 % o image: the image.
7007 % o threshold_map: A string containing the name of the threshold dither
7008 % map to use, followed by zero or more numbers representing the number of
7009 % color levels tho dither between.
7011 % Any level number less than 2 is equivalent to 2, and means only binary
7012 % dithering will be applied to each color channel.
7014 % No numbers also means a 2 level (bitmap) dither will be applied to all
7015 % channels, while a single number is the number of levels applied to each
7016 % channel in sequence. More numbers will be applied in turn to each of
7017 % the color channels.
7019 % For example: "o3x3,6" generates a 6 level posterization of the image
7020 % with a ordered 3x3 diffused pixel dither being applied between each
7021 % level. While checker,8,8,4 will produce a 332 colormaped image with
7022 % only a single checkerboard hash pattern (50% grey) between each color
7023 % level, to basically double the number of color levels with a bare
7024 % minimim of dithering.
7027 WandExport MagickBooleanType MagickOrderedPosterizeImage(MagickWand *wand,
7028 const char *threshold_map)
7033 assert(wand != (MagickWand *) NULL);
7034 assert(wand->signature == WandSignature);
7035 if (wand->debug != MagickFalse)
7036 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7037 if (wand->images == (Image *) NULL)
7038 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7039 status=OrderedPosterizeImage(wand->images,threshold_map,wand->exception);
7044 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7048 % M a g i c k P i n g I m a g e %
7052 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7054 % MagickPingImage() is the same as MagickReadImage() except the only valid
7055 % information returned is the image width, height, size, and format. It
7056 % is designed to efficiently obtain this information from a file without
7057 % reading the entire image sequence into memory.
7059 % The format of the MagickPingImage method is:
7061 % MagickBooleanType MagickPingImage(MagickWand *wand,const char *filename)
7063 % A description of each parameter follows:
7065 % o wand: the magick wand.
7067 % o filename: the image filename.
7070 WandExport MagickBooleanType MagickPingImage(MagickWand *wand,
7071 const char *filename)
7079 assert(wand != (MagickWand *) NULL);
7080 assert(wand->signature == WandSignature);
7081 if (wand->debug != MagickFalse)
7082 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7083 ping_info=CloneImageInfo(wand->image_info);
7084 if (filename != (const char *) NULL)
7085 (void) CopyMagickString(ping_info->filename,filename,MaxTextExtent);
7086 images=PingImage(ping_info,wand->exception);
7087 ping_info=DestroyImageInfo(ping_info);
7088 if (images == (Image *) NULL)
7089 return(MagickFalse);
7090 return(InsertImageInWand(wand,images));
7094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7098 % M a g i c k P i n g I m a g e B l o b %
7102 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7104 % MagickPingImageBlob() pings an image or image sequence from a blob.
7106 % The format of the MagickPingImageBlob method is:
7108 % MagickBooleanType MagickPingImageBlob(MagickWand *wand,
7109 % const void *blob,const size_t length)
7111 % A description of each parameter follows:
7113 % o wand: the magick wand.
7117 % o length: the blob length.
7120 WandExport MagickBooleanType MagickPingImageBlob(MagickWand *wand,
7121 const void *blob,const size_t length)
7129 assert(wand != (MagickWand *) NULL);
7130 assert(wand->signature == WandSignature);
7131 if (wand->debug != MagickFalse)
7132 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7133 read_info=CloneImageInfo(wand->image_info);
7134 SetImageInfoBlob(read_info,blob,length);
7135 images=PingImage(read_info,wand->exception);
7136 read_info=DestroyImageInfo(read_info);
7137 if (images == (Image *) NULL)
7138 return(MagickFalse);
7139 return(InsertImageInWand(wand,images));
7143 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7147 % M a g i c k P i n g I m a g e F i l e %
7151 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7153 % MagickPingImageFile() pings an image or image sequence from an open file
7156 % The format of the MagickPingImageFile method is:
7158 % MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
7160 % A description of each parameter follows:
7162 % o wand: the magick wand.
7164 % o file: the file descriptor.
7167 WandExport MagickBooleanType MagickPingImageFile(MagickWand *wand,FILE *file)
7175 assert(wand != (MagickWand *) NULL);
7176 assert(wand->signature == WandSignature);
7177 assert(file != (FILE *) NULL);
7178 if (wand->debug != MagickFalse)
7179 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7180 read_info=CloneImageInfo(wand->image_info);
7181 SetImageInfoFile(read_info,file);
7182 images=PingImage(read_info,wand->exception);
7183 read_info=DestroyImageInfo(read_info);
7184 if (images == (Image *) NULL)
7185 return(MagickFalse);
7186 return(InsertImageInWand(wand,images));
7190 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7194 % M a g i c k P o l a r o i d I m a g e %
7198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7200 % MagickPolaroidImage() simulates a Polaroid picture.
7202 % The format of the MagickPolaroidImage method is:
7204 % MagickBooleanType MagickPolaroidImage(MagickWand *wand,
7205 % const DrawingWand *drawing_wand,const double angle,
7206 % const PixelInterpolateMethod method)
7208 % A description of each parameter follows:
7210 % o wand: the magick wand.
7212 % o drawing_wand: the draw wand.
7214 % o angle: Apply the effect along this angle.
7216 % o method: the pixel interpolation method.
7219 WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand,
7220 const DrawingWand *drawing_wand,const double angle,
7221 const PixelInterpolateMethod method)
7229 assert(wand != (MagickWand *) NULL);
7230 assert(wand->signature == WandSignature);
7231 if (wand->debug != MagickFalse)
7232 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7233 if (wand->images == (Image *) NULL)
7234 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7235 draw_info=PeekDrawingWand(drawing_wand);
7236 if (draw_info == (DrawInfo *) NULL)
7237 return(MagickFalse);
7238 polaroid_image=PolaroidImage(wand->images,draw_info,angle,method,
7240 if (polaroid_image == (Image *) NULL)
7241 return(MagickFalse);
7242 ReplaceImageInList(&wand->images,polaroid_image);
7247 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7251 % M a g i c k P o s t e r i z e I m a g e %
7255 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7257 % MagickPosterizeImage() reduces the image to a limited number of color level.
7259 % The format of the MagickPosterizeImage method is:
7261 % MagickBooleanType MagickPosterizeImage(MagickWand *wand,
7262 % const unsigned levels,const MagickBooleanType dither)
7264 % A description of each parameter follows:
7266 % o wand: the magick wand.
7268 % o levels: Number of color levels allowed in each channel. Very low values
7269 % (2, 3, or 4) have the most visible effect.
7271 % o dither: Set this integer value to something other than zero to dither
7275 WandExport MagickBooleanType MagickPosterizeImage(MagickWand *wand,
7276 const size_t levels,const MagickBooleanType dither)
7281 assert(wand != (MagickWand *) NULL);
7282 assert(wand->signature == WandSignature);
7283 if (wand->debug != MagickFalse)
7284 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7285 if (wand->images == (Image *) NULL)
7286 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7287 status=PosterizeImage(wand->images,levels,dither,wand->exception);
7292 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7296 % M a g i c k P r e v i e w I m a g e s %
7300 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7302 % MagickPreviewImages() tiles 9 thumbnails of the specified image with an
7303 % image processing operation applied at varying strengths. This helpful
7304 % to quickly pin-point an appropriate parameter for an image processing
7307 % The format of the MagickPreviewImages method is:
7309 % MagickWand *MagickPreviewImages(MagickWand *wand,
7310 % const PreviewType preview)
7312 % A description of each parameter follows:
7314 % o wand: the magick wand.
7316 % o preview: the preview type.
7319 WandExport MagickWand *MagickPreviewImages(MagickWand *wand,
7320 const PreviewType preview)
7325 assert(wand != (MagickWand *) NULL);
7326 assert(wand->signature == WandSignature);
7327 if (wand->debug != MagickFalse)
7328 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7329 if (wand->images == (Image *) NULL)
7330 return((MagickWand *) NULL);
7331 preview_image=PreviewImage(wand->images,preview,wand->exception);
7332 if (preview_image == (Image *) NULL)
7333 return((MagickWand *) NULL);
7334 return(CloneMagickWandFromImages(wand,preview_image));
7338 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7342 % M a g i c k P r e v i o u s I m a g e %
7346 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7348 % MagickPreviousImage() assocates the previous image in an image list with
7351 % The format of the MagickPreviousImage method is:
7353 % MagickBooleanType MagickPreviousImage(MagickWand *wand)
7355 % A description of each parameter follows:
7357 % o wand: the magick wand.
7360 WandExport MagickBooleanType MagickPreviousImage(MagickWand *wand)
7362 assert(wand != (MagickWand *) NULL);
7363 assert(wand->signature == WandSignature);
7364 if (wand->debug != MagickFalse)
7365 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7366 if (wand->images == (Image *) NULL)
7367 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7369 wand->image_pending=MagickFalse; /* pending status has no meaning */
7370 /* If there is no prev image, return false (Iterator is finished) */
7371 if (GetPreviousImageInList(wand->images) == (Image *) NULL)
7372 return(MagickFalse);
7373 /* just do it - current image is not 'pending' */
7374 wand->images=GetPreviousImageInList(wand->images);
7379 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7383 % M a g i c k Q u a n t i z e I m a g e %
7387 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7389 % MagickQuantizeImage() analyzes the colors within a reference image and
7390 % chooses a fixed number of colors to represent the image. The goal of the
7391 % algorithm is to minimize the color difference between the input and output
7392 % image while minimizing the processing time.
7394 % The format of the MagickQuantizeImage method is:
7396 % MagickBooleanType MagickQuantizeImage(MagickWand *wand,
7397 % const size_t number_colors,const ColorspaceType colorspace,
7398 % const size_t treedepth,const MagickBooleanType dither,
7399 % const MagickBooleanType measure_error)
7401 % A description of each parameter follows:
7403 % o wand: the magick wand.
7405 % o number_colors: the number of colors.
7407 % o colorspace: Perform color reduction in this colorspace, typically
7410 % o treedepth: Normally, this integer value is zero or one. A zero or
7411 % 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
7412 % reference image with the least amount of memory and the fastest
7413 % computational speed. In some cases, such as an image with low color
7414 % dispersion (a few number of colors), a value other than
7415 % Log4(number_colors) is required. To expand the color tree completely,
7418 % o dither: A value other than zero distributes the difference between an
7419 % original image and the corresponding color reduced image to
7420 % neighboring pixels along a Hilbert curve.
7422 % o measure_error: A value other than zero measures the difference between
7423 % the original and quantized images. This difference is the total
7424 % quantization error. The error is computed by summing over all pixels
7425 % in an image the distance squared in RGB space between each reference
7426 % pixel value and its quantized value.
7429 WandExport MagickBooleanType MagickQuantizeImage(MagickWand *wand,
7430 const size_t number_colors,const ColorspaceType colorspace,
7431 const size_t treedepth,const MagickBooleanType dither,
7432 const MagickBooleanType measure_error)
7440 assert(wand != (MagickWand *) NULL);
7441 assert(wand->signature == WandSignature);
7442 if (wand->debug != MagickFalse)
7443 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7444 if (wand->images == (Image *) NULL)
7445 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7446 quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
7447 quantize_info->number_colors=number_colors;
7448 quantize_info->dither=dither;
7449 quantize_info->tree_depth=treedepth;
7450 quantize_info->colorspace=colorspace;
7451 quantize_info->measure_error=measure_error;
7452 status=QuantizeImage(quantize_info,wand->images,wand->exception);
7453 quantize_info=DestroyQuantizeInfo(quantize_info);
7458 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7462 % M a g i c k Q u a n t i z e I m a g e s %
7466 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7468 % MagickQuantizeImages() analyzes the colors within a sequence of images and
7469 % chooses a fixed number of colors to represent the image. The goal of the
7470 % algorithm is to minimize the color difference between the input and output
7471 % image while minimizing the processing time.
7473 % The format of the MagickQuantizeImages method is:
7475 % MagickBooleanType MagickQuantizeImages(MagickWand *wand,
7476 % const size_t number_colors,const ColorspaceType colorspace,
7477 % const size_t treedepth,const MagickBooleanType dither,
7478 % const MagickBooleanType measure_error)
7480 % A description of each parameter follows:
7482 % o wand: the magick wand.
7484 % o number_colors: the number of colors.
7486 % o colorspace: Perform color reduction in this colorspace, typically
7489 % o treedepth: Normally, this integer value is zero or one. A zero or
7490 % 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
7491 % reference image with the least amount of memory and the fastest
7492 % computational speed. In some cases, such as an image with low color
7493 % dispersion (a few number of colors), a value other than
7494 % Log4(number_colors) is required. To expand the color tree completely,
7497 % o dither: A value other than zero distributes the difference between an
7498 % original image and the corresponding color reduced algorithm to
7499 % neighboring pixels along a Hilbert curve.
7501 % o measure_error: A value other than zero measures the difference between
7502 % the original and quantized images. This difference is the total
7503 % quantization error. The error is computed by summing over all pixels
7504 % in an image the distance squared in RGB space between each reference
7505 % pixel value and its quantized value.
7508 WandExport MagickBooleanType MagickQuantizeImages(MagickWand *wand,
7509 const size_t number_colors,const ColorspaceType colorspace,
7510 const size_t treedepth,const MagickBooleanType dither,
7511 const MagickBooleanType measure_error)
7519 assert(wand != (MagickWand *) NULL);
7520 assert(wand->signature == WandSignature);
7521 if (wand->debug != MagickFalse)
7522 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7523 if (wand->images == (Image *) NULL)
7524 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7525 quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);
7526 quantize_info->number_colors=number_colors;
7527 quantize_info->dither=dither;
7528 quantize_info->tree_depth=treedepth;
7529 quantize_info->colorspace=colorspace;
7530 quantize_info->measure_error=measure_error;
7531 status=QuantizeImages(quantize_info,wand->images,wand->exception);
7532 quantize_info=DestroyQuantizeInfo(quantize_info);
7537 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7541 % M a g i c k R a d i a l B l u r I m a g e %
7545 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7547 % MagickRadialBlurImage() radial blurs an image.
7549 % The format of the MagickRadialBlurImage method is:
7551 % MagickBooleanType MagickRadialBlurImage(MagickWand *wand,
7552 % const double angle,const double bias)
7554 % A description of each parameter follows:
7556 % o wand: the magick wand.
7558 % o angle: the angle of the blur in degrees.
7563 WandExport MagickBooleanType MagickRadialBlurImage(MagickWand *wand,
7564 const double angle,const double bias)
7569 assert(wand != (MagickWand *) NULL);
7570 assert(wand->signature == WandSignature);
7571 if (wand->debug != MagickFalse)
7572 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7573 if (wand->images == (Image *) NULL)
7574 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7575 blur_image=RadialBlurImage(wand->images,angle,bias,wand->exception);
7576 if (blur_image == (Image *) NULL)
7577 return(MagickFalse);
7578 ReplaceImageInList(&wand->images,blur_image);
7583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7587 % M a g i c k R a i s e I m a g e %
7591 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7593 % MagickRaiseImage() creates a simulated three-dimensional button-like effect
7594 % by lightening and darkening the edges of the image. Members width and
7595 % height of raise_info define the width of the vertical and horizontal
7596 % edge of the effect.
7598 % The format of the MagickRaiseImage method is:
7600 % MagickBooleanType MagickRaiseImage(MagickWand *wand,
7601 % const size_t width,const size_t height,const ssize_t x,
7602 % const ssize_t y,const MagickBooleanType raise)
7604 % A description of each parameter follows:
7606 % o wand: the magick wand.
7608 % o width,height,x,y: Define the dimensions of the area to raise.
7610 % o raise: A value other than zero creates a 3-D raise effect,
7611 % otherwise it has a lowered effect.
7614 WandExport MagickBooleanType MagickRaiseImage(MagickWand *wand,
7615 const size_t width,const size_t height,const ssize_t x,
7616 const ssize_t y,const MagickBooleanType raise)
7624 assert(wand != (MagickWand *) NULL);
7625 assert(wand->signature == WandSignature);
7626 if (wand->debug != MagickFalse)
7627 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7628 if (wand->images == (Image *) NULL)
7629 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7630 raise_info.width=width;
7631 raise_info.height=height;
7634 status=RaiseImage(wand->images,&raise_info,raise,wand->exception);
7639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7643 % 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 %
7647 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7649 % MagickRandomThresholdImage() changes the value of individual pixels based on
7650 % the intensity of each pixel compared to threshold. The result is a
7651 % high-contrast, two color image.
7653 % The format of the MagickRandomThresholdImage method is:
7655 % MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
7656 % const double low,const double high)
7658 % A description of each parameter follows:
7660 % o wand: the magick wand.
7662 % o low,high: Specify the high and low thresholds. These values range from
7663 % 0 to QuantumRange.
7666 WandExport MagickBooleanType MagickRandomThresholdImage(MagickWand *wand,
7667 const double low,const double high)
7670 threshold[MaxTextExtent];
7672 assert(wand != (MagickWand *) NULL);
7673 assert(wand->signature == WandSignature);
7674 if (wand->debug != MagickFalse)
7675 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7676 if (wand->images == (Image *) NULL)
7677 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7678 (void) FormatLocaleString(threshold,MaxTextExtent,"%gx%g",low,high);
7679 return(RandomThresholdImage(wand->images,threshold,wand->exception));
7683 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7687 % M a g i c k R e a d I m a g e %
7691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7693 % MagickReadImage() reads an image or image sequence. The images are inserted
7694 % at the current image pointer position.
7696 % Use MagickSetFirstIterator(), to insert new images before all the current
7697 % images in the wand, MagickSetLastIterator() to append add to the end,
7698 % MagickSetImageIndex() to place images just after the given index.
7700 % The format of the MagickReadImage method is:
7702 % MagickBooleanType MagickReadImage(MagickWand *wand,const char *filename)
7704 % A description of each parameter follows:
7706 % o wand: the magick wand.
7708 % o filename: the image filename.
7711 WandExport MagickBooleanType MagickReadImage(MagickWand *wand,
7712 const char *filename)
7720 assert(wand != (MagickWand *) NULL);
7721 assert(wand->signature == WandSignature);
7722 if (wand->debug != MagickFalse)
7723 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7724 read_info=CloneImageInfo(wand->image_info);
7725 if (filename != (const char *) NULL)
7726 (void) CopyMagickString(read_info->filename,filename,MaxTextExtent);
7727 images=ReadImage(read_info,wand->exception);
7728 read_info=DestroyImageInfo(read_info);
7729 if (images == (Image *) NULL)
7730 return(MagickFalse);
7731 return(InsertImageInWand(wand,images));
7735 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7739 % M a g i c k R e a d I m a g e B l o b %
7743 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7745 % MagickReadImageBlob() reads an image or image sequence from a blob.
7746 % In all other respects it is like MagickReadImage().
7748 % The format of the MagickReadImageBlob method is:
7750 % MagickBooleanType MagickReadImageBlob(MagickWand *wand,
7751 % const void *blob,const size_t length)
7753 % A description of each parameter follows:
7755 % o wand: the magick wand.
7759 % o length: the blob length.
7762 WandExport MagickBooleanType MagickReadImageBlob(MagickWand *wand,
7763 const void *blob,const size_t length)
7768 assert(wand != (MagickWand *) NULL);
7769 assert(wand->signature == WandSignature);
7770 if (wand->debug != MagickFalse)
7771 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7772 images=BlobToImage(wand->image_info,blob,length,wand->exception);
7773 if (images == (Image *) NULL)
7774 return(MagickFalse);
7775 return(InsertImageInWand(wand,images));
7779 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7783 % M a g i c k R e a d I m a g e F i l e %
7787 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7789 % MagickReadImageFile() reads an image or image sequence from an already
7790 % opened file descriptor. Otherwise it is like MagickReadImage().
7792 % The format of the MagickReadImageFile method is:
7794 % MagickBooleanType MagickReadImageFile(MagickWand *wand,FILE *file)
7796 % A description of each parameter follows:
7798 % o wand: the magick wand.
7800 % o file: the file descriptor.
7803 WandExport MagickBooleanType MagickReadImageFile(MagickWand *wand,FILE *file)
7811 assert(wand != (MagickWand *) NULL);
7812 assert(wand->signature == WandSignature);
7813 assert(file != (FILE *) NULL);
7814 if (wand->debug != MagickFalse)
7815 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7816 read_info=CloneImageInfo(wand->image_info);
7817 SetImageInfoFile(read_info,file);
7818 images=ReadImage(read_info,wand->exception);
7819 read_info=DestroyImageInfo(read_info);
7820 if (images == (Image *) NULL)
7821 return(MagickFalse);
7822 return(InsertImageInWand(wand,images));
7826 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7830 % M a g i c k R e m a p I m a g e %
7834 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7836 % MagickRemapImage() replaces the colors of an image with the closest color
7837 % from a reference image.
7839 % The format of the MagickRemapImage method is:
7841 % MagickBooleanType MagickRemapImage(MagickWand *wand,
7842 % const MagickWand *remap_wand,const DitherMethod method)
7844 % A description of each parameter follows:
7846 % o wand: the magick wand.
7848 % o affinity: the affinity wand.
7850 % o method: choose from these dither methods: NoDitherMethod,
7851 % RiemersmaDitherMethod, or FloydSteinbergDitherMethod.
7854 WandExport MagickBooleanType MagickRemapImage(MagickWand *wand,
7855 const MagickWand *remap_wand,const DitherMethod method)
7863 assert(wand != (MagickWand *) NULL);
7864 assert(wand->signature == WandSignature);
7865 if (wand->debug != MagickFalse)
7866 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7867 if ((wand->images == (Image *) NULL) ||
7868 (remap_wand->images == (Image *) NULL))
7869 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7870 quantize_info=AcquireQuantizeInfo(wand->image_info);
7871 quantize_info->dither_method=method;
7872 if (method == NoDitherMethod)
7873 quantize_info->dither=MagickFalse;
7874 status=RemapImage(quantize_info,wand->images,remap_wand->images,
7876 quantize_info=DestroyQuantizeInfo(quantize_info);
7881 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7885 % M a g i c k R e m o v e I m a g e %
7889 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7891 % MagickRemoveImage() removes an image from the image list.
7893 % The format of the MagickRemoveImage method is:
7895 % MagickBooleanType MagickRemoveImage(MagickWand *wand)
7897 % A description of each parameter follows:
7899 % o wand: the magick wand.
7901 % o insert: the splice wand.
7904 WandExport MagickBooleanType MagickRemoveImage(MagickWand *wand)
7906 assert(wand != (MagickWand *) NULL);
7907 assert(wand->signature == WandSignature);
7908 if (wand->debug != MagickFalse)
7909 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7910 if (wand->images == (Image *) NULL)
7911 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7912 DeleteImageFromList(&wand->images);
7917 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7921 % M a g i c k R e s a m p l e I m a g e %
7925 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7927 % MagickResampleImage() resample image to desired resolution.
7929 % Bessel Blackman Box
7930 % Catrom Cubic Gaussian
7931 % Hanning Hermite Lanczos
7932 % Mitchell Point Quandratic
7935 % Most of the filters are FIR (finite impulse response), however, Bessel,
7936 % Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc
7937 % are windowed (brought down to zero) with the Blackman filter.
7939 % The format of the MagickResampleImage method is:
7941 % MagickBooleanType MagickResampleImage(MagickWand *wand,
7942 % const double x_resolution,const double y_resolution,
7943 % const FilterTypes filter,const double blur)
7945 % A description of each parameter follows:
7947 % o wand: the magick wand.
7949 % o x_resolution: the new image x resolution.
7951 % o y_resolution: the new image y resolution.
7953 % o filter: Image filter to use.
7955 % o blur: the blur factor where > 1 is blurry, < 1 is sharp.
7958 WandExport MagickBooleanType MagickResampleImage(MagickWand *wand,
7959 const double x_resolution,const double y_resolution,const FilterTypes filter,
7965 assert(wand != (MagickWand *) NULL);
7966 assert(wand->signature == WandSignature);
7967 if (wand->debug != MagickFalse)
7968 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
7969 if (wand->images == (Image *) NULL)
7970 ThrowWandException(WandError,"ContainsNoImages",wand->name);
7971 resample_image=ResampleImage(wand->images,x_resolution,y_resolution,filter,
7972 blur,wand->exception);
7973 if (resample_image == (Image *) NULL)
7974 return(MagickFalse);
7975 ReplaceImageInList(&wand->images,resample_image);
7980 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7984 % M a g i c k R e s e t I m a g e P a g e %
7988 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7990 % MagickResetImagePage() resets the Wand page canvas and position.
7992 % The format of the MagickResetImagePage method is:
7994 % MagickBooleanType MagickResetImagePage(MagickWand *wand,
7997 % A description of each parameter follows:
7999 % o wand: the magick wand.
8001 % o page: the relative page specification.
8004 WandExport MagickBooleanType MagickResetImagePage(MagickWand *wand,
8007 assert(wand != (MagickWand *) NULL);
8008 assert(wand->signature == WandSignature);
8009 if (wand->debug != MagickFalse)
8010 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8011 if (wand->images == (Image *) NULL)
8012 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8013 if ((page == (char *) NULL) || (*page == '\0'))
8015 (void) ParseAbsoluteGeometry("0x0+0+0",&wand->images->page);
8018 return(ResetImagePage(wand->images,page));
8022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8026 % M a g i c k R e s i z e I m a g e %
8030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8032 % MagickResizeImage() scales an image to the desired dimensions with one of
8035 % Bessel Blackman Box
8036 % Catrom Cubic Gaussian
8037 % Hanning Hermite Lanczos
8038 % Mitchell Point Quandratic
8041 % Most of the filters are FIR (finite impulse response), however, Bessel,
8042 % Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc
8043 % are windowed (brought down to zero) with the Blackman filter.
8045 % The format of the MagickResizeImage method is:
8047 % MagickBooleanType MagickResizeImage(MagickWand *wand,
8048 % const size_t columns,const size_t rows,
8049 % const FilterTypes filter,const double blur)
8051 % A description of each parameter follows:
8053 % o wand: the magick wand.
8055 % o columns: the number of columns in the scaled image.
8057 % o rows: the number of rows in the scaled image.
8059 % o filter: Image filter to use.
8061 % o blur: the blur factor where > 1 is blurry, < 1 is sharp.
8064 WandExport MagickBooleanType MagickResizeImage(MagickWand *wand,
8065 const size_t columns,const size_t rows,const FilterTypes filter,
8071 assert(wand != (MagickWand *) NULL);
8072 assert(wand->signature == WandSignature);
8073 if (wand->debug != MagickFalse)
8074 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8075 if (wand->images == (Image *) NULL)
8076 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8077 resize_image=ResizeImage(wand->images,columns,rows,filter,blur,
8079 if (resize_image == (Image *) NULL)
8080 return(MagickFalse);
8081 ReplaceImageInList(&wand->images,resize_image);
8086 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8090 % M a g i c k R o l l I m a g e %
8094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8096 % MagickRollImage() offsets an image as defined by x and y.
8098 % The format of the MagickRollImage method is:
8100 % MagickBooleanType MagickRollImage(MagickWand *wand,const ssize_t x,
8103 % A description of each parameter follows:
8105 % o wand: the magick wand.
8107 % o x: the x offset.
8109 % o y: the y offset.
8113 WandExport MagickBooleanType MagickRollImage(MagickWand *wand,
8114 const ssize_t x,const ssize_t y)
8119 assert(wand != (MagickWand *) NULL);
8120 assert(wand->signature == WandSignature);
8121 if (wand->debug != MagickFalse)
8122 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8123 if (wand->images == (Image *) NULL)
8124 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8125 roll_image=RollImage(wand->images,x,y,wand->exception);
8126 if (roll_image == (Image *) NULL)
8127 return(MagickFalse);
8128 ReplaceImageInList(&wand->images,roll_image);
8133 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8137 % M a g i c k R o t a t e I m a g e %
8141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8143 % MagickRotateImage() rotates an image the specified number of degrees. Empty
8144 % triangles left over from rotating the image are filled with the
8147 % The format of the MagickRotateImage method is:
8149 % MagickBooleanType MagickRotateImage(MagickWand *wand,
8150 % const PixelWand *background,const double degrees)
8152 % A description of each parameter follows:
8154 % o wand: the magick wand.
8156 % o background: the background pixel wand.
8158 % o degrees: the number of degrees to rotate the image.
8162 WandExport MagickBooleanType MagickRotateImage(MagickWand *wand,
8163 const PixelWand *background,const double degrees)
8168 assert(wand != (MagickWand *) NULL);
8169 assert(wand->signature == WandSignature);
8170 if (wand->debug != MagickFalse)
8171 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8172 if (wand->images == (Image *) NULL)
8173 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8174 PixelGetQuantumPacket(background,&wand->images->background_color);
8175 rotate_image=RotateImage(wand->images,degrees,wand->exception);
8176 if (rotate_image == (Image *) NULL)
8177 return(MagickFalse);
8178 ReplaceImageInList(&wand->images,rotate_image);
8183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8187 % M a g i c k S a m p l e I m a g e %
8191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8193 % MagickSampleImage() scales an image to the desired dimensions with pixel
8194 % sampling. Unlike other scaling methods, this method does not introduce
8195 % any additional color into the scaled image.
8197 % The format of the MagickSampleImage method is:
8199 % MagickBooleanType MagickSampleImage(MagickWand *wand,
8200 % const size_t columns,const size_t rows)
8202 % A description of each parameter follows:
8204 % o wand: the magick wand.
8206 % o columns: the number of columns in the scaled image.
8208 % o rows: the number of rows in the scaled image.
8212 WandExport MagickBooleanType MagickSampleImage(MagickWand *wand,
8213 const size_t columns,const size_t rows)
8218 assert(wand != (MagickWand *) NULL);
8219 assert(wand->signature == WandSignature);
8220 if (wand->debug != MagickFalse)
8221 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8222 if (wand->images == (Image *) NULL)
8223 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8224 sample_image=SampleImage(wand->images,columns,rows,wand->exception);
8225 if (sample_image == (Image *) NULL)
8226 return(MagickFalse);
8227 ReplaceImageInList(&wand->images,sample_image);
8232 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8236 % M a g i c k S c a l e I m a g e %
8240 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8242 % MagickScaleImage() scales the size of an image to the given dimensions.
8244 % The format of the MagickScaleImage method is:
8246 % MagickBooleanType MagickScaleImage(MagickWand *wand,
8247 % const size_t columns,const size_t rows)
8249 % A description of each parameter follows:
8251 % o wand: the magick wand.
8253 % o columns: the number of columns in the scaled image.
8255 % o rows: the number of rows in the scaled image.
8259 WandExport MagickBooleanType MagickScaleImage(MagickWand *wand,
8260 const size_t columns,const size_t rows)
8265 assert(wand != (MagickWand *) NULL);
8266 assert(wand->signature == WandSignature);
8267 if (wand->debug != MagickFalse)
8268 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8269 if (wand->images == (Image *) NULL)
8270 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8271 scale_image=ScaleImage(wand->images,columns,rows,wand->exception);
8272 if (scale_image == (Image *) NULL)
8273 return(MagickFalse);
8274 ReplaceImageInList(&wand->images,scale_image);
8279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8283 % M a g i c k S e g m e n t I m a g e %
8287 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8289 % MagickSegmentImage() segments an image by analyzing the histograms of the
8290 % color components and identifying units that are homogeneous with the fuzzy
8291 % C-means technique.
8293 % The format of the SegmentImage method is:
8295 % MagickBooleanType MagickSegmentImage(MagickWand *wand,
8296 % const ColorspaceType colorspace,const MagickBooleanType verbose,
8297 % const double cluster_threshold,const double smooth_threshold)
8299 % A description of each parameter follows.
8303 % o colorspace: the image colorspace.
8305 % o verbose: Set to MagickTrue to print detailed information about the
8306 % identified classes.
8308 % o cluster_threshold: This represents the minimum number of pixels
8309 % contained in a hexahedra before it can be considered valid (expressed as
8312 % o smooth_threshold: the smoothing threshold eliminates noise in the second
8313 % derivative of the histogram. As the value is increased, you can expect a
8314 % smoother second derivative.
8317 MagickExport MagickBooleanType MagickSegmentImage(MagickWand *wand,
8318 const ColorspaceType colorspace,const MagickBooleanType verbose,
8319 const double cluster_threshold,const double smooth_threshold)
8324 assert(wand != (MagickWand *) NULL);
8325 assert(wand->signature == WandSignature);
8326 if (wand->debug != MagickFalse)
8327 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8328 if (wand->images == (Image *) NULL)
8329 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8330 status=SegmentImage(wand->images,colorspace,verbose,cluster_threshold,
8331 smooth_threshold,wand->exception);
8336 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8340 % M a g i c k S e l e c t i v e B l u r I m a g e %
8344 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8346 % MagickSelectiveBlurImage() selectively blur an image within a contrast
8347 % threshold. It is similar to the unsharpen mask that sharpens everything with
8348 % contrast above a certain threshold.
8350 % The format of the MagickSelectiveBlurImage method is:
8352 % MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
8353 % const double radius,const double sigma,const double threshold,
8354 % const double bias)
8356 % A description of each parameter follows:
8358 % o wand: the magick wand.
8360 % o radius: the radius of the gaussian, in pixels, not counting the center
8363 % o sigma: the standard deviation of the gaussian, in pixels.
8365 % o threshold: only pixels within this contrast threshold are included
8366 % in the blur operation.
8371 WandExport MagickBooleanType MagickSelectiveBlurImage(MagickWand *wand,
8372 const double radius,const double sigma,const double threshold,
8378 assert(wand != (MagickWand *) NULL);
8379 assert(wand->signature == WandSignature);
8380 if (wand->debug != MagickFalse)
8381 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8382 if (wand->images == (Image *) NULL)
8383 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8384 blur_image=SelectiveBlurImage(wand->images,radius,sigma,threshold,bias,
8386 if (blur_image == (Image *) NULL)
8387 return(MagickFalse);
8388 ReplaceImageInList(&wand->images,blur_image);
8393 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8397 % 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 %
8401 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8403 % MagickSeparateImage() separates a channel from the image and returns a
8404 % grayscale image. A channel is a particular color component of each pixel
8407 % The format of the MagickSeparateImage method is:
8409 % MagickBooleanType MagickSeparateImage(MagickWand *wand)
8411 % A description of each parameter follows:
8413 % o wand: the magick wand.
8416 WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand)
8418 assert(wand != (MagickWand *) NULL);
8419 assert(wand->signature == WandSignature);
8420 if (wand->debug != MagickFalse)
8421 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8422 if (wand->images == (Image *) NULL)
8423 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8424 return(SeparateImage(wand->images,wand->exception));
8428 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8432 % M a g i c k S e p i a T o n e I m a g e %
8436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8438 % MagickSepiaToneImage() applies a special effect to the image, similar to the
8439 % effect achieved in a photo darkroom by sepia toning. Threshold ranges from
8440 % 0 to QuantumRange and is a measure of the extent of the sepia toning. A
8441 % threshold of 80% is a good starting point for a reasonable tone.
8443 % The format of the MagickSepiaToneImage method is:
8445 % MagickBooleanType MagickSepiaToneImage(MagickWand *wand,
8446 % const double threshold)
8448 % A description of each parameter follows:
8450 % o wand: the magick wand.
8452 % o threshold: Define the extent of the sepia toning.
8455 WandExport MagickBooleanType MagickSepiaToneImage(MagickWand *wand,
8456 const double threshold)
8461 assert(wand != (MagickWand *) NULL);
8462 assert(wand->signature == WandSignature);
8463 if (wand->debug != MagickFalse)
8464 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8465 if (wand->images == (Image *) NULL)
8466 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8467 sepia_image=SepiaToneImage(wand->images,threshold,wand->exception);
8468 if (sepia_image == (Image *) NULL)
8469 return(MagickFalse);
8470 ReplaceImageInList(&wand->images,sepia_image);
8475 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8479 % M a g i c k S e t I m a g e %
8483 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8485 % MagickSetImage() replaces the last image returned by MagickSetImageIndex(),
8486 % MagickNextImage(), MagickPreviousImage() with the images from the specified
8489 % The format of the MagickSetImage method is:
8491 % MagickBooleanType MagickSetImage(MagickWand *wand,
8492 % const MagickWand *set_wand)
8494 % A description of each parameter follows:
8496 % o wand: the magick wand.
8498 % o set_wand: the set_wand wand.
8501 WandExport MagickBooleanType MagickSetImage(MagickWand *wand,
8502 const MagickWand *set_wand)
8507 assert(wand != (MagickWand *) NULL);
8508 assert(wand->signature == WandSignature);
8509 if (wand->debug != MagickFalse)
8510 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8511 assert(set_wand != (MagickWand *) NULL);
8512 assert(set_wand->signature == WandSignature);
8513 if (wand->debug != MagickFalse)
8514 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",set_wand->name);
8515 if (set_wand->images == (Image *) NULL)
8516 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8517 images=CloneImageList(set_wand->images,wand->exception);
8518 if (images == (Image *) NULL)
8519 return(MagickFalse);
8520 ReplaceImageInList(&wand->images,images);
8525 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8529 % 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 %
8533 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8535 % MagickSetImageAlphaChannel() activates, deactivates, resets, or sets the
8538 % The format of the MagickSetImageAlphaChannel method is:
8540 % MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
8541 % const AlphaChannelType alpha_type)
8543 % A description of each parameter follows:
8545 % o wand: the magick wand.
8547 % o alpha_type: the alpha channel type: ActivateAlphaChannel,
8548 % DeactivateAlphaChannel, OpaqueAlphaChannel, or SetAlphaChannel.
8551 WandExport MagickBooleanType MagickSetImageAlphaChannel(MagickWand *wand,
8552 const AlphaChannelType alpha_type)
8554 assert(wand != (MagickWand *) NULL);
8555 assert(wand->signature == WandSignature);
8556 if (wand->debug != MagickFalse)
8557 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8558 if (wand->images == (Image *) NULL)
8559 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8560 return(SetImageAlphaChannel(wand->images,alpha_type,wand->exception));
8564 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8568 % 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 %
8572 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8574 % MagickSetImageBackgroundColor() sets the image background color.
8576 % The format of the MagickSetImageBackgroundColor method is:
8578 % MagickBooleanType MagickSetImageBackgroundColor(MagickWand *wand,
8579 % const PixelWand *background)
8581 % A description of each parameter follows:
8583 % o wand: the magick wand.
8585 % o background: the background pixel wand.
8588 WandExport MagickBooleanType MagickSetImageBackgroundColor(MagickWand *wand,
8589 const PixelWand *background)
8591 assert(wand != (MagickWand *) NULL);
8592 assert(wand->signature == WandSignature);
8593 if (wand->debug != MagickFalse)
8594 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8595 if (wand->images == (Image *) NULL)
8596 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8597 PixelGetQuantumPacket(background,&wand->images->background_color);
8602 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8606 % M a g i c k S e t I m a g e B i a s %
8610 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8612 % MagickSetImageBias() sets the image bias for any method that convolves an
8613 % image (e.g. MagickConvolveImage()).
8615 % The format of the MagickSetImageBias method is:
8617 % MagickBooleanType MagickSetImageBias(MagickWand *wand,
8618 % const double bias)
8620 % A description of each parameter follows:
8622 % o wand: the magick wand.
8624 % o bias: the image bias.
8627 WandExport MagickBooleanType MagickSetImageBias(MagickWand *wand,
8630 assert(wand != (MagickWand *) NULL);
8631 assert(wand->signature == WandSignature);
8632 if (wand->debug != MagickFalse)
8633 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8634 if (wand->images == (Image *) NULL)
8635 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8636 wand->images->bias=bias;
8641 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8645 % 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 %
8649 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8651 % MagickSetImageBluePrimary() sets the image chromaticity blue primary point.
8653 % The format of the MagickSetImageBluePrimary method is:
8655 % MagickBooleanType MagickSetImageBluePrimary(MagickWand *wand,
8656 % const double x,const double y)
8658 % A description of each parameter follows:
8660 % o wand: the magick wand.
8662 % o x: the blue primary x-point.
8664 % o y: the blue primary y-point.
8667 WandExport MagickBooleanType MagickSetImageBluePrimary(MagickWand *wand,
8668 const double x,const double y)
8670 assert(wand != (MagickWand *) NULL);
8671 assert(wand->signature == WandSignature);
8672 if (wand->debug != MagickFalse)
8673 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8674 if (wand->images == (Image *) NULL)
8675 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8676 wand->images->chromaticity.blue_primary.x=x;
8677 wand->images->chromaticity.blue_primary.y=y;
8682 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8686 % 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 %
8690 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8692 % MagickSetImageBorderColor() sets the image border color.
8694 % The format of the MagickSetImageBorderColor method is:
8696 % MagickBooleanType MagickSetImageBorderColor(MagickWand *wand,
8697 % const PixelWand *border)
8699 % A description of each parameter follows:
8701 % o wand: the magick wand.
8703 % o border: the border pixel wand.
8706 WandExport MagickBooleanType MagickSetImageBorderColor(MagickWand *wand,
8707 const PixelWand *border)
8709 assert(wand != (MagickWand *) NULL);
8710 assert(wand->signature == WandSignature);
8711 if (wand->debug != MagickFalse)
8712 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8713 if (wand->images == (Image *) NULL)
8714 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8715 PixelGetQuantumPacket(border,&wand->images->border_color);
8720 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8724 % M a g i c k S e t I m a g e C l i p M a s k %
8728 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8730 % MagickSetImageClipMask() sets image clip mask.
8732 % The format of the MagickSetImageClipMask method is:
8734 % MagickBooleanType MagickSetImageClipMask(MagickWand *wand,
8735 % const MagickWand *clip_mask)
8737 % A description of each parameter follows:
8739 % o wand: the magick wand.
8741 % o clip_mask: the clip_mask wand.
8744 WandExport MagickBooleanType MagickSetImageClipMask(MagickWand *wand,
8745 const MagickWand *clip_mask)
8747 assert(wand != (MagickWand *) NULL);
8748 assert(wand->signature == WandSignature);
8749 if (wand->debug != MagickFalse)
8750 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8751 assert(clip_mask != (MagickWand *) NULL);
8752 assert(clip_mask->signature == WandSignature);
8753 if (clip_mask->debug != MagickFalse)
8754 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clip_mask->name);
8755 if (clip_mask->images == (Image *) NULL)
8756 ThrowWandException(WandError,"ContainsNoImages",clip_mask->name);
8757 return(SetImageClipMask(wand->images,clip_mask->images,wand->exception));
8761 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8765 % M a g i c k S e t I m a g e C o l o r %
8769 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8771 % MagickSetImageColor() set the entire wand canvas to the specified color.
8773 % The format of the MagickSetImageColor method is:
8775 % MagickBooleanType MagickSetImageColor(MagickWand *wand,
8776 % const PixelWand *color)
8778 % A description of each parameter follows:
8780 % o wand: the magick wand.
8782 % o background: the image color.
8785 WandExport MagickBooleanType MagickSetImageColor(MagickWand *wand,
8786 const PixelWand *color)
8791 assert(wand != (MagickWand *) NULL);
8792 assert(wand->signature == WandSignature);
8793 if (wand->debug != MagickFalse)
8794 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8795 PixelGetMagickColor(color,&pixel);
8796 return(SetImageColor(wand->images,&pixel,wand->exception));
8800 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8804 % 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 %
8808 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8810 % MagickSetImageColormapColor() sets the color of the specified colormap
8813 % The format of the MagickSetImageColormapColor method is:
8815 % MagickBooleanType MagickSetImageColormapColor(MagickWand *wand,
8816 % const size_t index,const PixelWand *color)
8818 % A description of each parameter follows:
8820 % o wand: the magick wand.
8822 % o index: the offset into the image colormap.
8824 % o color: Return the colormap color in this wand.
8827 WandExport MagickBooleanType MagickSetImageColormapColor(MagickWand *wand,
8828 const size_t index,const PixelWand *color)
8830 assert(wand != (MagickWand *) NULL);
8831 assert(wand->signature == WandSignature);
8832 if (wand->debug != MagickFalse)
8833 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8834 if (wand->images == (Image *) NULL)
8835 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8836 if ((wand->images->colormap == (PixelInfo *) NULL) ||
8837 (index >= wand->images->colors))
8838 ThrowWandException(WandError,"InvalidColormapIndex",wand->name);
8839 PixelGetQuantumPacket(color,wand->images->colormap+index);
8840 return(SyncImage(wand->images,wand->exception));
8844 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8848 % M a g i c k S e t I m a g e C o l o r s p a c e %
8852 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8854 % MagickSetImageColorspace() sets the image colorspace.
8856 % The format of the MagickSetImageColorspace method is:
8858 % MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
8859 % const ColorspaceType colorspace)
8861 % A description of each parameter follows:
8863 % o wand: the magick wand.
8865 % o colorspace: the image colorspace: UndefinedColorspace, RGBColorspace,
8866 % GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace,
8867 % YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace,
8868 % YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace,
8869 % HSLColorspace, or HWBColorspace.
8872 WandExport MagickBooleanType MagickSetImageColorspace(MagickWand *wand,
8873 const ColorspaceType colorspace)
8875 assert(wand != (MagickWand *) NULL);
8876 assert(wand->signature == WandSignature);
8877 if (wand->debug != MagickFalse)
8878 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8879 if (wand->images == (Image *) NULL)
8880 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8881 return(SetImageColorspace(wand->images,colorspace,wand->exception));
8885 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8889 % M a g i c k S e t I m a g e C o m p o s e %
8893 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8895 % MagickSetImageCompose() sets the image composite operator, useful for
8896 % specifying how to composite the image thumbnail when using the
8897 % MagickMontageImage() method.
8899 % The format of the MagickSetImageCompose method is:
8901 % MagickBooleanType MagickSetImageCompose(MagickWand *wand,
8902 % const CompositeOperator compose)
8904 % A description of each parameter follows:
8906 % o wand: the magick wand.
8908 % o compose: the image composite operator.
8911 WandExport MagickBooleanType MagickSetImageCompose(MagickWand *wand,
8912 const CompositeOperator compose)
8914 assert(wand != (MagickWand *) NULL);
8915 assert(wand->signature == WandSignature);
8916 if (wand->debug != MagickFalse)
8917 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8918 if (wand->images == (Image *) NULL)
8919 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8920 wand->images->compose=compose;
8925 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8929 % 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 %
8933 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8935 % MagickSetImageCompression() sets the image compression.
8937 % The format of the MagickSetImageCompression method is:
8939 % MagickBooleanType MagickSetImageCompression(MagickWand *wand,
8940 % const CompressionType compression)
8942 % A description of each parameter follows:
8944 % o wand: the magick wand.
8946 % o compression: the image compression type.
8949 WandExport MagickBooleanType MagickSetImageCompression(MagickWand *wand,
8950 const CompressionType compression)
8952 assert(wand != (MagickWand *) NULL);
8953 assert(wand->signature == WandSignature);
8954 if (wand->debug != MagickFalse)
8955 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8956 if (wand->images == (Image *) NULL)
8957 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8958 wand->images->compression=compression;
8963 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8967 % 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 %
8971 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8973 % MagickSetImageCompressionQuality() sets the image compression quality.
8975 % The format of the MagickSetImageCompressionQuality method is:
8977 % MagickBooleanType MagickSetImageCompressionQuality(MagickWand *wand,
8978 % const size_t quality)
8980 % A description of each parameter follows:
8982 % o wand: the magick wand.
8984 % o quality: the image compression tlityype.
8987 WandExport MagickBooleanType MagickSetImageCompressionQuality(MagickWand *wand,
8988 const size_t quality)
8990 assert(wand != (MagickWand *) NULL);
8991 assert(wand->signature == WandSignature);
8992 if (wand->debug != MagickFalse)
8993 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
8994 if (wand->images == (Image *) NULL)
8995 ThrowWandException(WandError,"ContainsNoImages",wand->name);
8996 wand->images->quality=quality;
9001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9005 % M a g i c k S e t I m a g e D e l a y %
9009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9011 % MagickSetImageDelay() sets the image delay.
9013 % The format of the MagickSetImageDelay method is:
9015 % MagickBooleanType MagickSetImageDelay(MagickWand *wand,
9016 % const size_t delay)
9018 % A description of each parameter follows:
9020 % o wand: the magick wand.
9022 % o delay: the image delay in ticks-per-second units.
9025 WandExport MagickBooleanType MagickSetImageDelay(MagickWand *wand,
9028 assert(wand != (MagickWand *) NULL);
9029 assert(wand->signature == WandSignature);
9030 if (wand->debug != MagickFalse)
9031 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9032 if (wand->images == (Image *) NULL)
9033 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9034 wand->images->delay=delay;
9039 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9043 % M a g i c k S e t I m a g e D e p t h %
9047 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9049 % MagickSetImageDepth() sets the image depth.
9051 % The format of the MagickSetImageDepth method is:
9053 % MagickBooleanType MagickSetImageDepth(MagickWand *wand,
9054 % const size_t depth)
9056 % A description of each parameter follows:
9058 % o wand: the magick wand.
9060 % o depth: the image depth in bits: 8, 16, or 32.
9063 WandExport MagickBooleanType MagickSetImageDepth(MagickWand *wand,
9066 assert(wand != (MagickWand *) NULL);
9067 assert(wand->signature == WandSignature);
9068 if (wand->debug != MagickFalse)
9069 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9070 if (wand->images == (Image *) NULL)
9071 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9072 return(SetImageDepth(wand->images,depth,wand->exception));
9076 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9080 % M a g i c k S e t I m a g e D i s p o s e %
9084 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9086 % MagickSetImageDispose() sets the image disposal method.
9088 % The format of the MagickSetImageDispose method is:
9090 % MagickBooleanType MagickSetImageDispose(MagickWand *wand,
9091 % const DisposeType dispose)
9093 % A description of each parameter follows:
9095 % o wand: the magick wand.
9097 % o dispose: the image disposeal type.
9100 WandExport MagickBooleanType MagickSetImageDispose(MagickWand *wand,
9101 const DisposeType dispose)
9103 assert(wand != (MagickWand *) NULL);
9104 assert(wand->signature == WandSignature);
9105 if (wand->debug != MagickFalse)
9106 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9107 if (wand->images == (Image *) NULL)
9108 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9109 wand->images->dispose=dispose;
9114 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9118 % M a g i c k S e t I m a g e E x t e n t %
9122 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9124 % MagickSetImageExtent() sets the image size (i.e. columns & rows).
9126 % The format of the MagickSetImageExtent method is:
9128 % MagickBooleanType MagickSetImageExtent(MagickWand *wand,
9129 % const size_t columns,const unsigned rows)
9131 % A description of each parameter follows:
9133 % o wand: the magick wand.
9135 % o columns: The image width in pixels.
9137 % o rows: The image height in pixels.
9140 WandExport MagickBooleanType MagickSetImageExtent(MagickWand *wand,
9141 const size_t columns,const size_t rows)
9143 assert(wand != (MagickWand *) NULL);
9144 assert(wand->signature == WandSignature);
9145 if (wand->debug != MagickFalse)
9146 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9147 if (wand->images == (Image *) NULL)
9148 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9149 return(SetImageExtent(wand->images,columns,rows,wand->exception));
9153 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9157 % M a g i c k S e t I m a g e F i l e n a m e %
9161 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9163 % MagickSetImageFilename() sets the filename of a particular image in a
9166 % The format of the MagickSetImageFilename method is:
9168 % MagickBooleanType MagickSetImageFilename(MagickWand *wand,
9169 % const char *filename)
9171 % A description of each parameter follows:
9173 % o wand: the magick wand.
9175 % o filename: the image filename.
9178 WandExport MagickBooleanType MagickSetImageFilename(MagickWand *wand,
9179 const char *filename)
9181 assert(wand != (MagickWand *) NULL);
9182 assert(wand->signature == WandSignature);
9183 if (wand->debug != MagickFalse)
9184 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9185 if (wand->images == (Image *) NULL)
9186 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9187 if (filename != (const char *) NULL)
9188 (void) CopyMagickString(wand->images->filename,filename,MaxTextExtent);
9193 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9197 % M a g i c k S e t I m a g e F o r m a t %
9201 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9203 % MagickSetImageFormat() sets the format of a particular image in a
9206 % The format of the MagickSetImageFormat method is:
9208 % MagickBooleanType MagickSetImageFormat(MagickWand *wand,
9209 % const char *format)
9211 % A description of each parameter follows:
9213 % o wand: the magick wand.
9215 % o format: the image format.
9218 WandExport MagickBooleanType MagickSetImageFormat(MagickWand *wand,
9224 assert(wand != (MagickWand *) NULL);
9225 assert(wand->signature == WandSignature);
9226 if (wand->debug != MagickFalse)
9227 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9228 if (wand->images == (Image *) NULL)
9229 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9230 if ((format == (char *) NULL) || (*format == '\0'))
9232 *wand->images->magick='\0';
9235 magick_info=GetMagickInfo(format,wand->exception);
9236 if (magick_info == (const MagickInfo *) NULL)
9237 return(MagickFalse);
9238 ClearMagickException(wand->exception);
9239 (void) CopyMagickString(wand->images->magick,format,MaxTextExtent);
9244 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9248 % M a g i c k S e t I m a g e F u z z %
9252 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9254 % MagickSetImageFuzz() sets the image fuzz.
9256 % The format of the MagickSetImageFuzz method is:
9258 % MagickBooleanType MagickSetImageFuzz(MagickWand *wand,
9259 % const double fuzz)
9261 % A description of each parameter follows:
9263 % o wand: the magick wand.
9265 % o fuzz: the image fuzz.
9268 WandExport MagickBooleanType MagickSetImageFuzz(MagickWand *wand,
9271 assert(wand != (MagickWand *) NULL);
9272 assert(wand->signature == WandSignature);
9273 if (wand->debug != MagickFalse)
9274 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9275 if (wand->images == (Image *) NULL)
9276 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9277 wand->images->fuzz=fuzz;
9282 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9286 % M a g i c k S e t I m a g e G a m m a %
9290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9292 % MagickSetImageGamma() sets the image gamma.
9294 % The format of the MagickSetImageGamma method is:
9296 % MagickBooleanType MagickSetImageGamma(MagickWand *wand,
9297 % const double gamma)
9299 % A description of each parameter follows:
9301 % o wand: the magick wand.
9303 % o gamma: the image gamma.
9306 WandExport MagickBooleanType MagickSetImageGamma(MagickWand *wand,
9309 assert(wand != (MagickWand *) NULL);
9310 assert(wand->signature == WandSignature);
9311 if (wand->debug != MagickFalse)
9312 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9313 if (wand->images == (Image *) NULL)
9314 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9315 wand->images->gamma=gamma;
9320 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9324 % M a g i c k S e t I m a g e G r a v i t y %
9328 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9330 % MagickSetImageGravity() sets the image gravity type.
9332 % The format of the MagickSetImageGravity method is:
9334 % MagickBooleanType MagickSetImageGravity(MagickWand *wand,
9335 % const GravityType gravity)
9337 % A description of each parameter follows:
9339 % o wand: the magick wand.
9341 % o gravity: the image interlace scheme: NoInterlace, LineInterlace,
9342 % PlaneInterlace, PartitionInterlace.
9345 WandExport MagickBooleanType MagickSetImageGravity(MagickWand *wand,
9346 const GravityType gravity)
9348 assert(wand != (MagickWand *) NULL);
9349 assert(wand->signature == WandSignature);
9350 if (wand->debug != MagickFalse)
9351 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9352 if (wand->images == (Image *) NULL)
9353 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9354 wand->images->gravity=gravity;
9359 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9363 % 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 %
9367 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9369 % MagickSetImageGreenPrimary() sets the image chromaticity green primary
9372 % The format of the MagickSetImageGreenPrimary method is:
9374 % MagickBooleanType MagickSetImageGreenPrimary(MagickWand *wand,
9375 % const double x,const double y)
9377 % A description of each parameter follows:
9379 % o wand: the magick wand.
9381 % o x: the green primary x-point.
9383 % o y: the green primary y-point.
9387 WandExport MagickBooleanType MagickSetImageGreenPrimary(MagickWand *wand,
9388 const double x,const double y)
9390 assert(wand != (MagickWand *) NULL);
9391 assert(wand->signature == WandSignature);
9392 if (wand->debug != MagickFalse)
9393 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9394 if (wand->images == (Image *) NULL)
9395 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9396 wand->images->chromaticity.green_primary.x=x;
9397 wand->images->chromaticity.green_primary.y=y;
9402 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9406 % 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 %
9410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9412 % MagickSetImageInterlaceScheme() sets the image interlace scheme.
9414 % The format of the MagickSetImageInterlaceScheme method is:
9416 % MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
9417 % const InterlaceType interlace)
9419 % A description of each parameter follows:
9421 % o wand: the magick wand.
9423 % o interlace: the image interlace scheme: NoInterlace, LineInterlace,
9424 % PlaneInterlace, PartitionInterlace.
9427 WandExport MagickBooleanType MagickSetImageInterlaceScheme(MagickWand *wand,
9428 const InterlaceType interlace)
9430 assert(wand != (MagickWand *) NULL);
9431 assert(wand->signature == WandSignature);
9432 if (wand->debug != MagickFalse)
9433 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9434 if (wand->images == (Image *) NULL)
9435 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9436 wand->images->interlace=interlace;
9441 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9445 % 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 %
9449 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9451 % MagickSetImagePixelInterpolateMethod() sets the image interpolate pixel method.
9453 % The format of the MagickSetImagePixelInterpolateMethod method is:
9455 % MagickBooleanType MagickSetImagePixelInterpolateMethod(MagickWand *wand,
9456 % const PixelInterpolateMethod method)
9458 % A description of each parameter follows:
9460 % o wand: the magick wand.
9462 % o method: the image interpole pixel methods: choose from Undefined,
9463 % Average, Bicubic, Bilinear, Filter, Integer, Mesh, NearestNeighbor.
9466 WandExport MagickBooleanType MagickSetImagePixelInterpolateMethod(MagickWand *wand,
9467 const PixelInterpolateMethod method)
9469 assert(wand != (MagickWand *) NULL);
9470 assert(wand->signature == WandSignature);
9471 if (wand->debug != MagickFalse)
9472 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9473 if (wand->images == (Image *) NULL)
9474 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9475 wand->images->interpolate=method;
9480 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9484 % M a g i c k S e t I m a g e I t e r a t i o n s %
9488 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9490 % MagickSetImageIterations() sets the image iterations.
9492 % The format of the MagickSetImageIterations method is:
9494 % MagickBooleanType MagickSetImageIterations(MagickWand *wand,
9495 % const size_t iterations)
9497 % A description of each parameter follows:
9499 % o wand: the magick wand.
9501 % o delay: the image delay in 1/100th of a second.
9504 WandExport MagickBooleanType MagickSetImageIterations(MagickWand *wand,
9505 const size_t iterations)
9507 assert(wand != (MagickWand *) NULL);
9508 assert(wand->signature == WandSignature);
9509 if (wand->debug != MagickFalse)
9510 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9511 if (wand->images == (Image *) NULL)
9512 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9513 wand->images->iterations=iterations;
9518 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9522 % M a g i c k S e t I m a g e M a t t e %
9526 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9528 % MagickSetImageMatte() sets the image matte channel.
9530 % The format of the MagickSetImageMatteColor method is:
9532 % MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
9533 % const MagickBooleanType *matte)
9535 % A description of each parameter follows:
9537 % o wand: the magick wand.
9539 % o matte: Set to MagickTrue to enable the image matte channel otherwise
9543 WandExport MagickBooleanType MagickSetImageMatte(MagickWand *wand,
9544 const MagickBooleanType matte)
9546 assert(wand != (MagickWand *) NULL);
9547 assert(wand->signature == WandSignature);
9548 if (wand->debug != MagickFalse)
9549 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9550 if (wand->images == (Image *) NULL)
9551 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9552 if ((wand->images->matte == MagickFalse) && (matte != MagickFalse))
9553 (void) SetImageAlpha(wand->images,OpaqueAlpha,wand->exception);
9554 wand->images->matte=matte;
9559 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9563 % M a g i c k S e t I m a g e M a t t e C o l o r %
9567 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9569 % MagickSetImageMatteColor() sets the image matte color.
9571 % The format of the MagickSetImageMatteColor method is:
9573 % MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
9574 % const PixelWand *matte)
9576 % A description of each parameter follows:
9578 % o wand: the magick wand.
9580 % o matte: the matte pixel wand.
9583 WandExport MagickBooleanType MagickSetImageMatteColor(MagickWand *wand,
9584 const PixelWand *matte)
9586 assert(wand != (MagickWand *) NULL);
9587 assert(wand->signature == WandSignature);
9588 if (wand->debug != MagickFalse)
9589 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9590 if (wand->images == (Image *) NULL)
9591 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9592 PixelGetQuantumPacket(matte,&wand->images->matte_color);
9597 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9601 % M a g i c k S e t I m a g e O p a c i t y %
9605 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9607 % MagickSetImageAlpha() sets the image to the specified alpha level.
9609 % The format of the MagickSetImageAlpha method is:
9611 % MagickBooleanType MagickSetImageAlpha(MagickWand *wand,
9612 % const double alpha)
9614 % A description of each parameter follows:
9616 % o wand: the magick wand.
9618 % o alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully
9622 WandExport MagickBooleanType MagickSetImageAlpha(MagickWand *wand,
9628 assert(wand != (MagickWand *) NULL);
9629 assert(wand->signature == WandSignature);
9630 if (wand->debug != MagickFalse)
9631 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9632 if (wand->images == (Image *) NULL)
9633 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9634 status=SetImageAlpha(wand->images,ClampToQuantum(QuantumRange*alpha),
9640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9644 % 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 %
9648 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9650 % MagickSetImageOrientation() sets the image orientation.
9652 % The format of the MagickSetImageOrientation method is:
9654 % MagickBooleanType MagickSetImageOrientation(MagickWand *wand,
9655 % const OrientationType orientation)
9657 % A description of each parameter follows:
9659 % o wand: the magick wand.
9661 % o orientation: the image orientation type.
9664 WandExport MagickBooleanType MagickSetImageOrientation(MagickWand *wand,
9665 const OrientationType orientation)
9667 assert(wand != (MagickWand *) NULL);
9668 assert(wand->signature == WandSignature);
9669 if (wand->debug != MagickFalse)
9670 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9671 if (wand->images == (Image *) NULL)
9672 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9673 wand->images->orientation=orientation;
9678 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9682 % M a g i c k S e t I m a g e P a g e %
9686 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9688 % MagickSetImagePage() sets the page geometry of the image.
9690 % The format of the MagickSetImagePage method is:
9692 % MagickBooleanType MagickSetImagePage(MagickWand *wand,
9693 % const size_t width,const size_t height,const ssize_t x,
9696 % A description of each parameter follows:
9698 % o wand: the magick wand.
9700 % o width: the page width.
9702 % o height: the page height.
9704 % o x: the page x-offset.
9706 % o y: the page y-offset.
9709 WandExport MagickBooleanType MagickSetImagePage(MagickWand *wand,
9710 const size_t width,const size_t height,const ssize_t x,
9713 assert(wand != (MagickWand *) NULL);
9714 assert(wand->signature == WandSignature);
9715 if (wand->debug != MagickFalse)
9716 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9717 if (wand->images == (Image *) NULL)
9718 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9719 wand->images->page.width=width;
9720 wand->images->page.height=height;
9721 wand->images->page.x=x;
9722 wand->images->page.y=y;
9727 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9731 % 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 %
9735 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9737 % MagickSetImageProgressMonitor() sets the wand image progress monitor to the
9738 % specified method and returns the previous progress monitor if any. The
9739 % progress monitor method looks like this:
9741 % MagickBooleanType MagickProgressMonitor(const char *text,
9742 % const MagickOffsetType offset,const MagickSizeType span,
9743 % void *client_data)
9745 % If the progress monitor returns MagickFalse, the current operation is
9748 % The format of the MagickSetImageProgressMonitor method is:
9750 % MagickProgressMonitor MagickSetImageProgressMonitor(MagickWand *wand
9751 % const MagickProgressMonitor progress_monitor,void *client_data)
9753 % A description of each parameter follows:
9755 % o wand: the magick wand.
9757 % o progress_monitor: Specifies a pointer to a method to monitor progress
9758 % of an image operation.
9760 % o client_data: Specifies a pointer to any client data.
9763 WandExport MagickProgressMonitor MagickSetImageProgressMonitor(MagickWand *wand,
9764 const MagickProgressMonitor progress_monitor,void *client_data)
9766 MagickProgressMonitor
9769 assert(wand != (MagickWand *) NULL);
9770 assert(wand->signature == WandSignature);
9771 if (wand->debug != MagickFalse)
9772 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9773 if (wand->images == (Image *) NULL)
9775 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
9776 "ContainsNoImages","`%s'",wand->name);
9777 return((MagickProgressMonitor) NULL);
9779 previous_monitor=SetImageProgressMonitor(wand->images,
9780 progress_monitor,client_data);
9781 return(previous_monitor);
9785 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9789 % M a g i c k S e t I m a g e R e d P r i m a r y %
9793 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9795 % MagickSetImageRedPrimary() sets the image chromaticity red primary point.
9797 % The format of the MagickSetImageRedPrimary method is:
9799 % MagickBooleanType MagickSetImageRedPrimary(MagickWand *wand,
9800 % const double x,const double y)
9802 % A description of each parameter follows:
9804 % o wand: the magick wand.
9806 % o x: the red primary x-point.
9808 % o y: the red primary y-point.
9811 WandExport MagickBooleanType MagickSetImageRedPrimary(MagickWand *wand,
9812 const double x,const double y)
9814 assert(wand != (MagickWand *) NULL);
9815 assert(wand->signature == WandSignature);
9816 if (wand->debug != MagickFalse)
9817 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9818 if (wand->images == (Image *) NULL)
9819 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9820 wand->images->chromaticity.red_primary.x=x;
9821 wand->images->chromaticity.red_primary.y=y;
9826 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9830 % 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 %
9834 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9836 % MagickSetImageRenderingIntent() sets the image rendering intent.
9838 % The format of the MagickSetImageRenderingIntent method is:
9840 % MagickBooleanType MagickSetImageRenderingIntent(MagickWand *wand,
9841 % const RenderingIntent rendering_intent)
9843 % A description of each parameter follows:
9845 % o wand: the magick wand.
9847 % o rendering_intent: the image rendering intent: UndefinedIntent,
9848 % SaturationIntent, PerceptualIntent, AbsoluteIntent, or RelativeIntent.
9851 WandExport MagickBooleanType MagickSetImageRenderingIntent(MagickWand *wand,
9852 const RenderingIntent rendering_intent)
9854 assert(wand != (MagickWand *) NULL);
9855 assert(wand->signature == WandSignature);
9856 if (wand->debug != MagickFalse)
9857 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9858 if (wand->images == (Image *) NULL)
9859 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9860 wand->images->rendering_intent=rendering_intent;
9865 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9869 % M a g i c k S e t I m a g e R e s o l u t i o n %
9873 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9875 % MagickSetImageResolution() sets the image resolution.
9877 % The format of the MagickSetImageResolution method is:
9879 % MagickBooleanType MagickSetImageResolution(MagickWand *wand,
9880 % const double x_resolution,const doubtl y_resolution)
9882 % A description of each parameter follows:
9884 % o wand: the magick wand.
9886 % o x_resolution: the image x resolution.
9888 % o y_resolution: the image y resolution.
9891 WandExport MagickBooleanType MagickSetImageResolution(MagickWand *wand,
9892 const double x_resolution,const double y_resolution)
9894 assert(wand != (MagickWand *) NULL);
9895 assert(wand->signature == WandSignature);
9896 if (wand->debug != MagickFalse)
9897 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9898 if (wand->images == (Image *) NULL)
9899 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9900 wand->images->resolution.x=x_resolution;
9901 wand->images->resolution.y=y_resolution;
9906 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9910 % M a g i c k S e t I m a g e S c e n e %
9914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9916 % MagickSetImageScene() sets the image scene.
9918 % The format of the MagickSetImageScene method is:
9920 % MagickBooleanType MagickSetImageScene(MagickWand *wand,
9921 % const size_t scene)
9923 % A description of each parameter follows:
9925 % o wand: the magick wand.
9927 % o delay: the image scene number.
9930 WandExport MagickBooleanType MagickSetImageScene(MagickWand *wand,
9933 assert(wand != (MagickWand *) NULL);
9934 assert(wand->signature == WandSignature);
9935 if (wand->debug != MagickFalse)
9936 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9937 if (wand->images == (Image *) NULL)
9938 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9939 wand->images->scene=scene;
9944 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9948 % 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 %
9952 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9954 % MagickSetImageTicksPerSecond() sets the image ticks-per-second.
9956 % The format of the MagickSetImageTicksPerSecond method is:
9958 % MagickBooleanType MagickSetImageTicksPerSecond(MagickWand *wand,
9959 % const ssize_t ticks_per-second)
9961 % A description of each parameter follows:
9963 % o wand: the magick wand.
9965 % o ticks_per_second: the units to use for the image delay.
9968 WandExport MagickBooleanType MagickSetImageTicksPerSecond(MagickWand *wand,
9969 const ssize_t ticks_per_second)
9971 assert(wand != (MagickWand *) NULL);
9972 assert(wand->signature == WandSignature);
9973 if (wand->debug != MagickFalse)
9974 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
9975 if (wand->images == (Image *) NULL)
9976 ThrowWandException(WandError,"ContainsNoImages",wand->name);
9977 wand->images->ticks_per_second=ticks_per_second;
9982 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9986 % M a g i c k S e t I m a g e T y p e %
9990 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9992 % MagickSetImageType() sets the image type.
9994 % The format of the MagickSetImageType method is:
9996 % MagickBooleanType MagickSetImageType(MagickWand *wand,
9997 % const ImageType image_type)
9999 % A description of each parameter follows:
10001 % o wand: the magick wand.
10003 % o image_type: the image type: UndefinedType, BilevelType, GrayscaleType,
10004 % GrayscaleMatteType, PaletteType, PaletteMatteType, TrueColorType,
10005 % TrueColorMatteType, ColorSeparationType, ColorSeparationMatteType,
10009 WandExport MagickBooleanType MagickSetImageType(MagickWand *wand,
10010 const ImageType image_type)
10012 assert(wand != (MagickWand *) NULL);
10013 assert(wand->signature == WandSignature);
10014 if (wand->debug != MagickFalse)
10015 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10016 if (wand->images == (Image *) NULL)
10017 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10018 return(SetImageType(wand->images,image_type,wand->exception));
10022 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10026 % M a g i c k S e t I m a g e U n i t s %
10030 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10032 % MagickSetImageUnits() sets the image units of resolution.
10034 % The format of the MagickSetImageUnits method is:
10036 % MagickBooleanType MagickSetImageUnits(MagickWand *wand,
10037 % const ResolutionType units)
10039 % A description of each parameter follows:
10041 % o wand: the magick wand.
10043 % o units: the image units of resolution : UndefinedResolution,
10044 % PixelsPerInchResolution, or PixelsPerCentimeterResolution.
10047 WandExport MagickBooleanType MagickSetImageUnits(MagickWand *wand,
10048 const ResolutionType units)
10050 assert(wand != (MagickWand *) NULL);
10051 assert(wand->signature == WandSignature);
10052 if (wand->debug != MagickFalse)
10053 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10054 if (wand->images == (Image *) NULL)
10055 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10056 wand->images->units=units;
10057 return(MagickTrue);
10061 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10065 % 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 %
10069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10071 % MagickSetImageVirtualPixelMethod() sets the image virtual pixel method.
10073 % The format of the MagickSetImageVirtualPixelMethod method is:
10075 % VirtualPixelMethod MagickSetImageVirtualPixelMethod(MagickWand *wand,
10076 % const VirtualPixelMethod method)
10078 % A description of each parameter follows:
10080 % o wand: the magick wand.
10082 % o method: the image virtual pixel method : UndefinedVirtualPixelMethod,
10083 % ConstantVirtualPixelMethod, EdgeVirtualPixelMethod,
10084 % MirrorVirtualPixelMethod, or TileVirtualPixelMethod.
10087 WandExport VirtualPixelMethod MagickSetImageVirtualPixelMethod(MagickWand *wand,
10088 const VirtualPixelMethod method)
10090 assert(wand != (MagickWand *) NULL);
10091 assert(wand->signature == WandSignature);
10092 if (wand->debug != MagickFalse)
10093 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10094 if (wand->images == (Image *) NULL)
10095 return(UndefinedVirtualPixelMethod);
10096 return(SetImageVirtualPixelMethod(wand->images,method));
10100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10104 % M a g i c k S e t I m a g e W h i t e P o i n t %
10108 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10110 % MagickSetImageWhitePoint() sets the image chromaticity white point.
10112 % The format of the MagickSetImageWhitePoint method is:
10114 % MagickBooleanType MagickSetImageWhitePoint(MagickWand *wand,
10115 % const double x,const double y)
10117 % A description of each parameter follows:
10119 % o wand: the magick wand.
10121 % o x: the white x-point.
10123 % o y: the white y-point.
10126 WandExport MagickBooleanType MagickSetImageWhitePoint(MagickWand *wand,
10127 const double x,const double y)
10129 assert(wand != (MagickWand *) NULL);
10130 assert(wand->signature == WandSignature);
10131 if (wand->debug != MagickFalse)
10132 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10133 if (wand->images == (Image *) NULL)
10134 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10135 wand->images->chromaticity.white_point.x=x;
10136 wand->images->chromaticity.white_point.y=y;
10137 return(MagickTrue);
10141 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10145 % M a g i c k S h a d e I m a g e C h a n n e l %
10149 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10151 % MagickShadeImage() shines a distant light on an image to create a
10152 % three-dimensional effect. You control the positioning of the light with
10153 % azimuth and elevation; azimuth is measured in degrees off the x axis
10154 % and elevation is measured in pixels above the Z axis.
10156 % The format of the MagickShadeImage method is:
10158 % MagickBooleanType MagickShadeImage(MagickWand *wand,
10159 % const MagickBooleanType gray,const double azimuth,
10160 % const double elevation)
10162 % A description of each parameter follows:
10164 % o wand: the magick wand.
10166 % o gray: A value other than zero shades the intensity of each pixel.
10168 % o azimuth, elevation: Define the light source direction.
10171 WandExport MagickBooleanType MagickShadeImage(MagickWand *wand,
10172 const MagickBooleanType gray,const double asimuth,const double elevation)
10177 assert(wand != (MagickWand *) NULL);
10178 assert(wand->signature == WandSignature);
10179 if (wand->debug != MagickFalse)
10180 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10181 if (wand->images == (Image *) NULL)
10182 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10183 shade_image=ShadeImage(wand->images,gray,asimuth,elevation,wand->exception);
10184 if (shade_image == (Image *) NULL)
10185 return(MagickFalse);
10186 ReplaceImageInList(&wand->images,shade_image);
10187 return(MagickTrue);
10191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10195 % M a g i c k S h a d o w I m a g e %
10199 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10201 % MagickShadowImage() simulates an image shadow.
10203 % The format of the MagickShadowImage method is:
10205 % MagickBooleanType MagickShadowImage(MagickWand *wand,
10206 % const double alpha,const double sigma,const ssize_t x,const ssize_t y)
10208 % A description of each parameter follows:
10210 % o wand: the magick wand.
10212 % o alpha: percentage transparency.
10214 % o sigma: the standard deviation of the Gaussian, in pixels.
10216 % o x: the shadow x-offset.
10218 % o y: the shadow y-offset.
10221 WandExport MagickBooleanType MagickShadowImage(MagickWand *wand,
10222 const double alpha,const double sigma,const ssize_t x,const ssize_t y)
10227 assert(wand != (MagickWand *) NULL);
10228 assert(wand->signature == WandSignature);
10229 if (wand->debug != MagickFalse)
10230 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10231 if (wand->images == (Image *) NULL)
10232 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10233 shadow_image=ShadowImage(wand->images,alpha,sigma,x,y,wand->exception);
10234 if (shadow_image == (Image *) NULL)
10235 return(MagickFalse);
10236 ReplaceImageInList(&wand->images,shadow_image);
10237 return(MagickTrue);
10241 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10245 % M a g i c k S h a r p e n I m a g e %
10249 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10251 % MagickSharpenImage() sharpens an image. We convolve the image with a
10252 % Gaussian operator of the given radius and standard deviation (sigma).
10253 % For reasonable results, the radius should be larger than sigma. Use a
10254 % radius of 0 and MagickSharpenImage() selects a suitable radius for you.
10256 % The format of the MagickSharpenImage method is:
10258 % MagickBooleanType MagickSharpenImage(MagickWand *wand,
10259 % const double radius,const double sigma,const double bias)
10261 % A description of each parameter follows:
10263 % o wand: the magick wand.
10265 % o radius: the radius of the Gaussian, in pixels, not counting the center
10268 % o sigma: the standard deviation of the Gaussian, in pixels.
10270 % o bias: the bias.
10273 WandExport MagickBooleanType MagickSharpenImage(MagickWand *wand,
10274 const double radius,const double sigma,const double bias)
10279 assert(wand != (MagickWand *) NULL);
10280 assert(wand->signature == WandSignature);
10281 if (wand->debug != MagickFalse)
10282 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10283 if (wand->images == (Image *) NULL)
10284 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10285 sharp_image=SharpenImage(wand->images,radius,sigma,bias,wand->exception);
10286 if (sharp_image == (Image *) NULL)
10287 return(MagickFalse);
10288 ReplaceImageInList(&wand->images,sharp_image);
10289 return(MagickTrue);
10293 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10297 % M a g i c k S h a v e I m a g e %
10301 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10303 % MagickShaveImage() shaves pixels from the image edges. It allocates the
10304 % memory necessary for the new Image structure and returns a pointer to the
10307 % The format of the MagickShaveImage method is:
10309 % MagickBooleanType MagickShaveImage(MagickWand *wand,
10310 % const size_t columns,const size_t rows)
10312 % A description of each parameter follows:
10314 % o wand: the magick wand.
10316 % o columns: the number of columns in the scaled image.
10318 % o rows: the number of rows in the scaled image.
10322 WandExport MagickBooleanType MagickShaveImage(MagickWand *wand,
10323 const size_t columns,const size_t rows)
10331 assert(wand != (MagickWand *) NULL);
10332 assert(wand->signature == WandSignature);
10333 if (wand->debug != MagickFalse)
10334 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10335 if (wand->images == (Image *) NULL)
10336 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10337 shave_info.width=columns;
10338 shave_info.height=rows;
10341 shave_image=ShaveImage(wand->images,&shave_info,wand->exception);
10342 if (shave_image == (Image *) NULL)
10343 return(MagickFalse);
10344 ReplaceImageInList(&wand->images,shave_image);
10345 return(MagickTrue);
10349 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10353 % M a g i c k S h e a r I m a g e %
10357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10359 % MagickShearImage() slides one edge of an image along the X or Y axis,
10360 % creating a parallelogram. An X direction shear slides an edge along the X
10361 % axis, while a Y direction shear slides an edge along the Y axis. The amount
10362 % of the shear is controlled by a shear angle. For X direction shears, x_shear
10363 % is measured relative to the Y axis, and similarly, for Y direction shears
10364 % y_shear is measured relative to the X axis. Empty triangles left over from
10365 % shearing the image are filled with the background color.
10367 % The format of the MagickShearImage method is:
10369 % MagickBooleanType MagickShearImage(MagickWand *wand,
10370 % const PixelWand *background,const double x_shear,onst double y_shear)
10372 % A description of each parameter follows:
10374 % o wand: the magick wand.
10376 % o background: the background pixel wand.
10378 % o x_shear: the number of degrees to shear the image.
10380 % o y_shear: the number of degrees to shear the image.
10383 WandExport MagickBooleanType MagickShearImage(MagickWand *wand,
10384 const PixelWand *background,const double x_shear,const double y_shear)
10389 assert(wand != (MagickWand *) NULL);
10390 assert(wand->signature == WandSignature);
10391 if (wand->debug != MagickFalse)
10392 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10393 if (wand->images == (Image *) NULL)
10394 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10395 PixelGetQuantumPacket(background,&wand->images->background_color);
10396 shear_image=ShearImage(wand->images,x_shear,y_shear,wand->exception);
10397 if (shear_image == (Image *) NULL)
10398 return(MagickFalse);
10399 ReplaceImageInList(&wand->images,shear_image);
10400 return(MagickTrue);
10404 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10408 % 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 %
10412 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10414 % MagickSigmoidalContrastImage() adjusts the contrast of an image with a
10415 % non-linear sigmoidal contrast algorithm. Increase the contrast of the
10416 % image using a sigmoidal transfer function without saturating highlights or
10417 % shadows. Contrast indicates how much to increase the contrast (0 is none;
10418 % 3 is typical; 20 is pushing it); mid-point indicates where midtones fall in
10419 % the resultant image (0 is white; 50% is middle-gray; 100% is black). Set
10420 % sharpen to MagickTrue to increase the image contrast otherwise the contrast
10423 % The format of the MagickSigmoidalContrastImage method is:
10425 % MagickBooleanType MagickSigmoidalContrastImage(MagickWand *wand,
10426 % const MagickBooleanType sharpen,const double alpha,const double beta)
10428 % A description of each parameter follows:
10430 % o wand: the magick wand.
10432 % o sharpen: Increase or decrease image contrast.
10434 % o alpha: strength of the contrast, the larger the number the more
10435 % 'threshold-like' it becomes.
10437 % o beta: midpoint of the function as a color value 0 to QuantumRange.
10440 WandExport MagickBooleanType MagickSigmoidalContrastImage(
10441 MagickWand *wand,const MagickBooleanType sharpen,const double alpha,
10447 assert(wand != (MagickWand *) NULL);
10448 assert(wand->signature == WandSignature);
10449 if (wand->debug != MagickFalse)
10450 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10451 if (wand->images == (Image *) NULL)
10452 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10453 status=SigmoidalContrastImage(wand->images,sharpen,alpha,beta,
10459 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10463 % M a g i c k S i m i l a r i t y I m a g e %
10467 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10469 % MagickSimilarityImage() compares the reference image of the image and
10470 % returns the best match offset. In addition, it returns a similarity image
10471 % such that an exact match location is completely white and if none of the
10472 % pixels match, black, otherwise some gray level in-between.
10474 % The format of the MagickSimilarityImage method is:
10476 % MagickWand *MagickSimilarityImage(MagickWand *wand,
10477 % const MagickWand *reference,const MetricType metric,
10478 % RectangeInfo *offset,double *similarity)
10480 % A description of each parameter follows:
10482 % o wand: the magick wand.
10484 % o reference: the reference wand.
10486 % o metric: the metric.
10488 % o offset: the best match offset of the reference image within the image.
10490 % o similarity: the computed similarity between the images.
10493 WandExport MagickWand *MagickSimilarityImage(MagickWand *wand,
10494 const MagickWand *reference,const MetricType metric,RectangleInfo *offset,
10495 double *similarity)
10500 assert(wand != (MagickWand *) NULL);
10501 assert(wand->signature == WandSignature);
10502 if (wand->debug != MagickFalse)
10503 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10504 if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
10506 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
10507 "ContainsNoImages","`%s'",wand->name);
10508 return((MagickWand *) NULL);
10510 similarity_image=SimilarityImage(wand->images,reference->images,metric,offset,
10511 similarity,wand->exception);
10512 if (similarity_image == (Image *) NULL)
10513 return((MagickWand *) NULL);
10514 return(CloneMagickWandFromImages(wand,similarity_image));
10518 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10522 % M a g i c k S k e t c h I m a g e %
10526 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10528 % MagickSketchImage() simulates a pencil sketch. We convolve the image with
10529 % a Gaussian operator of the given radius and standard deviation (sigma).
10530 % For reasonable results, radius should be larger than sigma. Use a
10531 % radius of 0 and SketchImage() selects a suitable radius for you.
10532 % Angle gives the angle of the blurring motion.
10534 % The format of the MagickSketchImage method is:
10536 % MagickBooleanType MagickSketchImage(MagickWand *wand,
10537 % const double radius,const double sigma,const double angle,
10538 % const double bias)
10540 % A description of each parameter follows:
10542 % o wand: the magick wand.
10544 % o radius: the radius of the Gaussian, in pixels, not counting
10545 % the center pixel.
10547 % o sigma: the standard deviation of the Gaussian, in pixels.
10549 % o angle: apply the effect along this angle.
10551 % o bias: the bias.
10554 WandExport MagickBooleanType MagickSketchImage(MagickWand *wand,
10555 const double radius,const double sigma,const double angle,const double bias)
10560 assert(wand != (MagickWand *) NULL);
10561 assert(wand->signature == WandSignature);
10562 if (wand->debug != MagickFalse)
10563 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10564 if (wand->images == (Image *) NULL)
10565 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10566 sketch_image=SketchImage(wand->images,radius,sigma,angle,bias,
10568 if (sketch_image == (Image *) NULL)
10569 return(MagickFalse);
10570 ReplaceImageInList(&wand->images,sketch_image);
10571 return(MagickTrue);
10575 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10579 % M a g i c k S m u s h I m a g e s %
10583 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10585 % MagickSmushImages() takes all images from the current image pointer to the
10586 % end of the image list and smushs them to each other top-to-bottom if the
10587 % stack parameter is true, otherwise left-to-right.
10589 % The format of the MagickSmushImages method is:
10591 % MagickWand *MagickSmushImages(MagickWand *wand,
10592 % const MagickBooleanType stack,const ssize_t offset)
10594 % A description of each parameter follows:
10596 % o wand: the magick wand.
10598 % o stack: By default, images are stacked left-to-right. Set stack to
10599 % MagickTrue to stack them top-to-bottom.
10601 % o offset: minimum distance in pixels between images.
10604 WandExport MagickWand *MagickSmushImages(MagickWand *wand,
10605 const MagickBooleanType stack,const ssize_t offset)
10610 assert(wand != (MagickWand *) NULL);
10611 assert(wand->signature == WandSignature);
10612 if (wand->debug != MagickFalse)
10613 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10614 if (wand->images == (Image *) NULL)
10615 return((MagickWand *) NULL);
10616 smush_image=SmushImages(wand->images,stack,offset,wand->exception);
10617 if (smush_image == (Image *) NULL)
10618 return((MagickWand *) NULL);
10619 return(CloneMagickWandFromImages(wand,smush_image));
10623 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10627 % M a g i c k S o l a r i z e I m a g e %
10631 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10633 % MagickSolarizeImage() applies a special effect to the image, similar to the
10634 % effect achieved in a photo darkroom by selectively exposing areas of photo
10635 % sensitive paper to light. Threshold ranges from 0 to QuantumRange and is a
10636 % measure of the extent of the solarization.
10638 % The format of the MagickSolarizeImage method is:
10640 % MagickBooleanType MagickSolarizeImage(MagickWand *wand,
10641 % const double threshold)
10643 % A description of each parameter follows:
10645 % o wand: the magick wand.
10647 % o threshold: Define the extent of the solarization.
10650 WandExport MagickBooleanType MagickSolarizeImage(MagickWand *wand,
10651 const double threshold)
10656 assert(wand != (MagickWand *) NULL);
10657 assert(wand->signature == WandSignature);
10658 if (wand->debug != MagickFalse)
10659 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10660 if (wand->images == (Image *) NULL)
10661 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10662 status=SolarizeImage(wand->images,threshold,wand->exception);
10667 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10671 % M a g i c k S p a r s e C o l o r I m a g e %
10675 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10677 % MagickSparseColorImage(), given a set of coordinates, interpolates the
10678 % colors found at those coordinates, across the whole image, using various
10681 % The format of the MagickSparseColorImage method is:
10683 % MagickBooleanType MagickSparseColorImage(MagickWand *wand,
10684 % const SparseColorMethod method,const size_t number_arguments,
10685 % const double *arguments)
10687 % A description of each parameter follows:
10689 % o image: the image to be sparseed.
10691 % o method: the method of image sparseion.
10693 % ArcSparseColorion will always ignore source image offset, and always
10694 % 'bestfit' the destination image with the top left corner offset
10695 % relative to the polar mapping center.
10697 % Bilinear has no simple inverse mapping so will not allow 'bestfit'
10698 % style of image sparseion.
10700 % Affine, Perspective, and Bilinear, will do least squares fitting of
10701 % the distrotion when more than the minimum number of control point
10702 % pairs are provided.
10704 % Perspective, and Bilinear, will fall back to a Affine sparseion when
10705 % less than 4 control point pairs are provided. While Affine sparseions
10706 % will let you use any number of control point pairs, that is Zero pairs
10707 % is a No-Op (viewport only) distrotion, one pair is a translation and
10708 % two pairs of control points will do a scale-rotate-translate, without
10711 % o number_arguments: the number of arguments given for this sparseion
10714 % o arguments: the arguments for this sparseion method.
10717 WandExport MagickBooleanType MagickSparseColorImage(MagickWand *wand,
10718 const SparseColorMethod method,const size_t number_arguments,
10719 const double *arguments)
10724 assert(wand != (MagickWand *) NULL);
10725 assert(wand->signature == WandSignature);
10726 if (wand->debug != MagickFalse)
10727 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10728 if (wand->images == (Image *) NULL)
10729 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10730 sparse_image=SparseColorImage(wand->images,method,number_arguments,arguments,
10732 if (sparse_image == (Image *) NULL)
10733 return(MagickFalse);
10734 ReplaceImageInList(&wand->images,sparse_image);
10735 return(MagickTrue);
10739 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10743 % M a g i c k S p l i c e I m a g e %
10747 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10749 % MagickSpliceImage() splices a solid color into the image.
10751 % The format of the MagickSpliceImage method is:
10753 % MagickBooleanType MagickSpliceImage(MagickWand *wand,
10754 % const size_t width,const size_t height,const ssize_t x,
10757 % A description of each parameter follows:
10759 % o wand: the magick wand.
10761 % o width: the region width.
10763 % o height: the region height.
10765 % o x: the region x offset.
10767 % o y: the region y offset.
10770 WandExport MagickBooleanType MagickSpliceImage(MagickWand *wand,
10771 const size_t width,const size_t height,const ssize_t x,
10780 assert(wand != (MagickWand *) NULL);
10781 assert(wand->signature == WandSignature);
10782 if (wand->debug != MagickFalse)
10783 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10784 if (wand->images == (Image *) NULL)
10785 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10786 splice.width=width;
10787 splice.height=height;
10790 splice_image=SpliceImage(wand->images,&splice,wand->exception);
10791 if (splice_image == (Image *) NULL)
10792 return(MagickFalse);
10793 ReplaceImageInList(&wand->images,splice_image);
10794 return(MagickTrue);
10798 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10802 % M a g i c k S p r e a d I m a g e %
10806 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10808 % MagickSpreadImage() is a special effects method that randomly displaces each
10809 % pixel in a block defined by the radius parameter.
10811 % The format of the MagickSpreadImage method is:
10813 % MagickBooleanType MagickSpreadImage(MagickWand *wand,const double radius,
10814 % const PixelInterpolateMethod method)
10816 % A description of each parameter follows:
10818 % o wand: the magick wand.
10820 % o radius: Choose a random pixel in a neighborhood of this extent.
10822 % o method: the pixel interpolation method.
10825 WandExport MagickBooleanType MagickSpreadImage(MagickWand *wand,
10826 const double radius,const PixelInterpolateMethod method)
10831 assert(wand != (MagickWand *) NULL);
10832 assert(wand->signature == WandSignature);
10833 if (wand->debug != MagickFalse)
10834 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10835 if (wand->images == (Image *) NULL)
10836 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10837 spread_image=SpreadImage(wand->images,radius,method,wand->exception);
10838 if (spread_image == (Image *) NULL)
10839 return(MagickFalse);
10840 ReplaceImageInList(&wand->images,spread_image);
10841 return(MagickTrue);
10845 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10849 % M a g i c k S t a t i s t i c I m a g e %
10853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10855 % MagickStatisticImage() replace each pixel with corresponding statistic from
10856 % the neighborhood of the specified width and height.
10858 % The format of the MagickStatisticImage method is:
10860 % MagickBooleanType MagickStatisticImage(MagickWand *wand,
10861 % const StatisticType type,const double width,const size_t height)
10863 % A description of each parameter follows:
10865 % o wand: the magick wand.
10867 % o type: the statistic type (e.g. median, mode, etc.).
10869 % o width: the width of the pixel neighborhood.
10871 % o height: the height of the pixel neighborhood.
10874 WandExport MagickBooleanType MagickStatisticImage(MagickWand *wand,
10875 const StatisticType type,const size_t width,const size_t height)
10880 assert(wand != (MagickWand *) NULL);
10881 assert(wand->signature == WandSignature);
10882 if (wand->debug != MagickFalse)
10883 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10884 if (wand->images == (Image *) NULL)
10885 ThrowWandException(WandError,"ContainsNoImages",wand->name);
10886 statistic_image=StatisticImage(wand->images,type,width,height,
10888 if (statistic_image == (Image *) NULL)
10889 return(MagickFalse);
10890 ReplaceImageInList(&wand->images,statistic_image);
10891 return(MagickTrue);
10895 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10899 % M a g i c k S t e g a n o I m a g e %
10903 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10905 % MagickSteganoImage() hides a digital watermark within the image.
10906 % Recover the hidden watermark later to prove that the authenticity of
10907 % an image. Offset defines the start position within the image to hide
10910 % The format of the MagickSteganoImage method is:
10912 % MagickWand *MagickSteganoImage(MagickWand *wand,
10913 % const MagickWand *watermark_wand,const ssize_t offset)
10915 % A description of each parameter follows:
10917 % o wand: the magick wand.
10919 % o watermark_wand: the watermark wand.
10921 % o offset: Start hiding at this offset into the image.
10924 WandExport MagickWand *MagickSteganoImage(MagickWand *wand,
10925 const MagickWand *watermark_wand,const ssize_t offset)
10930 assert(wand != (MagickWand *) NULL);
10931 assert(wand->signature == WandSignature);
10932 if (wand->debug != MagickFalse)
10933 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10934 if ((wand->images == (Image *) NULL) ||
10935 (watermark_wand->images == (Image *) NULL))
10937 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
10938 "ContainsNoImages","`%s'",wand->name);
10939 return((MagickWand *) NULL);
10941 wand->images->offset=offset;
10942 stegano_image=SteganoImage(wand->images,watermark_wand->images,
10944 if (stegano_image == (Image *) NULL)
10945 return((MagickWand *) NULL);
10946 return(CloneMagickWandFromImages(wand,stegano_image));
10950 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10954 % M a g i c k S t e r e o I m a g e %
10958 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10960 % MagickStereoImage() composites two images and produces a single image that
10961 % is the composite of a left and right image of a stereo pair
10963 % The format of the MagickStereoImage method is:
10965 % MagickWand *MagickStereoImage(MagickWand *wand,
10966 % const MagickWand *offset_wand)
10968 % A description of each parameter follows:
10970 % o wand: the magick wand.
10972 % o offset_wand: Another image wand.
10975 WandExport MagickWand *MagickStereoImage(MagickWand *wand,
10976 const MagickWand *offset_wand)
10981 assert(wand != (MagickWand *) NULL);
10982 assert(wand->signature == WandSignature);
10983 if (wand->debug != MagickFalse)
10984 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
10985 if ((wand->images == (Image *) NULL) ||
10986 (offset_wand->images == (Image *) NULL))
10988 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
10989 "ContainsNoImages","`%s'",wand->name);
10990 return((MagickWand *) NULL);
10992 stereo_image=StereoImage(wand->images,offset_wand->images,wand->exception);
10993 if (stereo_image == (Image *) NULL)
10994 return((MagickWand *) NULL);
10995 return(CloneMagickWandFromImages(wand,stereo_image));
10999 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11003 % M a g i c k S t r i p I m a g e %
11007 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11009 % MagickStripImage() strips an image of all profiles and comments.
11011 % The format of the MagickStripImage method is:
11013 % MagickBooleanType MagickStripImage(MagickWand *wand)
11015 % A description of each parameter follows:
11017 % o wand: the magick wand.
11020 WandExport MagickBooleanType MagickStripImage(MagickWand *wand)
11022 assert(wand != (MagickWand *) NULL);
11023 assert(wand->signature == WandSignature);
11024 if (wand->debug != MagickFalse)
11025 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11026 if (wand->images == (Image *) NULL)
11027 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11028 return(StripImage(wand->images,wand->exception));
11032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11036 % M a g i c k S w i r l I m a g e %
11040 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11042 % MagickSwirlImage() swirls the pixels about the center of the image, where
11043 % degrees indicates the sweep of the arc through which each pixel is moved.
11044 % You get a more dramatic effect as the degrees move from 1 to 360.
11046 % The format of the MagickSwirlImage method is:
11048 % MagickBooleanType MagickSwirlImage(MagickWand *wand,const double degrees,
11049 % const PixelInterpolateMethod method)
11051 % A description of each parameter follows:
11053 % o wand: the magick wand.
11055 % o degrees: Define the tightness of the swirling effect.
11057 % o method: the pixel interpolation method.
11060 WandExport MagickBooleanType MagickSwirlImage(MagickWand *wand,
11061 const double degrees,const PixelInterpolateMethod method)
11066 assert(wand != (MagickWand *) NULL);
11067 assert(wand->signature == WandSignature);
11068 if (wand->debug != MagickFalse)
11069 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11070 if (wand->images == (Image *) NULL)
11071 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11072 swirl_image=SwirlImage(wand->images,degrees,method,wand->exception);
11073 if (swirl_image == (Image *) NULL)
11074 return(MagickFalse);
11075 ReplaceImageInList(&wand->images,swirl_image);
11076 return(MagickTrue);
11080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11084 % M a g i c k T e x t u r e I m a g e %
11088 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11090 % MagickTextureImage() repeatedly tiles the texture image across and down the
11093 % The format of the MagickTextureImage method is:
11095 % MagickWand *MagickTextureImage(MagickWand *wand,
11096 % const MagickWand *texture_wand)
11098 % A description of each parameter follows:
11100 % o wand: the magick wand.
11102 % o texture_wand: the texture wand
11105 WandExport MagickWand *MagickTextureImage(MagickWand *wand,
11106 const MagickWand *texture_wand)
11114 assert(wand != (MagickWand *) NULL);
11115 assert(wand->signature == WandSignature);
11116 if (wand->debug != MagickFalse)
11117 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11118 if ((wand->images == (Image *) NULL) ||
11119 (texture_wand->images == (Image *) NULL))
11121 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
11122 "ContainsNoImages","`%s'",wand->name);
11123 return((MagickWand *) NULL);
11125 texture_image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
11126 if (texture_image == (Image *) NULL)
11127 return((MagickWand *) NULL);
11128 status=TextureImage(texture_image,texture_wand->images,wand->exception);
11129 if (status == MagickFalse)
11131 texture_image=DestroyImage(texture_image);
11132 return((MagickWand *) NULL);
11134 return(CloneMagickWandFromImages(wand,texture_image));
11138 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11142 % M a g i c k T h r e s h o l d I m a g e %
11146 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11148 % MagickThresholdImage() changes the value of individual pixels based on
11149 % the intensity of each pixel compared to threshold. The result is a
11150 % high-contrast, two color image.
11152 % The format of the MagickThresholdImage method is:
11154 % MagickBooleanType MagickThresholdImage(MagickWand *wand,
11155 % const double threshold)
11156 % MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
11157 % const ChannelType channel,const double threshold)
11159 % A description of each parameter follows:
11161 % o wand: the magick wand.
11163 % o channel: the image channel(s).
11165 % o threshold: Define the threshold value.
11168 WandExport MagickBooleanType MagickThresholdImage(MagickWand *wand,
11169 const double threshold)
11174 status=MagickThresholdImageChannel(wand,DefaultChannels,threshold);
11178 WandExport MagickBooleanType MagickThresholdImageChannel(MagickWand *wand,
11179 const ChannelType channel,const double threshold)
11184 assert(wand != (MagickWand *) NULL);
11185 assert(wand->signature == WandSignature);
11186 if (wand->debug != MagickFalse)
11187 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11188 if (wand->images == (Image *) NULL)
11189 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11190 status=BilevelImage(wand->images,threshold,wand->exception);
11195 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11199 % M a g i c k T h u m b n a i l I m a g e %
11203 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11205 % MagickThumbnailImage() changes the size of an image to the given dimensions
11206 % and removes any associated profiles. The goal is to produce small low cost
11207 % thumbnail images suited for display on the Web.
11209 % The format of the MagickThumbnailImage method is:
11211 % MagickBooleanType MagickThumbnailImage(MagickWand *wand,
11212 % const size_t columns,const size_t rows)
11214 % A description of each parameter follows:
11216 % o wand: the magick wand.
11218 % o columns: the number of columns in the scaled image.
11220 % o rows: the number of rows in the scaled image.
11223 WandExport MagickBooleanType MagickThumbnailImage(MagickWand *wand,
11224 const size_t columns,const size_t rows)
11229 assert(wand != (MagickWand *) NULL);
11230 assert(wand->signature == WandSignature);
11231 if (wand->debug != MagickFalse)
11232 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11233 if (wand->images == (Image *) NULL)
11234 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11235 thumbnail_image=ThumbnailImage(wand->images,columns,rows,wand->exception);
11236 if (thumbnail_image == (Image *) NULL)
11237 return(MagickFalse);
11238 ReplaceImageInList(&wand->images,thumbnail_image);
11239 return(MagickTrue);
11243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11247 % M a g i c k T i n t I m a g e %
11251 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11253 % MagickTintImage() applies a color vector to each pixel in the image. The
11254 % length of the vector is 0 for black and white and at its maximum for the
11255 % midtones. The vector weighting function is
11256 % f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).
11258 % The format of the MagickTintImage method is:
11260 % MagickBooleanType MagickTintImage(MagickWand *wand,
11261 % const PixelWand *tint,const PixelWand *blend)
11263 % A description of each parameter follows:
11265 % o wand: the magick wand.
11267 % o tint: the tint pixel wand.
11269 % o alpha: the alpha pixel wand.
11272 WandExport MagickBooleanType MagickTintImage(MagickWand *wand,
11273 const PixelWand *tint,const PixelWand *blend)
11276 percent_blend[MaxTextExtent];
11284 assert(wand != (MagickWand *) NULL);
11285 assert(wand->signature == WandSignature);
11286 if (wand->debug != MagickFalse)
11287 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11288 if (wand->images == (Image *) NULL)
11289 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11290 if (wand->images->colorspace != CMYKColorspace)
11291 (void) FormatLocaleString(percent_blend,MaxTextExtent,
11292 "%g,%g,%g,%g",(double) (100.0*QuantumScale*
11293 PixelGetRedQuantum(blend)),(double) (100.0*QuantumScale*
11294 PixelGetGreenQuantum(blend)),(double) (100.0*QuantumScale*
11295 PixelGetBlueQuantum(blend)),(double) (100.0*QuantumScale*
11296 PixelGetAlphaQuantum(blend)));
11298 (void) FormatLocaleString(percent_blend,MaxTextExtent,
11299 "%g,%g,%g,%g,%g",(double) (100.0*QuantumScale*
11300 PixelGetCyanQuantum(blend)),(double) (100.0*QuantumScale*
11301 PixelGetMagentaQuantum(blend)),(double) (100.0*QuantumScale*
11302 PixelGetYellowQuantum(blend)),(double) (100.0*QuantumScale*
11303 PixelGetBlackQuantum(blend)),(double) (100.0*QuantumScale*
11304 PixelGetAlphaQuantum(blend)));
11305 target=PixelGetPixel(tint);
11306 tint_image=TintImage(wand->images,percent_blend,&target,wand->exception);
11307 if (tint_image == (Image *) NULL)
11308 return(MagickFalse);
11309 ReplaceImageInList(&wand->images,tint_image);
11310 return(MagickTrue);
11314 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11318 % M a g i c k T r a n s f o r m I m a g e %
11322 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11324 % MagickTransformImage() is a convenience method that behaves like
11325 % MagickResizeImage() or MagickCropImage() but accepts scaling and/or cropping
11326 % information as a region geometry specification. If the operation fails,
11327 % a NULL image handle is returned.
11329 % The format of the MagickTransformImage method is:
11331 % MagickWand *MagickTransformImage(MagickWand *wand,const char *crop,
11332 % const char *geometry)
11334 % A description of each parameter follows:
11336 % o wand: the magick wand.
11338 % o crop: A crop geometry string. This geometry defines a subregion of the
11341 % o geometry: An image geometry string. This geometry defines the final
11342 % size of the image.
11345 WandExport MagickWand *MagickTransformImage(MagickWand *wand,
11346 const char *crop,const char *geometry)
11354 assert(wand != (MagickWand *) NULL);
11355 assert(wand->signature == WandSignature);
11356 if (wand->debug != MagickFalse)
11357 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11358 if (wand->images == (Image *) NULL)
11359 return((MagickWand *) NULL);
11360 transform_image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
11361 if (transform_image == (Image *) NULL)
11362 return((MagickWand *) NULL);
11363 status=TransformImage(&transform_image,crop,geometry,wand->exception);
11364 if (status == MagickFalse)
11366 transform_image=DestroyImage(transform_image);
11367 return((MagickWand *) NULL);
11369 return(CloneMagickWandFromImages(wand,transform_image));
11373 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11377 % 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 %
11381 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11383 % MagickTransformImageColorspace() transform the image colorspace.
11385 % The format of the MagickTransformImageColorspace method is:
11387 % MagickBooleanType MagickTransformImageColorspace(MagickWand *wand,
11388 % const ColorspaceType colorspace)
11390 % A description of each parameter follows:
11392 % o wand: the magick wand.
11394 % o colorspace: the image colorspace: UndefinedColorspace, RGBColorspace,
11395 % GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace,
11396 % YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace,
11397 % YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace,
11398 % HSLColorspace, or HWBColorspace.
11401 WandExport MagickBooleanType MagickTransformImageColorspace(MagickWand *wand,
11402 const ColorspaceType colorspace)
11404 assert(wand != (MagickWand *) NULL);
11405 assert(wand->signature == WandSignature);
11406 if (wand->debug != MagickFalse)
11407 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11408 if (wand->images == (Image *) NULL)
11409 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11410 return(TransformImageColorspace(wand->images,colorspace,wand->exception));
11414 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11418 % 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 %
11422 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11424 % MagickTransparentPaintImage() changes any pixel that matches color with the
11425 % color defined by fill.
11427 % The format of the MagickTransparentPaintImage method is:
11429 % MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
11430 % const PixelWand *target,const double alpha,const double fuzz,
11431 % const MagickBooleanType invert)
11433 % A description of each parameter follows:
11435 % o wand: the magick wand.
11437 % o target: Change this target color to specified alpha value within
11440 % o alpha: the level of transparency: 1.0 is fully opaque and 0.0 is fully
11443 % o fuzz: By default target must match a particular pixel color
11444 % exactly. However, in many cases two colors may differ by a small amount.
11445 % The fuzz member of image defines how much tolerance is acceptable to
11446 % consider two colors as the same. For example, set fuzz to 10 and the
11447 % color red at intensities of 100 and 102 respectively are now interpreted
11448 % as the same color for the purposes of the floodfill.
11450 % o invert: paint any pixel that does not match the target color.
11453 WandExport MagickBooleanType MagickTransparentPaintImage(MagickWand *wand,
11454 const PixelWand *target,const double alpha,const double fuzz,
11455 const MagickBooleanType invert)
11463 assert(wand != (MagickWand *) NULL);
11464 assert(wand->signature == WandSignature);
11465 if (wand->debug != MagickFalse)
11466 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11467 if (wand->images == (Image *) NULL)
11468 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11469 PixelGetMagickColor(target,&target_pixel);
11470 wand->images->fuzz=fuzz;
11471 status=TransparentPaintImage(wand->images,&target_pixel,ClampToQuantum(
11472 QuantumRange*alpha),invert,wand->exception);
11477 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11481 % M a g i c k T r a n s p o s e I m a g e %
11485 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11487 % MagickTransposeImage() creates a vertical mirror image by reflecting the
11488 % pixels around the central x-axis while rotating them 90-degrees.
11490 % The format of the MagickTransposeImage method is:
11492 % MagickBooleanType MagickTransposeImage(MagickWand *wand)
11494 % A description of each parameter follows:
11496 % o wand: the magick wand.
11499 WandExport MagickBooleanType MagickTransposeImage(MagickWand *wand)
11504 assert(wand != (MagickWand *) NULL);
11505 assert(wand->signature == WandSignature);
11506 if (wand->debug != MagickFalse)
11507 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11508 if (wand->images == (Image *) NULL)
11509 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11510 transpose_image=TransposeImage(wand->images,wand->exception);
11511 if (transpose_image == (Image *) NULL)
11512 return(MagickFalse);
11513 ReplaceImageInList(&wand->images,transpose_image);
11514 return(MagickTrue);
11518 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11522 % M a g i c k T r a n s v e r s e I m a g e %
11526 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11528 % MagickTransverseImage() creates a horizontal mirror image by reflecting the
11529 % pixels around the central y-axis while rotating them 270-degrees.
11531 % The format of the MagickTransverseImage method is:
11533 % MagickBooleanType MagickTransverseImage(MagickWand *wand)
11535 % A description of each parameter follows:
11537 % o wand: the magick wand.
11540 WandExport MagickBooleanType MagickTransverseImage(MagickWand *wand)
11545 assert(wand != (MagickWand *) NULL);
11546 assert(wand->signature == WandSignature);
11547 if (wand->debug != MagickFalse)
11548 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11549 if (wand->images == (Image *) NULL)
11550 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11551 transverse_image=TransverseImage(wand->images,wand->exception);
11552 if (transverse_image == (Image *) NULL)
11553 return(MagickFalse);
11554 ReplaceImageInList(&wand->images,transverse_image);
11555 return(MagickTrue);
11559 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11563 % M a g i c k T r i m I m a g e %
11567 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11569 % MagickTrimImage() remove edges that are the background color from the image.
11571 % The format of the MagickTrimImage method is:
11573 % MagickBooleanType MagickTrimImage(MagickWand *wand,const double fuzz)
11575 % A description of each parameter follows:
11577 % o wand: the magick wand.
11579 % o fuzz: By default target must match a particular pixel color
11580 % exactly. However, in many cases two colors may differ by a small amount.
11581 % The fuzz member of image defines how much tolerance is acceptable to
11582 % consider two colors as the same. For example, set fuzz to 10 and the
11583 % color red at intensities of 100 and 102 respectively are now interpreted
11584 % as the same color for the purposes of the floodfill.
11587 WandExport MagickBooleanType MagickTrimImage(MagickWand *wand,const double fuzz)
11592 assert(wand != (MagickWand *) NULL);
11593 assert(wand->signature == WandSignature);
11594 if (wand->debug != MagickFalse)
11595 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11596 if (wand->images == (Image *) NULL)
11597 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11598 wand->images->fuzz=fuzz;
11599 trim_image=TrimImage(wand->images,wand->exception);
11600 if (trim_image == (Image *) NULL)
11601 return(MagickFalse);
11602 ReplaceImageInList(&wand->images,trim_image);
11603 return(MagickTrue);
11607 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11611 % M a g i c k U n i q u e I m a g e C o l o r s %
11615 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11617 % MagickUniqueImageColors() discards all but one of any pixel color.
11619 % The format of the MagickUniqueImageColors method is:
11621 % MagickBooleanType MagickUniqueImageColors(MagickWand *wand)
11623 % A description of each parameter follows:
11625 % o wand: the magick wand.
11628 WandExport MagickBooleanType MagickUniqueImageColors(MagickWand *wand)
11633 assert(wand != (MagickWand *) NULL);
11634 assert(wand->signature == WandSignature);
11635 if (wand->debug != MagickFalse)
11636 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11637 if (wand->images == (Image *) NULL)
11638 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11639 unique_image=UniqueImageColors(wand->images,wand->exception);
11640 if (unique_image == (Image *) NULL)
11641 return(MagickFalse);
11642 ReplaceImageInList(&wand->images,unique_image);
11643 return(MagickTrue);
11647 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11651 % M a g i c k U n s h a r p M a s k I m a g e %
11655 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11657 % MagickUnsharpMaskImage() sharpens an image. We convolve the image with a
11658 % Gaussian operator of the given radius and standard deviation (sigma).
11659 % For reasonable results, radius should be larger than sigma. Use a radius
11660 % of 0 and UnsharpMaskImage() selects a suitable radius for you.
11662 % The format of the MagickUnsharpMaskImage method is:
11664 % MagickBooleanType MagickUnsharpMaskImage(MagickWand *wand,
11665 % const double radius,const double sigma,const double amount,
11666 % const double threshold)
11668 % A description of each parameter follows:
11670 % o wand: the magick wand.
11672 % o radius: the radius of the Gaussian, in pixels, not counting the center
11675 % o sigma: the standard deviation of the Gaussian, in pixels.
11677 % o amount: the percentage of the difference between the original and the
11678 % blur image that is added back into the original.
11680 % o threshold: the threshold in pixels needed to apply the diffence amount.
11683 WandExport MagickBooleanType MagickUnsharpMaskImage(MagickWand *wand,
11684 const double radius,const double sigma,const double amount,
11685 const double threshold)
11690 assert(wand != (MagickWand *) NULL);
11691 assert(wand->signature == WandSignature);
11692 if (wand->debug != MagickFalse)
11693 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11694 if (wand->images == (Image *) NULL)
11695 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11696 unsharp_image=UnsharpMaskImage(wand->images,radius,sigma,amount,threshold,
11698 if (unsharp_image == (Image *) NULL)
11699 return(MagickFalse);
11700 ReplaceImageInList(&wand->images,unsharp_image);
11701 return(MagickTrue);
11705 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11709 % M a g i c k V i g n e t t e I m a g e %
11713 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11715 % MagickVignetteImage() softens the edges of the image in vignette style.
11717 % The format of the MagickVignetteImage method is:
11719 % MagickBooleanType MagickVignetteImage(MagickWand *wand,
11720 % const double black_point,const double white_point,const ssize_t x,
11723 % A description of each parameter follows:
11725 % o wand: the magick wand.
11727 % o black_point: the black point.
11729 % o white_point: the white point.
11731 % o x, y: Define the x and y ellipse offset.
11734 WandExport MagickBooleanType MagickVignetteImage(MagickWand *wand,
11735 const double black_point,const double white_point,const ssize_t x,const ssize_t y)
11740 assert(wand != (MagickWand *) NULL);
11741 assert(wand->signature == WandSignature);
11742 if (wand->debug != MagickFalse)
11743 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11744 if (wand->images == (Image *) NULL)
11745 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11746 vignette_image=VignetteImage(wand->images,black_point,white_point,x,y,
11748 if (vignette_image == (Image *) NULL)
11749 return(MagickFalse);
11750 ReplaceImageInList(&wand->images,vignette_image);
11751 return(MagickTrue);
11755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11759 % M a g i c k W a v e I m a g e %
11763 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11765 % MagickWaveImage() creates a "ripple" effect in the image by shifting
11766 % the pixels vertically along a sine wave whose amplitude and wavelength
11767 % is specified by the given parameters.
11769 % The format of the MagickWaveImage method is:
11771 % MagickBooleanType MagickWaveImage(MagickWand *wand,
11772 % const double amplitude,const double wave_length,
11773 % const PixelInterpolateMethod method)
11775 % A description of each parameter follows:
11777 % o wand: the magick wand.
11779 % o amplitude, wave_length: Define the amplitude and wave length of the
11782 % o method: the pixel interpolation method.
11785 WandExport MagickBooleanType MagickWaveImage(MagickWand *wand,
11786 const double amplitude,const double wave_length,
11787 const PixelInterpolateMethod method)
11792 assert(wand != (MagickWand *) NULL);
11793 assert(wand->signature == WandSignature);
11794 if (wand->debug != MagickFalse)
11795 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11796 if (wand->images == (Image *) NULL)
11797 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11798 wave_image=WaveImage(wand->images,amplitude,wave_length,method,
11800 if (wave_image == (Image *) NULL)
11801 return(MagickFalse);
11802 ReplaceImageInList(&wand->images,wave_image);
11803 return(MagickTrue);
11807 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11811 % 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 %
11815 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11817 % MagickWhiteThresholdImage() is like ThresholdImage() but force all pixels
11818 % above the threshold into white while leaving all pixels below the threshold
11821 % The format of the MagickWhiteThresholdImage method is:
11823 % MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
11824 % const PixelWand *threshold)
11826 % A description of each parameter follows:
11828 % o wand: the magick wand.
11830 % o threshold: the pixel wand.
11833 WandExport MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
11834 const PixelWand *threshold)
11837 thresholds[MaxTextExtent];
11839 assert(wand != (MagickWand *) NULL);
11840 assert(wand->signature == WandSignature);
11841 if (wand->debug != MagickFalse)
11842 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11843 if (wand->images == (Image *) NULL)
11844 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11845 (void) FormatLocaleString(thresholds,MaxTextExtent,
11846 QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
11847 PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
11848 PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
11849 return(WhiteThresholdImage(wand->images,thresholds,wand->exception));
11853 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11857 % M a g i c k W r i t e I m a g e %
11861 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11863 % MagickWriteImage() writes an image to the specified filename. If the
11864 % filename parameter is NULL, the image is written to the filename set
11865 % by MagickReadImage() or MagickSetImageFilename().
11867 % The format of the MagickWriteImage method is:
11869 % MagickBooleanType MagickWriteImage(MagickWand *wand,
11870 % const char *filename)
11872 % A description of each parameter follows:
11874 % o wand: the magick wand.
11876 % o filename: the image filename.
11880 WandExport MagickBooleanType MagickWriteImage(MagickWand *wand,
11881 const char *filename)
11892 assert(wand != (MagickWand *) NULL);
11893 assert(wand->signature == WandSignature);
11894 if (wand->debug != MagickFalse)
11895 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11896 if (wand->images == (Image *) NULL)
11897 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11898 if (filename != (const char *) NULL)
11899 (void) CopyMagickString(wand->images->filename,filename,MaxTextExtent);
11900 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
11901 if (image == (Image *) NULL)
11902 return(MagickFalse);
11903 write_info=CloneImageInfo(wand->image_info);
11904 write_info->adjoin=MagickTrue;
11905 status=WriteImage(write_info,image,wand->exception);
11906 image=DestroyImage(image);
11907 write_info=DestroyImageInfo(write_info);
11912 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11916 % M a g i c k W r i t e I m a g e F i l e %
11920 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11922 % MagickWriteImageFile() writes an image to an open file descriptor.
11924 % The format of the MagickWriteImageFile method is:
11926 % MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)
11928 % A description of each parameter follows:
11930 % o wand: the magick wand.
11932 % o file: the file descriptor.
11935 WandExport MagickBooleanType MagickWriteImageFile(MagickWand *wand,FILE *file)
11946 assert(wand != (MagickWand *) NULL);
11947 assert(wand->signature == WandSignature);
11948 assert(file != (FILE *) NULL);
11949 if (wand->debug != MagickFalse)
11950 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
11951 if (wand->images == (Image *) NULL)
11952 ThrowWandException(WandError,"ContainsNoImages",wand->name);
11953 image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
11954 if (image == (Image *) NULL)
11955 return(MagickFalse);
11956 write_info=CloneImageInfo(wand->image_info);
11957 SetImageInfoFile(write_info,file);
11958 write_info->adjoin=MagickTrue;
11959 status=WriteImage(write_info,image,wand->exception);
11960 write_info=DestroyImageInfo(write_info);
11961 image=DestroyImage(image);
11966 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11970 % M a g i c k W r i t e I m a g e s %
11974 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11976 % MagickWriteImages() writes an image or image sequence.
11978 % The format of the MagickWriteImages method is:
11980 % MagickBooleanType MagickWriteImages(MagickWand *wand,
11981 % const char *filename,const MagickBooleanType adjoin)
11983 % A description of each parameter follows:
11985 % o wand: the magick wand.
11987 % o filename: the image filename.
11989 % o adjoin: join images into a single multi-image file.
11992 WandExport MagickBooleanType MagickWriteImages(MagickWand *wand,
11993 const char *filename,const MagickBooleanType adjoin)
12001 assert(wand != (MagickWand *) NULL);
12002 assert(wand->signature == WandSignature);
12003 if (wand->debug != MagickFalse)
12004 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12005 if (wand->images == (Image *) NULL)
12006 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12007 write_info=CloneImageInfo(wand->image_info);
12008 write_info->adjoin=adjoin;
12009 status=WriteImages(write_info,wand->images,filename,wand->exception);
12010 write_info=DestroyImageInfo(write_info);
12015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12019 % M a g i c k W r i t e I m a g e s F i l e %
12023 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12025 % MagickWriteImagesFile() writes an image sequence to an open file descriptor.
12027 % The format of the MagickWriteImagesFile method is:
12029 % MagickBooleanType MagickWriteImagesFile(MagickWand *wand,FILE *file)
12031 % A description of each parameter follows:
12033 % o wand: the magick wand.
12035 % o file: the file descriptor.
12038 WandExport MagickBooleanType MagickWriteImagesFile(MagickWand *wand,FILE *file)
12046 assert(wand != (MagickWand *) NULL);
12047 assert(wand->signature == WandSignature);
12048 if (wand->debug != MagickFalse)
12049 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
12050 if (wand->images == (Image *) NULL)
12051 ThrowWandException(WandError,"ContainsNoImages",wand->name);
12052 write_info=CloneImageInfo(wand->image_info);
12053 SetImageInfoFile(write_info,file);
12054 write_info->adjoin=MagickTrue;
12055 status=WriteImages(write_info,wand->images,(const char *) NULL,
12057 write_info=DestroyImageInfo(write_info);