00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #include "wand/studio.h"
00050 #include "wand/MagickWand.h"
00051 #include "wand/magick-wand-private.h"
00052 #include "wand/wand.h"
00053
00054
00055
00056
00057 #define ThrowWandException(severity,tag,context) \
00058 { \
00059 (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
00060 tag,"`%s'",context); \
00061 return(MagickFalse); \
00062 }
00063 #define MagickWandId "MagickWand"
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
00092 Image *images)
00093 {
00094 MagickWand
00095 *clone_wand;
00096
00097 assert(wand != (MagickWand *) NULL);
00098 assert(wand->signature == WandSignature);
00099 if (wand->debug != MagickFalse)
00100 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00101 clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
00102 if (clone_wand == (MagickWand *) NULL)
00103 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
00104 images->filename);
00105 (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
00106 clone_wand->id=AcquireWandId();
00107 (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
00108 MagickWandId,clone_wand->id);
00109 clone_wand->exception=AcquireExceptionInfo();
00110 InheritException(clone_wand->exception,wand->exception);
00111 clone_wand->image_info=CloneImageInfo(wand->image_info);
00112 clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
00113 clone_wand->images=images;
00114 clone_wand->debug=IsEventLogging();
00115 if (clone_wand->debug != MagickFalse)
00116 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
00117 clone_wand->signature=WandSignature;
00118 return(clone_wand);
00119 }
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 WandExport Image *GetImageFromMagickWand(const MagickWand *wand)
00144 {
00145 assert(wand != (MagickWand *) NULL);
00146 assert(wand->signature == WandSignature);
00147 if (wand->debug != MagickFalse)
00148 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00149 if (wand->images == (Image *) NULL)
00150 {
00151 (void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
00152 "ContainsNoImages","`%s'",wand->name);
00153 return((Image *) NULL);
00154 }
00155 return(wand->images);
00156 }
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196 WandExport MagickBooleanType MagickAdaptiveBlurImage(MagickWand *wand,
00197 const double radius,const double sigma)
00198 {
00199 MagickBooleanType
00200 status;
00201
00202 status=MagickAdaptiveBlurImageChannel(wand,DefaultChannels,radius,sigma);
00203 return(status);
00204 }
00205
00206 WandExport MagickBooleanType MagickAdaptiveBlurImageChannel(MagickWand *wand,
00207 const ChannelType channel,const double radius,const double sigma)
00208 {
00209 Image
00210 *sharp_image;
00211
00212 assert(wand != (MagickWand *) NULL);
00213 assert(wand->signature == WandSignature);
00214 if (wand->debug != MagickFalse)
00215 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00216 if (wand->images == (Image *) NULL)
00217 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00218 sharp_image=AdaptiveBlurImageChannel(wand->images,channel,radius,sigma,
00219 wand->exception);
00220 if (sharp_image == (Image *) NULL)
00221 return(MagickFalse);
00222 ReplaceImageInList(&wand->images,sharp_image);
00223 return(MagickTrue);
00224 }
00225
00226
00227
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252 WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
00253 const unsigned long columns,const unsigned long rows)
00254 {
00255 Image
00256 *resize_image;
00257
00258 assert(wand != (MagickWand *) NULL);
00259 assert(wand->signature == WandSignature);
00260 if (wand->debug != MagickFalse)
00261 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00262 if (wand->images == (Image *) NULL)
00263 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00264 resize_image=AdaptiveResizeImage(wand->images,columns,rows,wand->exception);
00265 if (resize_image == (Image *) NULL)
00266 return(MagickFalse);
00267 ReplaceImageInList(&wand->images,resize_image);
00268 return(MagickTrue);
00269 }
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309 WandExport MagickBooleanType MagickAdaptiveSharpenImage(MagickWand *wand,
00310 const double radius,const double sigma)
00311 {
00312 MagickBooleanType
00313 status;
00314
00315 status=MagickAdaptiveSharpenImageChannel(wand,DefaultChannels,radius,sigma);
00316 return(status);
00317 }
00318
00319 WandExport MagickBooleanType MagickAdaptiveSharpenImageChannel(MagickWand *wand,
00320 const ChannelType channel,const double radius,const double sigma)
00321 {
00322 Image
00323 *sharp_image;
00324
00325 assert(wand != (MagickWand *) NULL);
00326 assert(wand->signature == WandSignature);
00327 if (wand->debug != MagickFalse)
00328 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00329 if (wand->images == (Image *) NULL)
00330 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00331 sharp_image=AdaptiveSharpenImageChannel(wand->images,channel,radius,sigma,
00332 wand->exception);
00333 if (sharp_image == (Image *) NULL)
00334 return(MagickFalse);
00335 ReplaceImageInList(&wand->images,sharp_image);
00336 return(MagickTrue);
00337 }
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371 WandExport MagickBooleanType MagickAdaptiveThresholdImage(MagickWand *wand,
00372 const unsigned long width,const unsigned long height,const long offset)
00373 {
00374 Image
00375 *threshold_image;
00376
00377 assert(wand != (MagickWand *) NULL);
00378 assert(wand->signature == WandSignature);
00379 if (wand->debug != MagickFalse)
00380 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00381 if (wand->images == (Image *) NULL)
00382 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00383 threshold_image=AdaptiveThresholdImage(wand->images,width,height,offset,
00384 wand->exception);
00385 if (threshold_image == (Image *) NULL)
00386 return(MagickFalse);
00387 ReplaceImageInList(&wand->images,threshold_image);
00388 return(MagickTrue);
00389 }
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418 static inline MagickBooleanType InsertImageInWand(MagickWand *wand,
00419 Image *images)
00420 {
00421 Image
00422 *sentinel;
00423
00424 sentinel=wand->images;
00425 if (sentinel == (Image *) NULL)
00426 {
00427 wand->images=GetFirstImageInList(images);
00428 return(MagickTrue);
00429 }
00430 if (wand->active == MagickFalse)
00431 {
00432 if ((wand->pend != MagickFalse) && (sentinel->next == (Image *) NULL))
00433 {
00434 AppendImageToList(&sentinel,images);
00435 wand->images=GetLastImageInList(images);
00436 return(MagickTrue);
00437 }
00438 if ((wand->pend != MagickFalse) && (sentinel->previous == (Image *) NULL))
00439 {
00440 PrependImageToList(&sentinel,images);
00441 wand->images=GetFirstImageInList(images);
00442 return(MagickTrue);
00443 }
00444 }
00445 InsertImageInList(&sentinel,images);
00446 wand->images=GetFirstImageInList(images);
00447 return(MagickTrue);
00448 }
00449
00450 WandExport MagickBooleanType MagickAddImage(MagickWand *wand,
00451 const MagickWand *add_wand)
00452 {
00453 Image
00454 *images;
00455
00456 assert(wand != (MagickWand *) NULL);
00457 assert(wand->signature == WandSignature);
00458 if (wand->debug != MagickFalse)
00459 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00460 assert(add_wand != (MagickWand *) NULL);
00461 assert(add_wand->signature == WandSignature);
00462 if (add_wand->images == (Image *) NULL)
00463 ThrowWandException(WandError,"ContainsNoImages",add_wand->name);
00464 images=CloneImageList(add_wand->images,wand->exception);
00465 if (images == (Image *) NULL)
00466 return(MagickFalse);
00467 return(InsertImageInWand(wand,images));
00468 }
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496
00497
00498
00499
00500 WandExport MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
00501 const NoiseType noise_type)
00502 {
00503 MagickBooleanType
00504 status;
00505
00506 status=MagickAddNoiseImageChannel(wand,DefaultChannels,noise_type);
00507 return(status);
00508 }
00509
00510 WandExport MagickBooleanType MagickAddNoiseImageChannel(MagickWand *wand,
00511 const ChannelType channel,const NoiseType noise_type)
00512 {
00513 Image
00514 *noise_image;
00515
00516 assert(wand != (MagickWand *) NULL);
00517 assert(wand->signature == WandSignature);
00518 if (wand->debug != MagickFalse)
00519 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00520 if (wand->images == (Image *) NULL)
00521 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00522 noise_image=AddNoiseImageChannel(wand->images,channel,noise_type,
00523 wand->exception);
00524 if (noise_image == (Image *) NULL)
00525 return(MagickFalse);
00526 ReplaceImageInList(&wand->images,noise_image);
00527 return(MagickTrue);
00528 }
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552
00553
00554
00555
00556 WandExport MagickBooleanType MagickAffineTransformImage(MagickWand *wand,
00557 const DrawingWand *drawing_wand)
00558 {
00559 DrawInfo
00560 *draw_info;
00561
00562 Image
00563 *affine_image;
00564
00565 assert(wand != (MagickWand *) NULL);
00566 assert(wand->signature == WandSignature);
00567 if (wand->debug != MagickFalse)
00568 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00569 if (wand->images == (Image *) NULL)
00570 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00571 draw_info=PeekDrawingWand(drawing_wand);
00572 if (draw_info == (DrawInfo *) NULL)
00573 return(MagickFalse);
00574 affine_image=AffineTransformImage(wand->images,&draw_info->affine,
00575 wand->exception);
00576 draw_info=DestroyDrawInfo(draw_info);
00577 if (affine_image == (Image *) NULL)
00578 return(MagickFalse);
00579 ReplaceImageInList(&wand->images,affine_image);
00580 return(MagickTrue);
00581 }
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617 WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand,
00618 const DrawingWand *drawing_wand,const double x,const double y,
00619 const double angle,const char *text)
00620 {
00621 char
00622 geometry[MaxTextExtent];
00623
00624 DrawInfo
00625 *draw_info;
00626
00627 MagickBooleanType
00628 status;
00629
00630 assert(wand != (MagickWand *) NULL);
00631 assert(wand->signature == WandSignature);
00632 if (wand->debug != MagickFalse)
00633 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00634 if (wand->images == (Image *) NULL)
00635 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00636 draw_info=PeekDrawingWand(drawing_wand);
00637 if (draw_info == (DrawInfo *) NULL)
00638 return(MagickFalse);
00639 (void) CloneString(&draw_info->text,text);
00640 (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",x,y);
00641 draw_info->affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
00642 draw_info->affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
00643 draw_info->affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
00644 draw_info->affine.sy=cos(DegreesToRadians(fmod(angle,360.0)));
00645 (void) CloneString(&draw_info->geometry,geometry);
00646 status=AnnotateImage(wand->images,draw_info);
00647 draw_info=DestroyDrawInfo(draw_info);
00648 if (status == MagickFalse)
00649 InheritException(wand->exception,&wand->images->exception);
00650 return(status);
00651 }
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676
00677
00678 WandExport MagickBooleanType MagickAnimateImages(MagickWand *wand,
00679 const char *server_name)
00680 {
00681 MagickBooleanType
00682 status;
00683
00684 assert(wand != (MagickWand *) NULL);
00685 assert(wand->signature == WandSignature);
00686 if (wand->debug != MagickFalse)
00687 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00688 (void) CloneString(&wand->image_info->server_name,server_name);
00689 status=AnimateImages(wand->image_info,wand->images);
00690 if (status == MagickFalse)
00691 InheritException(wand->exception,&wand->images->exception);
00692 return(status);
00693 }
00694
00695
00696
00697
00698
00699
00700
00701
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721 WandExport MagickWand *MagickAppendImages(MagickWand *wand,
00722 const MagickBooleanType stack)
00723 {
00724 Image
00725 *append_image;
00726
00727 assert(wand != (MagickWand *) NULL);
00728 assert(wand->signature == WandSignature);
00729 if (wand->debug != MagickFalse)
00730 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00731 if (wand->images == (Image *) NULL)
00732 return((MagickWand *) NULL);
00733 append_image=AppendImages(wand->images,stack,wand->exception);
00734 if (append_image == (Image *) NULL)
00735 return((MagickWand *) NULL);
00736 return(CloneMagickWandFromImages(wand,append_image));
00737 }
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749
00750
00751
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761 WandExport MagickWand *MagickAverageImages(MagickWand *wand)
00762 {
00763 Image
00764 *average_image;
00765
00766 assert(wand != (MagickWand *) NULL);
00767 assert(wand->signature == WandSignature);
00768 if (wand->debug != MagickFalse)
00769 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00770 if (wand->images == (Image *) NULL)
00771 return((MagickWand *) NULL);
00772 average_image=AverageImages(wand->images,wand->exception);
00773 if (average_image == (Image *) NULL)
00774 return((MagickWand *) NULL);
00775 return(CloneMagickWandFromImages(wand,average_image));
00776 }
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805 WandExport MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
00806 const PixelWand *threshold)
00807 {
00808 char
00809 thresholds[MaxTextExtent];
00810
00811 MagickBooleanType
00812 status;
00813
00814 assert(wand != (MagickWand *) NULL);
00815 assert(wand->signature == WandSignature);
00816 if (wand->debug != MagickFalse)
00817 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00818 if (wand->images == (Image *) NULL)
00819 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00820 (void) FormatMagickString(thresholds,MaxTextExtent,
00821 QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
00822 PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
00823 PixelGetBlueQuantum(threshold),PixelGetOpacityQuantum(threshold));
00824 status=BlackThresholdImage(wand->images,thresholds);
00825 if (status == MagickFalse)
00826 InheritException(wand->exception,&wand->images->exception);
00827 return(status);
00828 }
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851
00852
00853
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866 WandExport MagickBooleanType MagickBlurImage(MagickWand *wand,
00867 const double radius,const double sigma)
00868 {
00869 MagickBooleanType
00870 status;
00871
00872 status=MagickBlurImageChannel(wand,DefaultChannels,radius,sigma);
00873 return(status);
00874 }
00875
00876 WandExport MagickBooleanType MagickBlurImageChannel(MagickWand *wand,
00877 const ChannelType channel,const double radius,const double sigma)
00878 {
00879 Image
00880 *blur_image;
00881
00882 assert(wand != (MagickWand *) NULL);
00883 assert(wand->signature == WandSignature);
00884 if (wand->debug != MagickFalse)
00885 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00886 if (wand->images == (Image *) NULL)
00887 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00888 blur_image=BlurImageChannel(wand->images,channel,radius,sigma,
00889 wand->exception);
00890 if (blur_image == (Image *) NULL)
00891 return(MagickFalse);
00892 ReplaceImageInList(&wand->images,blur_image);
00893 return(MagickTrue);
00894 }
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927 WandExport MagickBooleanType MagickBorderImage(MagickWand *wand,
00928 const PixelWand *bordercolor,const unsigned long width,
00929 const unsigned long height)
00930 {
00931 Image
00932 *border_image;
00933
00934 RectangleInfo
00935 border_info;
00936
00937 assert(wand != (MagickWand *) NULL);
00938 assert(wand->signature == WandSignature);
00939 if (wand->debug != MagickFalse)
00940 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00941 if (wand->images == (Image *) NULL)
00942 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00943 border_info.width=width;
00944 border_info.height=height;
00945 border_info.x=0;
00946 border_info.y=0;
00947 PixelGetQuantumColor(bordercolor,&wand->images->border_color);
00948 border_image=BorderImage(wand->images,&border_info,wand->exception);
00949 if (border_image == (Image *) NULL)
00950 return(MagickFalse);
00951 ReplaceImageInList(&wand->images,border_image);
00952 return(MagickTrue);
00953 }
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971
00972
00973
00974
00975
00976
00977
00978
00979
00980
00981
00982
00983 WandExport MagickBooleanType MagickCharcoalImage(MagickWand *wand,
00984 const double radius,const double sigma)
00985 {
00986 Image
00987 *charcoal_image;
00988
00989 assert(wand != (MagickWand *) NULL);
00990 assert(wand->signature == WandSignature);
00991 if (wand->debug != MagickFalse)
00992 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00993 if (wand->images == (Image *) NULL)
00994 ThrowWandException(WandError,"ContainsNoImages",wand->name);
00995 charcoal_image=CharcoalImage(wand->images,radius,sigma,wand->exception);
00996 if (charcoal_image == (Image *) NULL)
00997 return(MagickFalse);
00998 ReplaceImageInList(&wand->images,charcoal_image);
00999 return(MagickTrue);
01000 }
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020
01021
01022
01023
01024
01025
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036 WandExport MagickBooleanType MagickChopImage(MagickWand *wand,
01037 const unsigned long width,const unsigned long height,const long x,
01038 const long y)
01039 {
01040 Image
01041 *chop_image;
01042
01043 RectangleInfo
01044 chop;
01045
01046 assert(wand != (MagickWand *) NULL);
01047 assert(wand->signature == WandSignature);
01048 if (wand->debug != MagickFalse)
01049 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01050 if (wand->images == (Image *) NULL)
01051 ThrowWandException(WandError,"ContainsNoImages",wand->name);
01052 chop.width=width;
01053 chop.height=height;
01054 chop.x=x;
01055 chop.y=y;
01056 chop_image=ChopImage(wand->images,&chop,wand->exception);
01057 if (chop_image == (Image *) NULL)
01058 return(MagickFalse);
01059 ReplaceImageInList(&wand->images,chop_image);
01060 return(MagickTrue);
01061 }
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086 WandExport MagickBooleanType MagickClipImage(MagickWand *wand)
01087 {
01088 MagickBooleanType
01089 status;
01090
01091 assert(wand != (MagickWand *) NULL);
01092 assert(wand->signature == WandSignature);
01093 if (wand->debug != MagickFalse)
01094 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
01095 if (wand->images == (Image *) NULL)
01096 ThrowWandException(WandError,"ContainsNoImages",wand->name);
01097 status=ClipImage(wand->images);
01098 if (status == MagickFalse)
01099 InheritException(wand->exception,&wand->images->exception);
01100 return(status);
01101 }
01102
01103
01104
01105
01106
01107
01108
01109
01110
01111
01112
01113
01114
01115
01116
01117
01118
01119
01120
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131
01132