~ubuntu-branches/ubuntu/oneiric/imagemagick/oneiric-updates

« back to all changes in this revision

Viewing changes to wand/deprecate.c

  • Committer: Bazaar Package Importer
  • Author(s): Nelson A. de Oliveira
  • Date: 2010-06-20 19:59:55 UTC
  • mfrom: (6.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100620195955-n3eq0yenhycw888i
Tags: 7:6.6.2.6-1
* New upstream release;
* Change Recommends on ufraw to ufraw-batch (Closes: #579775);
* Fix FTBFS when using dash to run the configure script, by setting
  CONFIG_SHELL=/bin/bash (Closes: #582073, #583024). Thank you, Niko Tyni!

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
%                                October 2002                                 %
18
18
%                                                                             %
19
19
%                                                                             %
20
 
%  Copyright 1999-2009 ImageMagick Studio LLC, a non-profit organization      %
 
20
%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
21
21
%  dedicated to making software imaging solutions freely available.           %
22
22
%                                                                             %
23
23
%  You may not use this file except in compliance with the License.  You may  %
62
62
%                                                                             %
63
63
%                                                                             %
64
64
%                                                                             %
 
65
%   M a g i c k A v e r a g e I m a g e s                                     %
 
66
%                                                                             %
 
67
%                                                                             %
 
68
%                                                                             %
 
69
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
70
%
 
71
%  MagickAverageImages() average a set of images.
 
72
%
 
73
%  The format of the MagickAverageImages method is:
 
74
%
 
75
%      MagickWand *MagickAverageImages(MagickWand *wand)
 
76
%
 
77
%  A description of each parameter follows:
 
78
%
 
79
%    o wand: the magick wand.
 
80
%
 
81
*/
 
82
 
 
83
static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
 
84
  Image *images)
 
85
{
 
86
  MagickWand
 
87
    *clone_wand;
 
88
 
 
89
  assert(wand != (MagickWand *) NULL);
 
90
  assert(wand->signature == WandSignature);
 
91
  if (wand->debug != MagickFalse)
 
92
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
 
93
  clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
 
94
  if (clone_wand == (MagickWand *) NULL)
 
95
    ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
 
96
      images->filename);
 
97
  (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
 
98
  clone_wand->id=AcquireWandId();
 
99
  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
 
100
    MagickWandId,(double) clone_wand->id);
 
101
  clone_wand->exception=AcquireExceptionInfo();
 
102
  InheritException(clone_wand->exception,wand->exception);
 
103
  clone_wand->image_info=CloneImageInfo(wand->image_info);
 
104
  clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
 
105
  clone_wand->images=images;
 
106
  clone_wand->debug=IsEventLogging();
 
107
  if (clone_wand->debug != MagickFalse)
 
108
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
 
109
  clone_wand->signature=WandSignature;
 
110
  return(clone_wand);
 
111
}
 
112
 
 
113
WandExport MagickWand *MagickAverageImages(MagickWand *wand)
 
114
{
 
115
  Image
 
116
    *average_image;
 
117
 
 
118
  assert(wand != (MagickWand *) NULL);
 
119
  assert(wand->signature == WandSignature);
 
120
  if (wand->debug != MagickFalse)
 
121
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
 
122
  if (wand->images == (Image *) NULL)
 
123
    return((MagickWand *) NULL);
 
124
  average_image=EvaluateImages(wand->images,MeanEvaluateOperator,
 
125
    wand->exception);
 
126
  if (average_image == (Image *) NULL)
 
127
    return((MagickWand *) NULL);
 
128
  return(CloneMagickWandFromImages(wand,average_image));
 
129
}
 
130
 
 
131
/*
 
132
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
133
%                                                                             %
 
134
%                                                                             %
 
135
%                                                                             %
65
136
%   M a g i c k C l i p P a t h I m a g e                                     %
66
137
%                                                                             %
67
138
%                                                                             %
314
385
%
315
386
%      MagickBooleanType MagickColorFloodfillImage(MagickWand *wand,
316
387
%        const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
317
 
%        const long x,const long y)
 
388
%        const ssize_t x,const ssize_t y)
318
389
%
319
390
%  A description of each parameter follows:
320
391
%
336
407
*/
337
408
WandExport MagickBooleanType MagickColorFloodfillImage(MagickWand *wand,
338
409
  const PixelWand *fill,const double fuzz,const PixelWand *bordercolor,
339
 
  const long x,const long y)
 
410
  const ssize_t x,const ssize_t y)
340
411
{
341
412
  DrawInfo
342
413
    *draw_info;
419
490
%    o wand: the magick wand.
420
491
%
421
492
*/
422
 
 
423
 
static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
424
 
  Image *images)
425
 
{
426
 
  MagickWand
427
 
    *clone_wand;
428
 
 
429
 
  assert(wand != (MagickWand *) NULL);
430
 
  assert(wand->signature == WandSignature);
431
 
  if (wand->debug != MagickFalse)
432
 
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
433
 
  clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
434
 
  if (clone_wand == (MagickWand *) NULL)
435
 
    ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
436
 
      images->filename);
437
 
  (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
438
 
  clone_wand->id=AcquireWandId();
439
 
  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
440
 
    MagickWandId,clone_wand->id);
441
 
  clone_wand->exception=AcquireExceptionInfo();
442
 
  InheritException(clone_wand->exception,wand->exception);
443
 
  clone_wand->image_info=CloneImageInfo(wand->image_info);
444
 
  clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
445
 
  clone_wand->images=images;
446
 
  clone_wand->debug=IsEventLogging();
447
 
  if (clone_wand->debug != MagickFalse)
448
 
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clone_wand->name);
449
 
  clone_wand->signature=WandSignature;
450
 
  return(clone_wand);
451
 
}
452
 
 
453
493
WandExport MagickWand *MagickFlattenImages(MagickWand *wand)
454
494
{
455
495
  Image
513
553
%
514
554
%  The format of the MagickGetImageIndex method is:
515
555
%
516
 
%      long MagickGetImageIndex(MagickWand *wand)
 
556
%      ssize_t MagickGetImageIndex(MagickWand *wand)
517
557
%
518
558
%  A description of each parameter follows:
519
559
%
520
560
%    o wand: the magick wand.
521
561
%
522
562
*/
523
 
WandExport long MagickGetImageIndex(MagickWand *wand)
 
563
WandExport ssize_t MagickGetImageIndex(MagickWand *wand)
524
564
{
525
565
  return(MagickGetIteratorIndex(wand));
526
566
}
542
582
%  The format of the MagickGetImageChannelExtrema method is:
543
583
%
544
584
%      MagickBooleanType MagickGetImageChannelExtrema(MagickWand *wand,
545
 
%        const ChannelType channel,unsigned long *minima,unsigned long *maxima)
 
585
%        const ChannelType channel,size_t *minima,size_t *maxima)
546
586
%
547
587
%  A description of each parameter follows:
548
588
%
556
596
%
557
597
*/
558
598
WandExport MagickBooleanType MagickGetImageChannelExtrema(MagickWand *wand,
559
 
  const ChannelType channel,unsigned long *minima,unsigned long *maxima)
 
599
  const ChannelType channel,size_t *minima,size_t *maxima)
560
600
{
561
601
  MagickBooleanType
562
602
    status;
588
628
%  The format of the MagickGetImageExtrema method is:
589
629
%
590
630
%      MagickBooleanType MagickGetImageExtrema(MagickWand *wand,
591
 
%        unsigned long *minima,unsigned long *maxima)
 
631
%        size_t *minima,size_t *maxima)
592
632
%
593
633
%  A description of each parameter follows:
594
634
%
600
640
%
601
641
*/
602
642
WandExport MagickBooleanType MagickGetImageExtrema(MagickWand *wand,
603
 
  unsigned long *minima,unsigned long *maxima)
 
643
  size_t *minima,size_t *maxima)
604
644
{
605
645
  MagickBooleanType
606
646
    status;
631
671
%
632
672
%  The format of the MagickGetImageMatte method is:
633
673
%
634
 
%      unsigned long MagickGetImageMatte(MagickWand *wand)
 
674
%      size_t MagickGetImageMatte(MagickWand *wand)
635
675
%
636
676
%  A description of each parameter follows:
637
677
%
662
702
%
663
703
%  MagickGetImagePixels() extracts pixel data from an image and returns it to
664
704
%  you.  The method returns MagickTrue on success otherwise MagickFalse if an
665
 
%  error is encountered.  The data is returned as char, short int, int, long,
 
705
%  error is encountered.  The data is returned as char, short int, int, ssize_t,
666
706
%  float, or double in the order specified by map.
667
707
%
668
708
%  Suppose you want to extract the first scanline of a 640x480 image as
673
713
%  The format of the MagickGetImagePixels method is:
674
714
%
675
715
%      MagickBooleanType MagickGetImagePixels(MagickWand *wand,
676
 
%        const long x,const long y,const unsigned long columns,
677
 
%        const unsigned long rows,const char *map,const StorageType storage,
 
716
%        const ssize_t x,const ssize_t y,const size_t columns,
 
717
%        const size_t rows,const char *map,const StorageType storage,
678
718
%        void *pixels)
679
719
%
680
720
%  A description of each parameter follows:
701
741
%
702
742
*/
703
743
WandExport MagickBooleanType MagickGetImagePixels(MagickWand *wand,
704
 
  const long x,const long y,const unsigned long columns,
705
 
  const unsigned long rows,const char *map,const StorageType storage,
 
744
  const ssize_t x,const ssize_t y,const size_t columns,
 
745
  const size_t rows,const char *map,const StorageType storage,
706
746
  void *pixels)
707
747
{
708
748
  return(MagickExportImagePixels(wand,x,y,columns,rows,map,storage,pixels));
811
851
%
812
852
%      MagickBooleanType MagickMatteFloodfillImage(MagickWand *wand,
813
853
%        const double alpha,const double fuzz,const PixelWand *bordercolor,
814
 
%        const long x,const long y)
 
854
%        const ssize_t x,const ssize_t y)
815
855
%
816
856
%  A description of each parameter follows:
817
857
%
834
874
*/
835
875
WandExport MagickBooleanType MagickMatteFloodfillImage(MagickWand *wand,
836
876
  const double alpha,const double fuzz,const PixelWand *bordercolor,
837
 
  const long x,const long y)
 
877
  const ssize_t x,const ssize_t y)
838
878
{
839
879
  DrawInfo
840
880
    *draw_info;
857
897
  if (bordercolor != (PixelWand *) NULL)
858
898
    PixelGetQuantumColor(bordercolor,&target);
859
899
  wand->images->fuzz=fuzz;
860
 
  status=MatteFloodfillImage(wand->images,target,RoundToQuantum(
 
900
  status=MatteFloodfillImage(wand->images,target,ClampToQuantum(
861
901
    (MagickRealType) QuantumRange-QuantumRange*alpha),x,y,bordercolor !=
862
902
    (PixelWand *) NULL ? FillToBorderMethod : FloodfillMethod);
863
903
  if (status == MagickFalse)
871
911
%                                                                             %
872
912
%                                                                             %
873
913
%                                                                             %
 
914
%   M a g i c k M a x i m u m I m a g e s                                     %
 
915
%                                                                             %
 
916
%                                                                             %
 
917
%                                                                             %
 
918
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
919
%
 
920
%  MagickMaximumImages() returns the maximum intensity of an image sequence.
 
921
%
 
922
%  The format of the MagickMaximumImages method is:
 
923
%
 
924
%      MagickWand *MagickMaximumImages(MagickWand *wand)
 
925
%
 
926
%  A description of each parameter follows:
 
927
%
 
928
%    o wand: the magick wand.
 
929
%
 
930
*/
 
931
WandExport MagickWand *MagickMaximumImages(MagickWand *wand)
 
932
{
 
933
  Image
 
934
    *maximum_image;
 
935
 
 
936
  assert(wand != (MagickWand *) NULL);
 
937
  assert(wand->signature == WandSignature);
 
938
  if (wand->debug != MagickFalse)
 
939
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
 
940
  if (wand->images == (Image *) NULL)
 
941
    return((MagickWand *) NULL);
 
942
  maximum_image=EvaluateImages(wand->images,MaxEvaluateOperator,
 
943
    wand->exception);
 
944
  if (maximum_image == (Image *) NULL)
 
945
    return((MagickWand *) NULL);
 
946
  return(CloneMagickWandFromImages(wand,maximum_image));
 
947
}
 
948
 
 
949
/*
 
950
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
951
%                                                                             %
 
952
%                                                                             %
 
953
%                                                                             %
 
954
%   M a g i c k M i n i m u m I m a g e s                                     %
 
955
%                                                                             %
 
956
%                                                                             %
 
957
%                                                                             %
 
958
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
959
%
 
960
%  MagickMinimumImages() returns the minimum intensity of an image sequence.
 
961
%
 
962
%  The format of the MagickMinimumImages method is:
 
963
%
 
964
%      MagickWand *MagickMinimumImages(MagickWand *wand)
 
965
%
 
966
%  A description of each parameter follows:
 
967
%
 
968
%    o wand: the magick wand.
 
969
%
 
970
*/
 
971
WandExport MagickWand *MagickMinimumImages(MagickWand *wand)
 
972
{
 
973
  Image
 
974
    *minimum_image;
 
975
 
 
976
  assert(wand != (MagickWand *) NULL);
 
977
  assert(wand->signature == WandSignature);
 
978
  if (wand->debug != MagickFalse)
 
979
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
 
980
  if (wand->images == (Image *) NULL)
 
981
    return((MagickWand *) NULL);
 
982
  minimum_image=EvaluateImages(wand->images,MinEvaluateOperator,
 
983
    wand->exception);
 
984
  if (minimum_image == (Image *) NULL)
 
985
    return((MagickWand *) NULL);
 
986
  return(CloneMagickWandFromImages(wand,minimum_image));
 
987
}
 
988
 
 
989
/*
 
990
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
991
%                                                                             %
 
992
%                                                                             %
 
993
%                                                                             %
874
994
%   M a g i c k M o s a i c I m a g e s                                       %
875
995
%                                                                             %
876
996
%                                                                             %
970
1090
%
971
1091
%      MagickBooleanType MagickPaintFloodfillImage(MagickWand *wand,
972
1092
%        const ChannelType channel,const PixelWand *fill,const double fuzz,
973
 
%        const PixelWand *bordercolor,const long x,const long y)
 
1093
%        const PixelWand *bordercolor,const ssize_t x,const ssize_t y)
974
1094
%
975
1095
%  A description of each parameter follows:
976
1096
%
994
1114
*/
995
1115
WandExport MagickBooleanType MagickPaintFloodfillImage(MagickWand *wand,
996
1116
  const ChannelType channel,const PixelWand *fill,const double fuzz,
997
 
  const PixelWand *bordercolor,const long x,const long y)
 
1117
  const PixelWand *bordercolor,const ssize_t x,const ssize_t y)
998
1118
{
999
1119
  MagickBooleanType
1000
1120
    status;
1111
1231
%                                                                             %
1112
1232
%                                                                             %
1113
1233
%                                                                             %
 
1234
%   M a g i c k R e c o l o r I m a g e                                       %
 
1235
%                                                                             %
 
1236
%                                                                             %
 
1237
%                                                                             %
 
1238
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1239
%
 
1240
%  MagickRecolorImage() apply color transformation to an image. The method
 
1241
%  permits saturation changes, hue rotation, luminance to alpha, and various
 
1242
%  other effects.  Although variable-sized transformation matrices can be used,
 
1243
%  typically one uses a 5x5 matrix for an RGBA image and a 6x6 for CMYKA
 
1244
%  (or RGBA with offsets).  The matrix is similar to those used by Adobe Flash
 
1245
%  except offsets are in column 6 rather than 5 (in support of CMYKA images)
 
1246
%  and offsets are normalized (divide Flash offset by 255).
 
1247
%
 
1248
%  The format of the MagickRecolorImage method is:
 
1249
%
 
1250
%      MagickBooleanType MagickRecolorImage(MagickWand *wand,
 
1251
%        const size_t order,const double *color_matrix)
 
1252
%
 
1253
%  A description of each parameter follows:
 
1254
%
 
1255
%    o wand: the magick wand.
 
1256
%
 
1257
%    o order: the number of columns and rows in the color matrix.
 
1258
%
 
1259
%    o color_matrix: An array of doubles representing the color matrix.
 
1260
%
 
1261
*/
 
1262
WandExport MagickBooleanType MagickRecolorImage(MagickWand *wand,
 
1263
  const size_t order,const double *color_matrix)
 
1264
{
 
1265
  Image
 
1266
    *transform_image;
 
1267
 
 
1268
  assert(wand != (MagickWand *) NULL);
 
1269
  assert(wand->signature == WandSignature);
 
1270
  if (wand->debug != MagickFalse)
 
1271
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
 
1272
  if (color_matrix == (const double *) NULL)
 
1273
    return(MagickFalse);
 
1274
  if (wand->images == (Image *) NULL)
 
1275
    ThrowWandException(WandError,"ContainsNoImages",wand->name);
 
1276
  transform_image=RecolorImage(wand->images,order,color_matrix,
 
1277
    wand->exception);
 
1278
  if (transform_image == (Image *) NULL)
 
1279
    return(MagickFalse);
 
1280
  ReplaceImageInList(&wand->images,transform_image);
 
1281
  return(MagickTrue);
 
1282
}
 
1283
 
 
1284
/*
 
1285
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
1286
%                                                                             %
 
1287
%                                                                             %
 
1288
%                                                                             %
1114
1289
%   M a g i c k S e t I m a g e A t t r i b u t e                             %
1115
1290
%                                                                             %
1116
1291
%                                                                             %
1155
1330
%
1156
1331
%  The format of the MagickSetImageIndex method is:
1157
1332
%
1158
 
%      MagickBooleanType MagickSetImageIndex(MagickWand *wand,const long index)
 
1333
%      MagickBooleanType MagickSetImageIndex(MagickWand *wand,const ssize_t index)
1159
1334
%
1160
1335
%  A description of each parameter follows:
1161
1336
%
1165
1340
%
1166
1341
*/
1167
1342
WandExport MagickBooleanType MagickSetImageIndex(MagickWand *wand,
1168
 
  const long index)
 
1343
  const ssize_t index)
1169
1344
{
1170
1345
  return(MagickSetIteratorIndex(wand,index));
1171
1346
}
1274
1449
%  The format of the MagickRegionOfInterestImage method is:
1275
1450
%
1276
1451
%      MagickWand *MagickRegionOfInterestImage(MagickWand *wand,
1277
 
%        const unsigned long width,const unsigned long height,const long x,
1278
 
%        const long y)
 
1452
%        const size_t width,const size_t height,const ssize_t x,
 
1453
%        const ssize_t y)
1279
1454
%
1280
1455
%  A description of each parameter follows:
1281
1456
%
1291
1466
%
1292
1467
*/
1293
1468
WandExport MagickWand *MagickRegionOfInterestImage(MagickWand *wand,
1294
 
  const unsigned long width,const unsigned long height,const long x,
1295
 
  const long y)
 
1469
  const size_t width,const size_t height,const ssize_t x,
 
1470
  const ssize_t y)
1296
1471
{
1297
1472
  return(MagickGetImageRegion(wand,width,height,x,y));
1298
1473
}
1311
1486
%  MagickSetImagePixels() accepts pixel datand stores it in the image at the
1312
1487
%  location you specify.  The method returns MagickFalse on success otherwise
1313
1488
%  MagickTrue if an error is encountered.  The pixel data can be either char,
1314
 
%  short int, int, long, float, or double in the order specified by map.
 
1489
%  short int, int, ssize_t, float, or double in the order specified by map.
1315
1490
%
1316
1491
%  Suppose your want to upload the first scanline of a 640x480 image from
1317
1492
%  character data in red-green-blue order:
1321
1496
%  The format of the MagickSetImagePixels method is:
1322
1497
%
1323
1498
%      MagickBooleanType MagickSetImagePixels(MagickWand *wand,
1324
 
%        const long x,const long y,const unsigned long columns,
1325
 
%        const unsigned long rows,const char *map,const StorageType storage,
 
1499
%        const ssize_t x,const ssize_t y,const size_t columns,
 
1500
%        const size_t rows,const char *map,const StorageType storage,
1326
1501
%        const void *pixels)
1327
1502
%
1328
1503
%  A description of each parameter follows:
1349
1524
%
1350
1525
*/
1351
1526
WandExport MagickBooleanType MagickSetImagePixels(MagickWand *wand,
1352
 
  const long x,const long y,const unsigned long columns,
1353
 
  const unsigned long rows,const char *map,const StorageType storage,
 
1527
  const ssize_t x,const ssize_t y,const size_t columns,
 
1528
  const size_t rows,const char *map,const StorageType storage,
1354
1529
  const void *pixels)
1355
1530
{
1356
1531
  return(MagickImportImagePixels(wand,x,y,columns,rows,map,storage,pixels));
1406
1581
%  The format of the PixelGetNextRow method is:
1407
1582
%
1408
1583
%      PixelWand **PixelGetNextRow(PixelIterator *iterator,
1409
 
%        unsigned long *number_wands)
 
1584
%        size_t *number_wands)
1410
1585
%
1411
1586
%  A description of each parameter follows:
1412
1587
%
1417
1592
*/
1418
1593
WandExport PixelWand **PixelGetNextRow(PixelIterator *iterator)
1419
1594
{
1420
 
  unsigned long
 
1595
  size_t
1421
1596
    number_wands;
1422
1597
 
1423
1598
  return(PixelGetNextIteratorRow(iterator,&number_wands));