rmagick 2.9.2 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- /* $Id: rmmain.c,v 1.288 2009/04/19 17:38:00 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.296 2009/06/19 22:07:05 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmmain.c
@@ -21,6 +21,75 @@ static void test_Magick_version(void);
21
21
  static void version_constants(void);
22
22
 
23
23
 
24
+
25
+
26
+ /*
27
+ * Handle transferring ImageMagick memory allocations/frees to Ruby.
28
+ * These functions have the same signature as the equivalent C functions.
29
+ */
30
+ #if defined(HAVE_SETMAGICKMEMORYMETHODS)
31
+ static void *rm_malloc(size_t size)
32
+ {
33
+ void *p;
34
+ // int old_state;
35
+
36
+ // old_state = rb_gc_disable();
37
+ p = xmalloc((long)size);
38
+ // if (!RTEST(old_state))
39
+ // {
40
+ // rb_gc_enable();
41
+ // }
42
+
43
+ return p;
44
+ }
45
+
46
+
47
+
48
+
49
+ static void *rm_realloc(void *ptr, size_t size)
50
+ {
51
+ void *p;
52
+ // int old_state;
53
+
54
+ // old_state = rb_gc_disable();
55
+ p = xrealloc(ptr, (long)size);
56
+ // if (!RTEST(old_state))
57
+ // {
58
+ // rb_gc_enable();
59
+ // }
60
+
61
+ return p;
62
+ }
63
+
64
+
65
+
66
+
67
+ static void rm_free(void *ptr)
68
+ {
69
+ xfree(ptr);
70
+ }
71
+
72
+
73
+ static void set_managed_memory(void)
74
+ {
75
+ ID enable_mm = rb_intern("RMAGICK_ENABLE_MANAGED_MEMORY");
76
+
77
+ if (RTEST(rb_const_defined(rb_cObject, enable_mm)) && RTEST(rb_const_get(rb_cObject, enable_mm)))
78
+ {
79
+ rb_warning("RMagick: %s", "managed memory enabled. This is an experimental feature.");
80
+ SetMagickMemoryMethods(rm_malloc, rm_realloc, rm_free);
81
+ rb_define_const(Module_Magick, "MANAGED_MEMORY", Qtrue);
82
+ }
83
+ else
84
+ {
85
+ rb_define_const(Module_Magick, "MANAGED_MEMORY", Qfalse);
86
+ }
87
+ }
88
+ #endif
89
+
90
+
91
+
92
+
24
93
  /*
25
94
  External: Init_RMagick2
26
95
  Purpose: define the classes and constants
@@ -32,16 +101,18 @@ Init_RMagick2(void)
32
101
  {
33
102
  volatile VALUE observable;
34
103
 
35
- #if defined(HAVE_MAGICKCOREGENESIS)
36
104
  MagickCoreGenesis("RMagick", MagickFalse);
37
- #else
38
- InitializeMagick("RMagick");
39
- #endif
40
105
 
41
106
  test_Magick_version();
42
107
 
43
108
  Module_Magick = rb_define_module("Magick");
44
109
 
110
+ #if defined(HAVE_SETMAGICKMEMORYMETHODS)
111
+ set_managed_memory();
112
+ #else
113
+ rb_define_const(Module_Magick, "MANAGED_MEMORY", Qfalse);
114
+ #endif
115
+
45
116
  /*-----------------------------------------------------------------------*/
46
117
  /* Create IDs for frequently used methods, etc. */
47
118
  /*-----------------------------------------------------------------------*/
@@ -334,6 +405,7 @@ Init_RMagick2(void)
334
405
  rb_define_method(Class_Image, "scale", Image_scale, -1);
335
406
  rb_define_method(Class_Image, "scale!", Image_scale_bang, -1);
336
407
  rb_define_method(Class_Image, "segment", Image_segment, -1);
408
+ rb_define_method(Class_Image, "selective_blur_channel", Image_selective_blur_channel, -1);
337
409
  rb_define_method(Class_Image, "separate", Image_separate, -1);
338
410
  rb_define_method(Class_Image, "sepiatone", Image_sepiatone, -1);
339
411
  rb_define_method(Class_Image, "set_channel_depth", Image_set_channel_depth, 2);
@@ -742,7 +814,6 @@ Init_RMagick2(void)
742
814
  END_ENUM
743
815
 
744
816
  // AlphaChannelType constants
745
- #if defined(HAVE_TYPE_ALPHACHANNELTYPE)
746
817
  DEF_ENUM(AlphaChannelType)
747
818
  ENUMERATOR(UndefinedAlphaChannel)
748
819
  ENUMERATOR(ActivateAlphaChannel)
@@ -756,8 +827,10 @@ Init_RMagick2(void)
756
827
  ENUMERATOR(ShapeAlphaChannel)
757
828
  ENUMERATOR(TransparentAlphaChannel)
758
829
  #endif
759
- END_ENUM
830
+ #if defined(HAVE_ENUM_BACKGROUNDALPHACHANNEL)
831
+ ENUMERATOR(BackgroundAlphaChannel)
760
832
  #endif
833
+ END_ENUM
761
834
 
762
835
  // AnchorType constants (for Draw#text_anchor - these are not defined by ImageMagick)
763
836
  DEF_ENUM(AnchorType)
@@ -842,9 +915,7 @@ Init_RMagick2(void)
842
915
  ENUMERATOR(Rec709LumaColorspace)
843
916
  ENUMERATOR(Rec709YCbCrColorspace)
844
917
  ENUMERATOR(LogColorspace)
845
- #if defined(HAVE_ENUM_CMYCOLORSPACE)
846
918
  ENUMERATOR(CMYColorspace)
847
- #endif
848
919
  END_ENUM
849
920
 
850
921
  // ComplianceType constants are defined as enums but used as bit flags
@@ -870,10 +941,11 @@ Init_RMagick2(void)
870
941
  ENUMERATOR(AddCompositeOp)
871
942
  ENUMERATOR(AtopCompositeOp)
872
943
  ENUMERATOR(BlendCompositeOp)
944
+ #if defined(HAVE_ENUM_BLURCOMPOSITEOP)
945
+ ENUMERATOR(BlurCompositeOp)
946
+ #endif
873
947
  ENUMERATOR(BumpmapCompositeOp)
874
- #if defined(HAVE_ENUM_CHANGEMASKCOMPOSITEOP)
875
948
  ENUMERATOR(ChangeMaskCompositeOp)
876
- #endif
877
949
  ENUMERATOR(ClearCompositeOp)
878
950
  ENUMERATOR(ColorBurnCompositeOp)
879
951
  ENUMERATOR(ColorDodgeCompositeOp)
@@ -888,9 +960,10 @@ Init_RMagick2(void)
888
960
  ENUMERATOR(CopyRedCompositeOp)
889
961
  ENUMERATOR(CopyYellowCompositeOp)
890
962
  ENUMERATOR(DarkenCompositeOp)
891
- #if defined(HAVE_ENUM_DIVIDECOMPOSITEOP)
892
- ENUMERATOR(DivideCompositeOp)
963
+ #if defined(HAVE_ENUM_DISTORTCOMPOSITEOP)
964
+ ENUMERATOR(DistortCompositeOp)
893
965
  #endif
966
+ ENUMERATOR(DivideCompositeOp)
894
967
  ENUMERATOR(DstAtopCompositeOp)
895
968
  ENUMERATOR(DstCompositeOp)
896
969
  ENUMERATOR(DstInCompositeOp)
@@ -904,9 +977,7 @@ Init_RMagick2(void)
904
977
  ENUMERATOR(HueCompositeOp)
905
978
  ENUMERATOR(InCompositeOp)
906
979
  ENUMERATOR(LightenCompositeOp)
907
- #if defined(HAVE_ENUM_LINEARLIGHTCOMPOSITEOP)
908
980
  ENUMERATOR(LinearLightCompositeOp)
909
- #endif
910
981
  ENUMERATOR(LuminizeCompositeOp)
911
982
  ENUMERATOR(MinusCompositeOp)
912
983
  ENUMERATOR(ModulateCompositeOp)
@@ -969,15 +1040,12 @@ Init_RMagick2(void)
969
1040
  ENUMERATOR(PreviousDispose)
970
1041
  END_ENUM
971
1042
 
972
- #if defined(HAVE_DISTORTIMAGE)
973
1043
  // DistortImage "method" argument values
974
1044
  DEF_ENUM(DistortImageMethod)
975
1045
  ENUMERATOR(UndefinedDistortion)
976
1046
  ENUMERATOR(AffineDistortion)
977
1047
  ENUMERATOR(AffineProjectionDistortion)
978
- #if defined(HAVE_ENUM_ARCDISTORTION)
979
1048
  ENUMERATOR(ArcDistortion)
980
- #endif
981
1049
  #if defined(HAVE_ENUM_POLARDISTORTION)
982
1050
  ENUMERATOR(PolarDistortion)
983
1051
  #endif
@@ -995,9 +1063,7 @@ Init_RMagick2(void)
995
1063
  ENUMERATOR(BilinearReverseDistortion)
996
1064
  #endif
997
1065
  ENUMERATOR(PerspectiveDistortion)
998
- #if defined(HAVE_ENUM_PERSPECTIVEPROJECTIONDISTORTION)
999
1066
  ENUMERATOR(PerspectiveProjectionDistortion)
1000
- #endif
1001
1067
  #if defined(HAVE_ENUM_POLYNOMIALDISTORTION)
1002
1068
  ENUMERATOR(PolynomialDistortion)
1003
1069
  #endif
@@ -1009,7 +1075,6 @@ Init_RMagick2(void)
1009
1075
  ENUMERATOR(BarrelInverseDistortion)
1010
1076
  #endif
1011
1077
  END_ENUM
1012
- #endif
1013
1078
 
1014
1079
  #if defined(HAVE_TYPE_DITHERMETHOD)
1015
1080
  DEF_ENUM(DitherMethod)
@@ -1105,15 +1170,9 @@ Init_RMagick2(void)
1105
1170
  ENUMERATOR(LineInterlace)
1106
1171
  ENUMERATOR(PlaneInterlace)
1107
1172
  ENUMERATOR(PartitionInterlace)
1108
- #if defined(HAVE_ENUM_GIFINTERLACE)
1109
1173
  ENUMERATOR(GIFInterlace)
1110
- #endif
1111
- #if defined(HAVE_ENUM_JPEGINTERLACE)
1112
1174
  ENUMERATOR(JPEGInterlace)
1113
- #endif
1114
- #if defined(HAVE_ENUM_PNGINTERLACE)
1115
1175
  ENUMERATOR(PNGInterlace)
1116
- #endif
1117
1176
  END_ENUM
1118
1177
 
1119
1178
  DEF_ENUM(InterpolatePixelMethod)
@@ -1143,21 +1202,13 @@ Init_RMagick2(void)
1143
1202
  ENUMERATOR(OptimizePlusLayer)
1144
1203
  ENUMERATOR(CoalesceLayer)
1145
1204
  ENUMERATOR(DisposeLayer)
1146
- #if defined(HAVE_ENUM_OPTIMIZETRANSLAYER)
1147
1205
  ENUMERATOR(OptimizeTransLayer)
1148
- #endif
1149
1206
  #if defined(HAVE_ENUM_OPTIMIZEIMAGELAYER)
1150
1207
  ENUMERATOR(OptimizeImageLayer)
1151
1208
  #endif
1152
- #if defined(HAVE_ENUM_REMOVEDUPSLAYER)
1153
1209
  ENUMERATOR(RemoveDupsLayer)
1154
- #endif
1155
- #if defined(HAVE_ENUM_REMOVEZEROLAYER)
1156
1210
  ENUMERATOR(RemoveZeroLayer)
1157
- #endif
1158
- #if defined(HAVE_ENUM_COMPOSITELAYER)
1159
1211
  ENUMERATOR(CompositeLayer)
1160
- #endif
1161
1212
  #if defined(HAVE_ENUM_MERGELAYER)
1162
1213
  ENUMERATOR(MergeLayer)
1163
1214
  #endif
@@ -1176,9 +1227,7 @@ Init_RMagick2(void)
1176
1227
  ENUMERATOR(UndefinedMetric)
1177
1228
  ENUMERATOR(AbsoluteErrorMetric)
1178
1229
  ENUMERATOR(MeanAbsoluteErrorMetric)
1179
- #if defined(HAVE_ENUM_MEANERRORPERPIXELMETRIC)
1180
1230
  ENUMERATOR(MeanErrorPerPixelMetric)
1181
- #endif
1182
1231
  ENUMERATOR(MeanSquaredErrorMetric)
1183
1232
  ENUMERATOR(PeakAbsoluteErrorMetric)
1184
1233
  ENUMERATOR(PeakSignalToNoiseRatioMetric)
@@ -1193,9 +1242,7 @@ Init_RMagick2(void)
1193
1242
  ENUMERATOR(ImpulseNoise)
1194
1243
  ENUMERATOR(LaplacianNoise)
1195
1244
  ENUMERATOR(PoissonNoise)
1196
- #if defined(HAVE_ENUM_RANDOMNOISE)
1197
1245
  ENUMERATOR(RandomNoise)
1198
- #endif
1199
1246
  END_ENUM
1200
1247
 
1201
1248
  // Orientation constants
@@ -1339,18 +1386,12 @@ Init_RMagick2(void)
1339
1386
  #endif
1340
1387
 
1341
1388
  // SpreadMethod
1342
- #if defined(HAVE_TYPE_SPREADMETHOD)
1343
- // In 6.3.0 ReflectSpread is misspelled as ReflectSpead.
1344
- #if !defined(HAVE_ENUM_REFLECTSPREAD)
1345
- #define ReflectSpread 2
1346
- #endif
1347
1389
  DEF_ENUM(SpreadMethod)
1348
1390
  ENUMERATOR(UndefinedSpread)
1349
1391
  ENUMERATOR(PadSpread)
1350
1392
  ENUMERATOR(ReflectSpread)
1351
1393
  ENUMERATOR(RepeatSpread)
1352
1394
  END_ENUM
1353
- #endif
1354
1395
 
1355
1396
  // StorageType
1356
1397
  DEF_ENUM(StorageType)
@@ -1397,18 +1438,10 @@ Init_RMagick2(void)
1397
1438
  ENUMERATOR(DitherVirtualPixelMethod)
1398
1439
  ENUMERATOR(RandomVirtualPixelMethod)
1399
1440
  ENUMERATOR(ConstantVirtualPixelMethod)
1400
- #if defined(HAVE_ENUM_MASKVIRTUALPIXELMETHOD)
1401
1441
  ENUMERATOR(MaskVirtualPixelMethod)
1402
- #endif
1403
- #if defined(HAVE_ENUM_BLACKVIRTUALPIXELMETHOD)
1404
1442
  ENUMERATOR(BlackVirtualPixelMethod)
1405
- #endif
1406
- #if defined(HAVE_ENUM_GRAYVIRTUALPIXELMETHOD)
1407
1443
  ENUMERATOR(GrayVirtualPixelMethod)
1408
- #endif
1409
- #if defined(HAVE_ENUM_WHITEVIRTUALPIXELMETHOD)
1410
1444
  ENUMERATOR(WhiteVirtualPixelMethod)
1411
- #endif
1412
1445
  #if defined(HAVE_ENUM_HORIZONTALTILEVIRTUALPIXELMETHOD)
1413
1446
  ENUMERATOR(HorizontalTileVirtualPixelMethod)
1414
1447
  #endif
@@ -1573,7 +1606,7 @@ version_constants(void)
1573
1606
  rb_define_const(Module_Magick, "Version", str);
1574
1607
 
1575
1608
  sprintf(long_version,
1576
- "This is %s ($Date: 2009/04/19 17:38:00 $) Copyright (C) 2009 by Timothy P. Hunter\n"
1609
+ "This is %s ($Date: 2009/06/19 22:07:05 $) Copyright (C) 2009 by Timothy P. Hunter\n"
1577
1610
  "Built with %s\n"
1578
1611
  "Built for %s\n"
1579
1612
  "Web page: http://rmagick.rubyforge.org\n"
@@ -1,4 +1,4 @@
1
- /* $Id: rmpixel.c,v 1.4 2009/02/28 23:50:36 rmagick Exp $ */
1
+ /* $Id: rmpixel.c,v 1.5 2009/06/03 23:08:31 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmpixel.c
@@ -393,14 +393,9 @@ Pixel_from_HSL(VALUE class, VALUE hsl)
393
393
  saturation = NUM2DBL(rb_ary_entry(hsl, 1));
394
394
  luminosity = NUM2DBL(rb_ary_entry(hsl, 2));
395
395
 
396
- #if defined(HAVE_CONVERTHSLTORGB)
397
396
  rb_warning("Pixel#from_HSL is deprecated; use from_hsla");
398
397
  ConvertHSLToRGB(hue, saturation, luminosity,
399
398
  &rgb.red, &rgb.green, &rgb.blue);
400
- #else
401
- HSLTransform(hue, saturation, luminosity,
402
- &rgb.red, &rgb.green, &rgb.blue);
403
- #endif
404
399
  return Pixel_from_PixelPacket(&rgb);
405
400
  }
406
401
 
@@ -634,11 +629,7 @@ Pixel_to_hsla(VALUE self)
634
629
 
635
630
  Data_Get_Struct(self, Pixel, pixel);
636
631
 
637
- #if defined(HAVE_CONVERTRGBTOHSL)
638
632
  ConvertRGBToHSL(pixel->red, pixel->green, pixel->blue, &hue, &sat, &lum);
639
- #else
640
- TransformHSL(pixel->red, pixel->green, pixel->blue, &hue, &sat, &lum);
641
- #endif
642
633
  hue *= 360.0;
643
634
  sat *= 100.0;
644
635
  lum *= 100.0;
@@ -673,12 +664,9 @@ Pixel_to_HSL(VALUE self)
673
664
  volatile VALUE hsl;
674
665
 
675
666
  Data_Get_Struct(self, Pixel, pixel);
676
- #if defined(HAVE_CONVERTRGBTOHSL)
667
+
677
668
  rb_warning("Pixel#to_HSL is deprecated; use to_hsla");
678
669
  ConvertRGBToHSL(pixel->red, pixel->green, pixel->blue, &hue, &saturation, &luminosity);
679
- #else
680
- TransformHSL(pixel->red, pixel->green, pixel->blue, &hue, &saturation, &luminosity);
681
- #endif
682
670
 
683
671
  hsl = rb_ary_new3(3, rb_float_new(hue), rb_float_new(saturation),
684
672
  rb_float_new(luminosity));
@@ -1,4 +1,4 @@
1
- /* $Id: rmutil.c,v 1.178 2009/02/28 23:50:36 rmagick Exp $ */
1
+ /* $Id: rmutil.c,v 1.179 2009/06/03 23:08:31 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmutil.c
@@ -27,7 +27,6 @@ static void handle_exception(ExceptionInfo *, Image *, ErrorRetention);
27
27
  void *
28
28
  magick_safe_malloc(const size_t count, const size_t quantum)
29
29
  {
30
- #if defined(HAVE_ACQUIREQUANTUMMEMORY)
31
30
  void *ptr;
32
31
 
33
32
  ptr = AcquireQuantumMemory(count, quantum);
@@ -36,18 +35,6 @@ magick_safe_malloc(const size_t count, const size_t quantum)
36
35
  rb_raise(rb_eNoMemError, "not enough memory to continue");
37
36
  }
38
37
  return ptr;
39
- #else
40
-
41
- // Provide an implementation of AcquireQuantumMemory in releases prior to 6.3.5-9.
42
- size_t size = count * quantum;
43
-
44
- if (count == 0 || quantum != (size/count))
45
- {
46
- rb_raise(rb_eRuntimeError, "integer overflow detected in memory size computation. "
47
- "Probable image corruption.");
48
- }
49
- return magick_malloc(size);
50
- #endif
51
38
  }
52
39
 
53
40
 
@@ -75,7 +62,6 @@ magick_free(void *ptr)
75
62
  void *
76
63
  magick_safe_realloc(void *memory, const size_t count, const size_t quantum)
77
64
  {
78
- #if defined(HAVE_RESIZEQUANTUMMEMORY)
79
65
  void *v;
80
66
  v = ResizeQuantumMemory(memory, count, quantum);
81
67
  if (!v)
@@ -83,16 +69,6 @@ magick_safe_realloc(void *memory, const size_t count, const size_t quantum)
83
69
  rb_raise(rb_eNoMemError, "not enough memory to continue");
84
70
  }
85
71
  return v;
86
- #else
87
- // Provide an implementation of ResizeQuantumMemory in releases prior to 6.3.5-9.
88
- size_t size = count * quantum;
89
- if (count == 0 || quantum != (size/count))
90
- {
91
- rb_raise(rb_eRuntimeError, "integer overflow detected in memory size computation. "
92
- "Probable image corruption.");
93
- }
94
- return magick_realloc(memory, size);
95
- #endif
96
72
  }
97
73
 
98
74
 
@@ -576,7 +552,6 @@ void
576
552
  rm_write_temp_image(Image *image, char *temp_name)
577
553
  {
578
554
 
579
- #if defined(HAVE_SETIMAGEREGISTRY)
580
555
  #define TMPNAM_CLASS_VAR "@@_tmpnam_"
581
556
 
582
557
  MagickBooleanType okay;
@@ -612,24 +587,6 @@ rm_write_temp_image(Image *image, char *temp_name)
612
587
  rb_raise(rb_eRuntimeError, "SetImageRegistry failed.");
613
588
  }
614
589
 
615
- #else
616
-
617
- long registry_id;
618
-
619
- rb_warn("`%s' can cause memory leaks with ImageMagick " MagickLibVersionText
620
- ".\nUpgrade to ImageMagick 6.3.4-10 or later to prevent this behavior."
621
- , rb_id2name(THIS_FUNC()));
622
-
623
- registry_id = SetMagickRegistry(ImageRegistryType, image, sizeof(Image), &image->exception);
624
- rm_check_image_exception(image, RetainOnError);
625
- if (registry_id < 0)
626
- {
627
- rb_raise(rb_eRuntimeError, "SetMagickRegistry failed.");
628
- }
629
-
630
- sprintf(temp_name, "mpri:%ld", registry_id);
631
- #endif
632
-
633
590
  }
634
591
 
635
592
 
@@ -737,14 +694,7 @@ ImageMagickError_initialize(int argc, VALUE *argv, VALUE self)
737
694
  const char *
738
695
  rm_get_property(const Image *img, const char *property)
739
696
  {
740
- #if defined(HAVE_GETIMAGEPROPERTY)
741
697
  return GetImageProperty(img, property);
742
- #else
743
- const ImageAttribute *attr;
744
-
745
- attr = GetImageAttribute(img, property);
746
- return attr ? (const char *)attr->value : NULL;
747
- #endif
748
698
  }
749
699
 
750
700
 
@@ -755,11 +705,7 @@ rm_get_property(const Image *img, const char *property)
755
705
  MagickBooleanType
756
706
  rm_set_property(Image *image, const char *property, const char *value)
757
707
  {
758
- #if defined(HAVE_SETIMAGEPROPERTY)
759
708
  return SetImageProperty(image, property, value);
760
- #else
761
- return SetImageAttribute(image, property, value);
762
- #endif
763
709
  }
764
710
 
765
711
 
@@ -954,13 +900,11 @@ void rm_sync_image_options(Image *image, Info *info)
954
900
  image->scene = info->scene;
955
901
  }
956
902
 
957
- #if defined(HAVE_ST_TILE_OFFSET)
958
903
  option = GetImageOption(info, "tile-offset");
959
904
  if (option)
960
905
  {
961
906
  (void)ParseAbsoluteGeometry(option, &image->tile_offset);
962
907
  }
963
- #endif
964
908
 
965
909
  option = GetImageOption(info, "transparent");
966
910
  if (option)
@@ -1024,7 +968,6 @@ void rm_sync_image_options(Image *image, Info *info)
1024
968
  VALUE
1025
969
  rm_exif_by_entry(Image *image)
1026
970
  {
1027
- #if defined(HAVE_GETIMAGEPROPERTY)
1028
971
  const char *property, *value;
1029
972
  char *str;
1030
973
  size_t len = 0, property_l, value_l;
@@ -1093,13 +1036,6 @@ rm_exif_by_entry(Image *image)
1093
1036
  v = rb_str_new(str, len);
1094
1037
  xfree(str);
1095
1038
  return v;
1096
-
1097
- #else
1098
-
1099
- const char *attr = rm_get_property(image, "EXIF:*");
1100
- return attr ? rb_str_new2(attr) : Qnil;
1101
-
1102
- #endif
1103
1039
  }
1104
1040
 
1105
1041
 
@@ -1114,7 +1050,6 @@ rm_exif_by_entry(Image *image)
1114
1050
  VALUE
1115
1051
  rm_exif_by_number(Image *image)
1116
1052
  {
1117
- #if defined(HAVE_GETIMAGEPROPERTY)
1118
1053
  const char *property, *value;
1119
1054
  char *str;
1120
1055
  size_t len = 0, property_l, value_l;
@@ -1183,13 +1118,6 @@ rm_exif_by_number(Image *image)
1183
1118
  v = rb_str_new(str, len);
1184
1119
  xfree(str);
1185
1120
  return v;
1186
-
1187
- #else
1188
-
1189
- const char *attr = rm_get_property(image, "EXIF:!");
1190
- return attr ? rb_str_new2(attr) : Qnil;
1191
-
1192
- #endif
1193
1121
  }
1194
1122
 
1195
1123