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

« back to all changes in this revision

Viewing changes to wand/magick-property.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-06-15 11:05:28 UTC
  • mfrom: (6.2.11 sid)
  • Revision ID: james.westby@ubuntu.com-20110615110528-08jgo07a4846xh8d
Tags: 8:6.6.0.4-3ubuntu1
* Resynchronise with Debian (LP: #797595).  Remaining changes:
  - Make ufraw-batch (universe) a suggestion instead of a recommendation.
  - Make debian/rules install target depend on check; they cannot reliably
    be run in parallel.
  - Don't set MAKEFLAGS in debian/rules; just pass it to the build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
324
324
%
325
325
%  The format of the MagickGetCompressionQuality method is:
326
326
%
327
 
%      size_t MagickGetCompressionQuality(MagickWand *wand)
 
327
%      unsigned long MagickGetCompressionQuality(MagickWand *wand)
328
328
%
329
329
%  A description of each parameter follows:
330
330
%
331
331
%    o wand: the magick wand.
332
332
%
333
333
*/
334
 
WandExport size_t MagickGetCompressionQuality(MagickWand *wand)
 
334
WandExport unsigned long MagickGetCompressionQuality(MagickWand *wand)
335
335
{
336
336
  assert(wand != (MagickWand *) NULL);
337
337
  assert(wand->signature == WandSignature);
589
589
%  The format of the MagickGetImageArtifacts method is:
590
590
%
591
591
%      char *MagickGetImageArtifacts(MagickWand *wand,
592
 
%        const char *pattern,size_t *number_artifacts)
 
592
%        const char *pattern,unsigned long *number_artifacts)
593
593
%
594
594
%  A description of each parameter follows:
595
595
%
601
601
%
602
602
*/
603
603
WandExport char **MagickGetImageArtifacts(MagickWand *wand,
604
 
  const char *pattern,size_t *number_artifacts)
 
604
  const char *pattern,unsigned long *number_artifacts)
605
605
{
606
606
  char
607
607
    **artifacts;
609
609
  const char
610
610
    *artifact;
611
611
 
612
 
  register ssize_t
 
612
  register long
613
613
    i;
614
614
 
615
615
  size_t
637
637
    if ((*artifact != '[') &&
638
638
        (GlobExpression(artifact,pattern,MagickFalse) != MagickFalse))
639
639
      {
640
 
        if ((i+1) >= (ssize_t) length)
 
640
        if ((i+1) >= (long) length)
641
641
          {
642
642
            length<<=1;
643
643
            artifacts=(char **) ResizeQuantumMemory(artifacts,length,
656
656
    artifact=GetNextImageProperty(wand->images);
657
657
  }
658
658
  artifacts[i]=(char *) NULL;
659
 
  *number_artifacts=(size_t) i;
 
659
  *number_artifacts=(unsigned long) i;
660
660
  return(artifacts);
661
661
}
662
662
 
718
718
    return((unsigned char *) NULL);
719
719
  (void) CopyMagickMemory(datum,GetStringInfoDatum(profile),
720
720
    GetStringInfoLength(profile));
721
 
  *length=(size_t) GetStringInfoLength(profile);
 
721
  *length=(unsigned long) GetStringInfoLength(profile);
722
722
  return(datum);
723
723
}
724
724
 
741
741
%  The format of the MagickGetImageProfiles method is:
742
742
%
743
743
%      char *MagickGetImageProfiles(MagickWand *wand,
744
 
%        size_t *number_profiles)
 
744
%        unsigned long *number_profiles)
745
745
%
746
746
%  A description of each parameter follows:
747
747
%
753
753
%
754
754
*/
755
755
WandExport char **MagickGetImageProfiles(MagickWand *wand,const char *pattern,
756
 
  size_t *number_profiles)
 
756
  unsigned long *number_profiles)
757
757
{
758
758
  char
759
759
    **profiles;
761
761
  const char
762
762
    *property;
763
763
 
764
 
  register ssize_t
 
764
  register long
765
765
    i;
766
766
 
767
767
  size_t
789
789
    if ((*property != '[') &&
790
790
        (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
791
791
      {
792
 
        if ((i+1) >= (ssize_t) length)
 
792
        if ((i+1) >= (long) length)
793
793
          {
794
794
            length<<=1;
795
795
            profiles=(char **) ResizeQuantumMemory(profiles,length,
808
808
    property=GetNextImageProfile(wand->images);
809
809
  }
810
810
  profiles[i]=(char *) NULL;
811
 
  *number_profiles=(size_t) i;
 
811
  *number_profiles=(unsigned long) i;
812
812
  return(profiles);
813
813
}
814
814
 
878
878
%  The format of the MagickGetImageProperties method is:
879
879
%
880
880
%      char *MagickGetImageProperties(MagickWand *wand,
881
 
%        const char *pattern,size_t *number_properties)
 
881
%        const char *pattern,unsigned long *number_properties)
882
882
%
883
883
%  A description of each parameter follows:
884
884
%
890
890
%
891
891
*/
892
892
WandExport char **MagickGetImageProperties(MagickWand *wand,
893
 
  const char *pattern,size_t *number_properties)
 
893
  const char *pattern,unsigned long *number_properties)
894
894
{
895
895
  char
896
896
    **properties;
898
898
  const char
899
899
    *property;
900
900
 
901
 
  register ssize_t
 
901
  register long
902
902
    i;
903
903
 
904
904
  size_t
926
926
    if ((*property != '[') &&
927
927
        (GlobExpression(property,pattern,MagickFalse) != MagickFalse))
928
928
      {
929
 
        if ((i+1) >= (ssize_t) length)
 
929
        if ((i+1) >= (long) length)
930
930
          {
931
931
            length<<=1;
932
932
            properties=(char **) ResizeQuantumMemory(properties,length,
945
945
    property=GetNextImageProperty(wand->images);
946
946
  }
947
947
  properties[i]=(char *) NULL;
948
 
  *number_properties=(size_t) i;
 
948
  *number_properties=(unsigned long) i;
949
949
  return(properties);
950
950
}
951
951
 
1079
1079
%
1080
1080
%  The format of the MagickGetOptions method is:
1081
1081
%
1082
 
%      char *MagickGetOptions(MagickWand *wand,size_t *number_options)
 
1082
%      char *MagickGetOptions(MagickWand *wand,unsigned long *number_options)
1083
1083
%
1084
1084
%  A description of each parameter follows:
1085
1085
%
1091
1091
%
1092
1092
*/
1093
1093
WandExport char **MagickGetOptions(MagickWand *wand,const char *pattern,
1094
 
  size_t *number_options)
 
1094
  unsigned long *number_options)
1095
1095
{
1096
1096
  char
1097
1097
    **options;
1099
1099
  const char
1100
1100
    *option;
1101
1101
 
1102
 
  register ssize_t
 
1102
  register long
1103
1103
    i;
1104
1104
 
1105
1105
  size_t
1126
1126
    if ((*option != '[') &&
1127
1127
        (GlobExpression(option,pattern,MagickFalse) != MagickFalse))
1128
1128
      {
1129
 
        if ((i+1) >= (ssize_t) length)
 
1129
        if ((i+1) >= (long) length)
1130
1130
          {
1131
1131
            length<<=1;
1132
1132
            options=(char **) ResizeQuantumMemory(options,length,
1145
1145
    option=GetNextImageOption(wand->image_info);
1146
1146
  }
1147
1147
  options[i]=(char *) NULL;
1148
 
  *number_options=(size_t) i;
 
1148
  *number_options=(unsigned long) i;
1149
1149
  return(options);
1150
1150
}
1151
1151
 
1221
1221
%  The format of the MagickGetPage method is:
1222
1222
%
1223
1223
%      MagickBooleanType MagickGetPage(const MagickWand *wand,
1224
 
%        size_t *width,size_t *height,ssize_t *x,ssize_t *y)
 
1224
%        unsigned long *width,unsigned long *height,long *x,long *y)
1225
1225
%
1226
1226
%  A description of each parameter follows:
1227
1227
%
1237
1237
%
1238
1238
*/
1239
1239
WandExport MagickBooleanType MagickGetPage(const MagickWand *wand,
1240
 
  size_t *width,size_t *height,ssize_t *x,ssize_t *y)
 
1240
  unsigned long *width,unsigned long *height,long *x,long *y)
1241
1241
{
1242
1242
  RectangleInfo
1243
1243
    geometry;
1303
1303
%
1304
1304
%  The format of the MagickGetQuantumDepth method is:
1305
1305
%
1306
 
%      const char *MagickGetQuantumDepth(size_t *depth)
 
1306
%      const char *MagickGetQuantumDepth(unsigned long *depth)
1307
1307
%
1308
1308
%  A description of each parameter follows:
1309
1309
%
1310
1310
%    o depth: the quantum depth is returned as a number.
1311
1311
%
1312
1312
*/
1313
 
WandExport const char *MagickGetQuantumDepth(size_t *depth)
 
1313
WandExport const char *MagickGetQuantumDepth(unsigned long *depth)
1314
1314
{
1315
1315
  return(GetMagickQuantumDepth(depth));
1316
1316
}
1331
1331
%
1332
1332
%  The format of the MagickGetQuantumRange method is:
1333
1333
%
1334
 
%      const char *MagickGetQuantumRange(size_t *range)
 
1334
%      const char *MagickGetQuantumRange(unsigned long *range)
1335
1335
%
1336
1336
%  A description of each parameter follows:
1337
1337
%
1338
1338
%    o range: the quantum range is returned as a number.
1339
1339
%
1340
1340
*/
1341
 
WandExport const char *MagickGetQuantumRange(size_t *range)
 
1341
WandExport const char *MagickGetQuantumRange(unsigned long *range)
1342
1342
{
1343
1343
  return(GetMagickQuantumRange(range));
1344
1344
}
1437
1437
%  The format of the MagickGetSamplingFactors method is:
1438
1438
%
1439
1439
%      double *MagickGetSamplingFactor(MagickWand *wand,
1440
 
%        size_t *number_factors)
 
1440
%        unsigned long *number_factors)
1441
1441
%
1442
1442
%  A description of each parameter follows:
1443
1443
%
1447
1447
%
1448
1448
*/
1449
1449
WandExport double *MagickGetSamplingFactors(MagickWand *wand,
1450
 
  size_t *number_factors)
 
1450
  unsigned long *number_factors)
1451
1451
{
1452
1452
  double
1453
1453
    *sampling_factors;
1455
1455
  register const char
1456
1456
    *p;
1457
1457
 
1458
 
  register ssize_t
 
1458
  register long
1459
1459
    i;
1460
1460
 
1461
1461
  assert(wand != (MagickWand *) NULL);
1488
1488
    sampling_factors[i]=StringToDouble(p);
1489
1489
    i++;
1490
1490
  }
1491
 
  *number_factors=(size_t) i;
 
1491
  *number_factors=(unsigned long) i;
1492
1492
  return(sampling_factors);
1493
1493
}
1494
1494
 
1508
1508
%  The format of the MagickGetSize method is:
1509
1509
%
1510
1510
%      MagickBooleanType MagickGetSize(const MagickWand *wand,
1511
 
%        size_t *columns,size_t *rows)
 
1511
%        unsigned long *columns,unsigned long *rows)
1512
1512
%
1513
1513
%  A description of each parameter follows:
1514
1514
%
1520
1520
%
1521
1521
*/
1522
1522
WandExport MagickBooleanType MagickGetSize(const MagickWand *wand,
1523
 
  size_t *columns,size_t *rows)
 
1523
  unsigned long *columns,unsigned long *rows)
1524
1524
{
1525
1525
  RectangleInfo
1526
1526
    geometry;
1553
1553
%  The format of the MagickGetSizeOffset method is:
1554
1554
%
1555
1555
%      MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
1556
 
%        ssize_t *offset)
 
1556
%        long *offset)
1557
1557
%
1558
1558
%  A description of each parameter follows:
1559
1559
%
1563
1563
%
1564
1564
*/
1565
1565
WandExport MagickBooleanType MagickGetSizeOffset(const MagickWand *wand,
1566
 
  ssize_t *offset)
 
1566
  long *offset)
1567
1567
{
1568
1568
  RectangleInfo
1569
1569
    geometry;
1625
1625
%
1626
1626
%  The format of the MagickGetVersion method is:
1627
1627
%
1628
 
%      const char *MagickGetVersion(size_t *version)
 
1628
%      const char *MagickGetVersion(unsigned long *version)
1629
1629
%
1630
1630
%  A description of each parameter follows:
1631
1631
%
1632
1632
%    o version: the ImageMagick version is returned as a number.
1633
1633
%
1634
1634
*/
1635
 
WandExport const char *MagickGetVersion(size_t *version)
 
1635
WandExport const char *MagickGetVersion(unsigned long *version)
1636
1636
{
1637
1637
  return(GetMagickVersion(version));
1638
1638
}
1908
1908
%  The format of the MagickSetCompressionQuality method is:
1909
1909
%
1910
1910
%      MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
1911
 
%        const size_t quality)
 
1911
%        const unsigned long quality)
1912
1912
%
1913
1913
%  A description of each parameter follows:
1914
1914
%
1918
1918
%
1919
1919
*/
1920
1920
WandExport MagickBooleanType MagickSetCompressionQuality(MagickWand *wand,
1921
 
  const size_t quality)
 
1921
  const unsigned long quality)
1922
1922
{
1923
1923
  assert(wand != (MagickWand *) NULL);
1924
1924
  assert(wand->signature == WandSignature);
1944
1944
%  The format of the MagickSetDepth method is:
1945
1945
%
1946
1946
%      MagickBooleanType MagickSetDepth(MagickWand *wand,
1947
 
%        const size_t depth)
 
1947
%        const unsigned long depth)
1948
1948
%
1949
1949
%  A description of each parameter follows:
1950
1950
%
1954
1954
%
1955
1955
*/
1956
1956
WandExport MagickBooleanType MagickSetDepth(MagickWand *wand,
1957
 
  const size_t depth)
 
1957
  const unsigned long depth)
1958
1958
{
1959
1959
  assert(wand != (MagickWand *) NULL);
1960
1960
  assert(wand->signature == WandSignature);
2159
2159
  if (wand->debug != MagickFalse)
2160
2160
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2161
2161
  status=SetImageOption(wand->image_info,"gravity",MagickOptionToMnemonic(
2162
 
    MagickGravityOptions,(ssize_t) type));
 
2162
    MagickGravityOptions,(long) type));
2163
2163
  return(status);
2164
2164
}
2165
2165
 
2382
2382
  if (wand->debug != MagickFalse)
2383
2383
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2384
2384
  status=SetImageOption(wand->image_info,"interpolate",
2385
 
    MagickOptionToMnemonic(MagickInterpolateOptions,(ssize_t) method));
 
2385
    MagickOptionToMnemonic(MagickInterpolateOptions,(long) method));
2386
2386
  return(status);
2387
2387
}
2388
2388
 
2476
2476
%  The format of the MagickSetPage method is:
2477
2477
%
2478
2478
%      MagickBooleanType MagickSetPage(MagickWand *wand,
2479
 
%        const size_t width,const size_t height,const ssize_t x,
2480
 
%        const ssize_t y)
 
2479
%        const unsigned long width,const unsigned long height,const long x,
 
2480
%        const long y)
2481
2481
%
2482
2482
%  A description of each parameter follows:
2483
2483
%
2493
2493
%
2494
2494
*/
2495
2495
WandExport MagickBooleanType MagickSetPage(MagickWand *wand,
2496
 
  const size_t width,const size_t height,const ssize_t x,
2497
 
  const ssize_t y)
 
2496
  const unsigned long width,const unsigned long height,const long x,
 
2497
  const long y)
2498
2498
{
2499
2499
  char
2500
2500
    geometry[MaxTextExtent];
2503
2503
  assert(wand->signature == WandSignature);
2504
2504
  if (wand->debug != MagickFalse)
2505
2505
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2506
 
  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
2507
 
    (double) width,(double) height,(double) x,(double) y);
 
2506
  (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld%+ld",
 
2507
    width,height,x,y);
2508
2508
  (void) CloneString(&wand->image_info->page,geometry);
2509
2509
  return(MagickTrue);
2510
2510
}
2725
2725
%  The format of the MagickSetSamplingFactors method is:
2726
2726
%
2727
2727
%      MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
2728
 
%        const size_t number_factors,const double *sampling_factors)
 
2728
%        const unsigned long number_factors,const double *sampling_factors)
2729
2729
%
2730
2730
%  A description of each parameter follows:
2731
2731
%
2738
2738
%
2739
2739
*/
2740
2740
WandExport MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
2741
 
  const size_t number_factors,const double *sampling_factors)
 
2741
  const unsigned long number_factors,const double *sampling_factors)
2742
2742
{
2743
2743
  char
2744
2744
    sampling_factor[MaxTextExtent];
2745
2745
 
2746
 
  register ssize_t
 
2746
  register long
2747
2747
    i;
2748
2748
 
2749
2749
  assert(wand != (MagickWand *) NULL);
2755
2755
      RelinquishMagickMemory(wand->image_info->sampling_factor);
2756
2756
  if (number_factors == 0)
2757
2757
    return(MagickTrue);
2758
 
  for (i=0; i < (ssize_t) (number_factors-1); i++)
 
2758
  for (i=0; i < (long) (number_factors-1); i++)
2759
2759
  {
2760
2760
    (void) FormatMagickString(sampling_factor,MaxTextExtent,"%g,",
2761
2761
      sampling_factors[i]);
2785
2785
%  The format of the MagickSetSize method is:
2786
2786
%
2787
2787
%      MagickBooleanType MagickSetSize(MagickWand *wand,
2788
 
%        const size_t columns,const size_t rows)
 
2788
%        const unsigned long columns,const unsigned long rows)
2789
2789
%
2790
2790
%  A description of each parameter follows:
2791
2791
%
2797
2797
%
2798
2798
*/
2799
2799
WandExport MagickBooleanType MagickSetSize(MagickWand *wand,
2800
 
  const size_t columns,const size_t rows)
 
2800
  const unsigned long columns,const unsigned long rows)
2801
2801
{
2802
2802
  char
2803
2803
    geometry[MaxTextExtent];
2806
2806
  assert(wand->signature == WandSignature);
2807
2807
  if (wand->debug != MagickFalse)
2808
2808
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2809
 
  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
2810
 
    columns,(double) rows);
 
2809
  (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu",columns,rows);
2811
2810
  (void) CloneString(&wand->image_info->size,geometry);
2812
2811
  return(MagickTrue);
2813
2812
}
2829
2828
%  The format of the MagickSetSizeOffset method is:
2830
2829
%
2831
2830
%      MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
2832
 
%        const size_t columns,const size_t rows,
2833
 
%        const ssize_t offset)
 
2831
%        const unsigned long columns,const unsigned long rows,
 
2832
%        const long offset)
2834
2833
%
2835
2834
%  A description of each parameter follows:
2836
2835
%
2844
2843
%
2845
2844
*/
2846
2845
WandExport MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
2847
 
  const size_t columns,const size_t rows,const ssize_t offset)
 
2846
  const unsigned long columns,const unsigned long rows,const long offset)
2848
2847
{
2849
2848
  char
2850
2849
    geometry[MaxTextExtent];
2853
2852
  assert(wand->signature == WandSignature);
2854
2853
  if (wand->debug != MagickFalse)
2855
2854
    (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
2856
 
  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g",
2857
 
    (double) columns,(double) rows,(double) offset);
 
2855
  (void) FormatMagickString(geometry,MaxTextExtent,"%lux%lu%+ld",columns,rows,
 
2856
    offset);
2858
2857
  (void) CloneString(&wand->image_info->size,geometry);
2859
2858
  return(MagickTrue);
2860
2859
}