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/pixel-iterator.h"
00053 #include "wand/pixel-wand.h"
00054 #include "wand/wand.h"
00055
00056
00057
00058
00059 #define PixelIteratorId "PixelIterator"
00060
00061
00062
00063
00064 struct _PixelIterator
00065 {
00066 unsigned long
00067 id;
00068
00069 char
00070 name[MaxTextExtent];
00071
00072 ExceptionInfo
00073 *exception;
00074
00075 CacheView
00076 *view;
00077
00078 RectangleInfo
00079 region;
00080
00081 MagickBooleanType
00082 active;
00083
00084 long
00085 y;
00086
00087 PixelWand
00088 **pixel_wands;
00089
00090 MagickBooleanType
00091 debug;
00092
00093 unsigned long
00094 signature;
00095 };
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 WandExport void ClearPixelIterator(PixelIterator *iterator)
00120 {
00121 assert(iterator != (const PixelIterator *) NULL);
00122 assert(iterator->signature == WandSignature);
00123 if (iterator->debug != MagickFalse)
00124 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00125 iterator->pixel_wands=DestroyPixelWands(iterator->pixel_wands,
00126 iterator->region.width);
00127 ClearMagickException(iterator->exception);
00128 iterator->pixel_wands=NewPixelWands(iterator->region.width);
00129 iterator->active=MagickFalse;
00130 iterator->y=0;
00131 iterator->debug=IsEventLogging();
00132 }
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156 WandExport PixelIterator *ClonePixelIterator(const PixelIterator *iterator)
00157 {
00158 PixelIterator
00159 *clone_iterator;
00160
00161 assert(iterator != (PixelIterator *) NULL);
00162 assert(iterator->signature == WandSignature);
00163 if (iterator->debug != MagickFalse)
00164 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00165 clone_iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*clone_iterator));
00166 if (clone_iterator == (PixelIterator *) NULL)
00167 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
00168 iterator->name);
00169 (void) ResetMagickMemory(clone_iterator,0,sizeof(*clone_iterator));
00170 clone_iterator->id=AcquireWandId();
00171 (void) FormatMagickString(clone_iterator->name,MaxTextExtent,"%s-%lu",
00172 PixelIteratorId,clone_iterator->id);
00173 clone_iterator->exception=AcquireExceptionInfo();
00174 InheritException(clone_iterator->exception,iterator->exception);
00175 clone_iterator->view=CloneCacheView(iterator->view);
00176 clone_iterator->region=iterator->region;
00177 clone_iterator->active=iterator->active;
00178 clone_iterator->y=iterator->y;
00179 clone_iterator->pixel_wands=ClonePixelWands((const PixelWand **)
00180 iterator->pixel_wands,iterator->region.width);
00181 clone_iterator->debug=iterator->debug;
00182 if (clone_iterator->debug != MagickFalse)
00183 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",
00184 clone_iterator->name);
00185 clone_iterator->signature=WandSignature;
00186 return(clone_iterator);
00187 }
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205
00206
00207
00208
00209
00210
00211 WandExport PixelIterator *DestroyPixelIterator(PixelIterator *iterator)
00212 {
00213 assert(iterator != (const PixelIterator *) NULL);
00214 assert(iterator->signature == WandSignature);
00215 if (iterator->debug != MagickFalse)
00216 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00217 iterator->view=DestroyCacheView(iterator->view);
00218 iterator->pixel_wands=DestroyPixelWands(iterator->pixel_wands,
00219 iterator->region.width);
00220 iterator->exception=DestroyExceptionInfo(iterator->exception);
00221 iterator->signature=(~WandSignature);
00222 RelinquishWandId(iterator->id);
00223 iterator=(PixelIterator *) RelinquishMagickMemory(iterator);
00224 return(iterator);
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 WandExport MagickBooleanType IsPixelIterator(const PixelIterator *iterator)
00251 {
00252 size_t
00253 length;
00254
00255 if (iterator == (const PixelIterator *) NULL)
00256 return(MagickFalse);
00257 if (iterator->signature != WandSignature)
00258 return(MagickFalse);
00259 length=strlen(PixelIteratorId);
00260 if (LocaleNCompare(iterator->name,PixelIteratorId,length) != 0)
00261 return(MagickFalse);
00262 return(MagickTrue);
00263 }
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283
00284
00285
00286
00287 WandExport PixelIterator *NewPixelIterator(MagickWand *wand)
00288 {
00289 const char
00290 *quantum;
00291
00292 Image
00293 *image;
00294
00295 PixelIterator
00296 *iterator;
00297
00298 unsigned long
00299 depth;
00300
00301 CacheView
00302 *view;
00303
00304 depth=MAGICKCORE_QUANTUM_DEPTH;
00305 quantum=GetMagickQuantumDepth(&depth);
00306 if (depth != MAGICKCORE_QUANTUM_DEPTH)
00307 ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
00308 assert(wand != (MagickWand *) NULL);
00309 image=GetImageFromMagickWand(wand);
00310 if (image == (Image *) NULL)
00311 return((PixelIterator *) NULL);
00312 view=AcquireCacheView(image);
00313 if (view == (CacheView *) NULL)
00314 return((PixelIterator *) NULL);
00315 iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
00316 if (iterator == (PixelIterator *) NULL)
00317 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
00318 GetExceptionMessage(errno));
00319 (void) ResetMagickMemory(iterator,0,sizeof(*iterator));
00320 iterator->id=AcquireWandId();
00321 (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%lu",
00322 PixelIteratorId,iterator->id);
00323 iterator->exception=AcquireExceptionInfo();
00324 iterator->view=view;
00325 SetGeometry(image,&iterator->region);
00326 iterator->region.width=image->columns;
00327 iterator->region.height=image->rows;
00328 iterator->region.x=0;
00329 iterator->region.y=0;
00330 iterator->pixel_wands=NewPixelWands(iterator->region.width);
00331 iterator->y=0;
00332 iterator->debug=IsEventLogging();
00333 if (iterator->debug != MagickFalse)
00334 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00335 iterator->signature=WandSignature;
00336 return(iterator);
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 WandExport MagickBooleanType PixelClearIteratorException(
00363 PixelIterator *iterator)
00364 {
00365 assert(iterator != (PixelIterator *) NULL);
00366 assert(iterator->signature == WandSignature);
00367 if (iterator->debug != MagickFalse)
00368 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00369 ClearMagickException(iterator->exception);
00370 return(MagickTrue);
00371 }
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395
00396
00397
00398
00399 WandExport PixelIterator *NewPixelRegionIterator(MagickWand *wand,const long x,
00400 const long y,const unsigned long width,const unsigned long height)
00401 {
00402 const char
00403 *quantum;
00404
00405 Image
00406 *image;
00407
00408 PixelIterator
00409 *iterator;
00410
00411 unsigned long
00412 depth;
00413
00414 CacheView
00415 *view;
00416
00417 assert(wand != (MagickWand *) NULL);
00418 depth=MAGICKCORE_QUANTUM_DEPTH;
00419 quantum=GetMagickQuantumDepth(&depth);
00420 if (depth != MAGICKCORE_QUANTUM_DEPTH)
00421 ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
00422 if ((width == 0) || (width == 0))
00423 ThrowWandFatalException(WandError,"ZeroRegionSize",quantum);
00424 image=GetImageFromMagickWand(wand);
00425 if (image == (Image *) NULL)
00426 return((PixelIterator *) NULL);
00427 view=AcquireCacheView(image);
00428 if (view == (CacheView *) NULL)
00429 return((PixelIterator *) NULL);
00430 iterator=(PixelIterator *) AcquireMagickMemory(sizeof(*iterator));
00431 if (iterator == (PixelIterator *) NULL)
00432 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
00433 wand->name);
00434 (void) ResetMagickMemory(iterator,0,sizeof(*iterator));
00435 iterator->id=AcquireWandId();
00436 (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%lu",
00437 PixelIteratorId,iterator->id);
00438 iterator->exception=AcquireExceptionInfo();
00439 iterator->view=view;
00440 SetGeometry(image,&iterator->region);
00441 iterator->region.width=width;
00442 iterator->region.height=height;
00443 iterator->region.x=x;
00444 iterator->region.y=y;
00445 iterator->pixel_wands=NewPixelWands(iterator->region.width);
00446 iterator->y=0;
00447 iterator->debug=IsEventLogging();
00448 if (iterator->debug != MagickFalse)
00449 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00450 iterator->signature=WandSignature;
00451 return(iterator);
00452 }
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480 WandExport PixelWand **PixelGetCurrentIteratorRow(PixelIterator *iterator,
00481 unsigned long *number_wands)
00482 {
00483 register const IndexPacket
00484 *indexes;
00485
00486 register const PixelPacket
00487 *pixels;
00488
00489 register long
00490 x;
00491
00492 assert(iterator != (PixelIterator *) NULL);
00493 assert(iterator->signature == WandSignature);
00494 if (iterator->debug != MagickFalse)
00495 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00496 *number_wands=0;
00497 iterator->active=MagickTrue;
00498 pixels=GetCacheViewVirtualPixels(iterator->view,iterator->region.x,
00499 iterator->region.y+iterator->y,iterator->region.width,1,
00500 iterator->exception);
00501 if (pixels == (const PixelPacket *) NULL)
00502 {
00503 InheritException(iterator->exception,GetCacheViewException(
00504 iterator->view));
00505 return((PixelWand **) NULL);
00506 }
00507 indexes=GetCacheViewVirtualIndexQueue(iterator->view);
00508 for (x=0; x < (long) iterator->region.width; x++)
00509 PixelSetQuantumColor(iterator->pixel_wands[x],pixels+x);
00510 if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
00511 for (x=0; x < (long) iterator->region.width; x++)
00512 PixelSetBlackQuantum(iterator->pixel_wands[x],indexes[x]);
00513 if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
00514 for (x=0; x < (long) iterator->region.width; x++)
00515 PixelSetIndex(iterator->pixel_wands[x],indexes[x]);
00516 *number_wands=iterator->region.width;
00517 return(iterator->pixel_wands);
00518 }
00519
00520
00521
00522
00523
00524
00525
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546 WandExport char *PixelGetIteratorException(const PixelIterator *iterator,
00547 ExceptionType *severity)
00548 {
00549 char
00550 *description;
00551
00552 assert(iterator != (const PixelIterator *) NULL);
00553 assert(iterator->signature == WandSignature);
00554 if (iterator->debug != MagickFalse)
00555 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00556 assert(severity != (ExceptionType *) NULL);
00557 *severity=iterator->exception->severity;
00558 description=(char *) AcquireQuantumMemory(2UL*MaxTextExtent,
00559 sizeof(*description));
00560 if (description == (char *) NULL)
00561 ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
00562 iterator->name);
00563 *description='\0';
00564 if (iterator->exception->reason != (char *) NULL)
00565 (void) CopyMagickString(description,GetLocaleExceptionMessage(
00566 iterator->exception->severity,iterator->exception->reason),MaxTextExtent);
00567 if (iterator->exception->description != (char *) NULL)
00568 {
00569 (void) ConcatenateMagickString(description," (",MaxTextExtent);
00570 (void) ConcatenateMagickString(description,GetLocaleExceptionMessage(
00571 iterator->exception->severity,iterator->exception->description),
00572 MaxTextExtent);
00573 (void) ConcatenateMagickString(description,")",MaxTextExtent);
00574 }
00575 return(description);
00576 }
00577
00578
00579
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601 WandExport ExceptionType PixelGetIteratorExceptionType(
00602 const PixelIterator *wand)
00603 {
00604 assert(wand != (const PixelIterator *) NULL);
00605 assert(wand->signature == WandSignature);
00606 if (wand->debug != MagickFalse)
00607 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
00608 return(wand->exception->severity);
00609 }
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633 WandExport long PixelGetIteratorRow(PixelIterator *iterator)
00634 {
00635 assert(iterator != (const PixelIterator *) NULL);
00636 assert(iterator->signature == WandSignature);
00637 if (iterator->debug != MagickFalse)
00638 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00639 return(iterator->y);
00640 }
00641
00642
00643
00644
00645
00646
00647
00648
00649
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661
00662
00663
00664
00665
00666
00667
00668 WandExport PixelWand **PixelGetNextIteratorRow(PixelIterator *iterator,
00669 unsigned long *number_wands)
00670 {
00671 register const IndexPacket
00672 *indexes;
00673
00674 register const PixelPacket
00675 *pixels;
00676
00677 register long
00678 x;
00679
00680 assert(iterator != (PixelIterator *) NULL);
00681 assert(iterator->signature == WandSignature);
00682 if (iterator->debug != MagickFalse)
00683 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00684 *number_wands=0;
00685 if (iterator->active != MagickFalse)
00686 iterator->y++;
00687 if (PixelSetIteratorRow(iterator,iterator->y) == MagickFalse)
00688 return((PixelWand **) NULL);
00689 pixels=GetCacheViewVirtualPixels(iterator->view,iterator->region.x,
00690 iterator->region.y+iterator->y,iterator->region.width,1,
00691 iterator->exception);
00692 if (pixels == (const PixelPacket *) NULL)
00693 {
00694 InheritException(iterator->exception,GetCacheViewException(
00695 iterator->view));
00696 return((PixelWand **) NULL);
00697 }
00698 indexes=GetCacheViewVirtualIndexQueue(iterator->view);
00699 for (x=0; x < (long) iterator->region.width; x++)
00700 PixelSetQuantumColor(iterator->pixel_wands[x],pixels+x);
00701 if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
00702 for (x=0; x < (long) iterator->region.width; x++)
00703 PixelSetBlackQuantum(iterator->pixel_wands[x],indexes[x]);
00704 if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
00705 for (x=0; x < (long) iterator->region.width; x++)
00706 PixelSetIndex(iterator->pixel_wands[x],indexes[x]);
00707 *number_wands=iterator->region.width;
00708 return(iterator->pixel_wands);
00709 }
00710
00711
00712
00713
00714
00715
00716
00717
00718
00719
00720
00721
00722
00723
00724
00725
00726
00727
00728
00729
00730
00731
00732
00733
00734
00735
00736
00737
00738 WandExport PixelWand **PixelGetPreviousRow(PixelIterator *iterator)
00739 {
00740 unsigned long
00741 number_wands;
00742
00743 return(PixelGetPreviousIteratorRow(iterator,&number_wands));
00744 }
00745
00746 WandExport PixelWand **PixelGetPreviousIteratorRow(PixelIterator *iterator,
00747 unsigned long *number_wands)
00748 {
00749 register const IndexPacket
00750 *indexes;
00751
00752 register const PixelPacket
00753 *pixels;
00754
00755 register long
00756 x;
00757
00758 assert(iterator != (PixelIterator *) NULL);
00759 assert(iterator->signature == WandSignature);
00760 if (iterator->debug != MagickFalse)
00761 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00762 *number_wands=0;
00763 if (iterator->active != MagickFalse)
00764 iterator->y--;
00765 if (PixelSetIteratorRow(iterator,iterator->y) == MagickFalse)
00766 return((PixelWand **) NULL);
00767 pixels=GetCacheViewVirtualPixels(iterator->view,iterator->region.x,
00768 iterator->region.y+iterator->y,iterator->region.width,1,
00769 iterator->exception);
00770 if (pixels == (const PixelPacket *) NULL)
00771 {
00772 InheritException(iterator->exception,GetCacheViewException(
00773 iterator->view));
00774 return((PixelWand **) NULL);
00775 }
00776 indexes=GetCacheViewVirtualIndexQueue(iterator->view);
00777 for (x=0; x < (long) iterator->region.width; x++)
00778 PixelSetQuantumColor(iterator->pixel_wands[x],pixels+x);
00779 if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
00780 for (x=0; x < (long) iterator->region.width; x++)
00781 PixelSetBlackQuantum(iterator->pixel_wands[x],indexes[x]);
00782 if (GetCacheViewStorageClass(iterator->view) == PseudoClass)
00783 for (x=0; x < (long) iterator->region.width; x++)
00784 PixelSetIndex(iterator->pixel_wands[x],indexes[x]);
00785 *number_wands=iterator->region.width;
00786 return(iterator->pixel_wands);
00787 }
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813 WandExport void PixelResetIterator(PixelIterator *iterator)
00814 {
00815 assert(iterator != (PixelIterator *) NULL);
00816 assert(iterator->signature == WandSignature);
00817 if (iterator->debug != MagickFalse)
00818 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00819 iterator->active=MagickFalse;
00820 iterator->y=0;
00821 }
00822
00823
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834
00835
00836
00837
00838
00839
00840
00841
00842
00843
00844
00845 WandExport void PixelSetFirstIteratorRow(PixelIterator *iterator)
00846 {
00847 assert(iterator != (PixelIterator *) NULL);
00848 assert(iterator->signature == WandSignature);
00849 if (iterator->debug != MagickFalse)
00850 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00851 iterator->active=MagickFalse;
00852 iterator->y=iterator->region.y;
00853 }
00854
00855
00856
00857
00858
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873
00874
00875
00876
00877
00878 WandExport MagickBooleanType PixelSetIteratorRow(PixelIterator *iterator,
00879 const long row)
00880 {
00881 assert(iterator != (const PixelIterator *) NULL);
00882 assert(iterator->signature == WandSignature);
00883 if (iterator->debug != MagickFalse)
00884 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00885 if ((row < 0) || (row >= (long) iterator->region.height))
00886 return(MagickFalse);
00887 iterator->active=MagickTrue;
00888 iterator->y=row;
00889 return(MagickTrue);
00890 }
00891
00892
00893
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911
00912
00913
00914 WandExport void PixelSetLastIteratorRow(PixelIterator *iterator)
00915 {
00916 assert(iterator != (PixelIterator *) NULL);
00917 assert(iterator->signature == WandSignature);
00918 if (iterator->debug != MagickFalse)
00919 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00920 iterator->active=MagickFalse;
00921 iterator->y=(long) iterator->region.height-1;
00922 }
00923
00924
00925
00926
00927
00928
00929
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941
00942
00943
00944
00945
00946 WandExport MagickBooleanType PixelSyncIterator(PixelIterator *iterator)
00947 {
00948 ExceptionInfo
00949 *exception;
00950
00951 register IndexPacket
00952 *__restrict indexes;
00953
00954 register long
00955 x;
00956
00957 register PixelPacket
00958 *__restrict pixels;
00959
00960 assert(iterator != (const PixelIterator *) NULL);
00961 assert(iterator->signature == WandSignature);
00962 if (iterator->debug != MagickFalse)
00963 (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",iterator->name);
00964 if (SetCacheViewStorageClass(iterator->view,DirectClass) == MagickFalse)
00965 return(MagickFalse);
00966 exception=iterator->exception;
00967 pixels=GetCacheViewAuthenticPixels(iterator->view,iterator->region.x,
00968 iterator->region.y+iterator->y,iterator->region.width,1,exception);
00969 if (pixels == (PixelPacket *) NULL)
00970 {
00971 InheritException(iterator->exception,GetCacheViewException(
00972 iterator->view));
00973 return(MagickFalse);
00974 }
00975 indexes=GetCacheViewAuthenticIndexQueue(iterator->view);
00976 for (x=0; x < (long) iterator->region.width; x++)
00977 PixelGetQuantumColor(iterator->pixel_wands[x],pixels+x);
00978 if (GetCacheViewColorspace(iterator->view) == CMYKColorspace)
00979 for (x=0; x < (long) iterator->region.width; x++)
00980 indexes[x]=PixelGetBlackQuantum(iterator->pixel_wands[x]);
00981 if (SyncCacheViewAuthenticPixels(iterator->view,exception) == MagickFalse)
00982 {
00983 InheritException(iterator->exception,GetCacheViewException(
00984 iterator->view));
00985 return(MagickFalse);
00986 }
00987 return(MagickTrue);
00988 }