rmagick 1.15.17 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

Files changed (108) hide show
  1. data/ChangeLog +78 -25
  2. data/README.html +117 -188
  3. data/README.txt +116 -181
  4. data/build_tarball.rake +205 -0
  5. data/doc/comtasks.html +2 -2
  6. data/doc/constants.html +118 -44
  7. data/doc/draw.html +57 -99
  8. data/doc/ex/adaptive_threshold.rb +1 -10
  9. data/doc/ex/add_noise.rb +4 -5
  10. data/doc/ex/axes.rb +1 -1
  11. data/doc/ex/bilevel_channel.rb +2 -13
  12. data/doc/ex/bounding_box.rb +3 -4
  13. data/doc/ex/channel.rb +6 -7
  14. data/doc/ex/clip_path.rb +11 -5
  15. data/doc/ex/color_histogram.rb +8 -20
  16. data/doc/ex/composite_layers.rb +53 -0
  17. data/doc/ex/fill_pattern.rb +26 -0
  18. data/doc/ex/get_multiline_type_metrics.rb +26 -37
  19. data/doc/ex/get_type_metrics.rb +25 -25
  20. data/doc/ex/images/notimplemented.gif +0 -0
  21. data/doc/ex/level.rb +1 -1
  22. data/doc/ex/matte_floodfill.rb +5 -6
  23. data/doc/ex/matte_replace.rb +5 -6
  24. data/doc/ex/negate_channel.rb +0 -10
  25. data/doc/ex/opacity.rb +3 -5
  26. data/doc/ex/polaroid.rb +4 -1
  27. data/doc/ex/posterize.rb +1 -12
  28. data/doc/ex/preview.rb +1 -8
  29. data/doc/ex/radial_blur.rb +1 -11
  30. data/doc/ex/raise.rb +1 -4
  31. data/doc/ex/random_threshold_channel.rb +4 -9
  32. data/doc/ex/sepiatone.rb +2 -9
  33. data/doc/ex/shadow.rb +12 -18
  34. data/doc/ex/sketch.rb +2 -9
  35. data/doc/ex/smile.rb +7 -7
  36. data/doc/ex/splice.rb +3 -10
  37. data/doc/ex/stegano.rb +5 -0
  38. data/doc/ex/threshold.rb +2 -2
  39. data/doc/ex/transpose.rb +1 -8
  40. data/doc/ex/transverse.rb +1 -8
  41. data/doc/ex/trim.rb +1 -2
  42. data/doc/ex/viewex.rb +4 -5
  43. data/doc/ex/vignette.rb +1 -8
  44. data/doc/ex/watermark.rb +1 -0
  45. data/doc/ex/wet_floor.rb +8 -14
  46. data/doc/ilist.html +301 -110
  47. data/doc/image1.html +362 -258
  48. data/doc/image2.html +429 -286
  49. data/doc/image3.html +418 -192
  50. data/doc/imageattrs.html +100 -39
  51. data/doc/imusage.html +26 -21
  52. data/doc/index.html +52 -93
  53. data/doc/info.html +160 -64
  54. data/doc/magick.html +37 -71
  55. data/doc/optequiv.html +155 -61
  56. data/doc/rvg.html +3 -3
  57. data/doc/rvgclip.html +2 -2
  58. data/doc/rvggroup.html +2 -2
  59. data/doc/rvgimage.html +3 -3
  60. data/doc/rvgpattern.html +3 -3
  61. data/doc/rvgshape.html +2 -2
  62. data/doc/rvgstyle.html +2 -2
  63. data/doc/rvgtext.html +2 -2
  64. data/doc/rvgtspan.html +4 -4
  65. data/doc/rvgtut.html +4 -4
  66. data/doc/rvguse.html +3 -3
  67. data/doc/rvgxform.html +2 -2
  68. data/doc/struct.html +26 -29
  69. data/doc/usage.html +99 -48
  70. data/examples/crop_with_gravity.rb +46 -0
  71. data/examples/demo.rb +2 -2
  72. data/examples/histogram.rb +11 -11
  73. data/examples/identify.rb +45 -45
  74. data/examples/spinner.rb +3 -2
  75. data/ext/RMagick/MANIFEST +7 -8
  76. data/ext/RMagick/extconf.rb +242 -0
  77. data/ext/RMagick/rmagick.h +136 -222
  78. data/ext/RMagick/rmdraw.c +226 -229
  79. data/ext/RMagick/rmfill.c +69 -118
  80. data/ext/RMagick/rmilist.c +234 -94
  81. data/ext/RMagick/rmimage.c +1719 -2564
  82. data/ext/RMagick/rminfo.c +433 -619
  83. data/ext/RMagick/rmmain.c +249 -487
  84. data/ext/RMagick/rmutil.c +344 -563
  85. data/lib/RMagick.rb +414 -358
  86. data/lib/rvg/clippath.rb +2 -2
  87. data/lib/rvg/container.rb +2 -2
  88. data/lib/rvg/describable.rb +2 -2
  89. data/lib/rvg/embellishable.rb +2 -2
  90. data/lib/rvg/misc.rb +3 -3
  91. data/lib/rvg/paint.rb +2 -7
  92. data/lib/rvg/pathdata.rb +2 -2
  93. data/lib/rvg/rvg.rb +2 -2
  94. data/lib/rvg/stretchable.rb +2 -14
  95. data/lib/rvg/stylable.rb +2 -2
  96. data/lib/rvg/text.rb +2 -2
  97. data/lib/rvg/transformable.rb +2 -2
  98. data/lib/rvg/units.rb +2 -2
  99. data/{metaconfig.in → metaconfig} +0 -1
  100. data/post-setup.rb +1 -1
  101. data/rmagick.gemspec +6 -9
  102. metadata +41 -49
  103. data/Makefile.in +0 -42
  104. data/configure +0 -12358
  105. data/configure.ac +0 -791
  106. data/ext/RMagick/extconf.rb.in +0 -25
  107. data/ext/RMagick/rmagick_config.h.in +0 -285
  108. data/gem_extconf.rb +0 -42
@@ -1,4 +1,4 @@
1
- /* $Id: rmagick.h,v 1.152.2.4.2.3 2008/10/01 22:50:58 rmagick Exp $ */
1
+ /* $Id: rmagick.h,v 1.211 2007/12/26 21:41:48 rmagick Exp $ */
2
2
  /*=============================================================================
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmagick.h
@@ -12,12 +12,19 @@
12
12
  #include <assert.h>
13
13
  #include <stdio.h>
14
14
  #include <ctype.h>
15
+ #include <stdint.h>
15
16
  #include <stdlib.h>
16
17
  #include <math.h>
17
18
  #include <time.h>
19
+ #if defined(HAVE_SYS_TYPES_H)
18
20
  #include <sys/types.h>
21
+ #endif
19
22
  #include "ruby.h"
23
+ #if defined(HAVE_RUBY_INTERN_H)
24
+ #include "ruby/intern.h"
25
+ #else
20
26
  #include "intern.h"
27
+ #endif
21
28
  #include "rubyio.h"
22
29
 
23
30
 
@@ -28,50 +35,42 @@
28
35
  #undef PACKAGE_BUGREPORT
29
36
  #undef PACKAGE_TARNAME
30
37
 
31
-
32
- #include "magick/api.h"
38
+ #include "magick/MagickCore.h"
33
39
 
34
40
  // Undef ImageMagick's versions of these symbols
35
- #undef PACKAGE_VERSION
36
- #undef PACKAGE_NAME
37
41
  #undef PACKAGE_STRING
38
- #undef PACKAGE_BUGREPORT
39
- #undef PACKAGE_TARNAME
40
42
 
41
43
 
42
- #include "rmagick_config.h"
44
+ #include "extconf.h"
43
45
 
44
- // Define a pair of macros that make it easier to code
45
- // 1.6 and 1.8 alternatives. Code enclosed in RUBY18()
46
- // is present when compiled for 1.8.0 and later. Code
47
- // enclosed in RUBY16 is present for 1.6 versions.
48
- #if RUBY_VERSION >= 0x180
49
- #define RUBY18(d) d
50
- #define RUBY16(d)
51
- #else
52
- #define RUBY18(d)
53
- #define RUBY16(d) d
54
- #endif
55
46
 
56
- // Backport these definitions to Ruby 1.6.7
57
- #if !defined(ULONG2NUM)
58
- #define ULONG2NUM(v) UINT2NUM(v)
59
- #endif
47
+ // For quoting preprocessor symbols
48
+ #define Q2(q) #q
49
+ #define Q(q) Q2(q)
60
50
 
61
- #if !defined(LONG2NUM)
62
- #define LONG2NUM(v) INT2NUM(v)
63
- #endif
64
51
 
52
+ // Trace new image creation in bang methods
53
+ #define UPDATE_DATA_PTR(_obj_, _new_) \
54
+ do { (void) rm_trace_creation(_new_);\
55
+ DATA_PTR(_obj_) = (void *)(_new_);\
56
+ } while(0)
65
57
 
66
- // Define a version of StringValuePtr that works in both 1.6 and 1.8.
67
- #if !defined(StringValuePtr)
68
- #define STRING_PTR(v) rm_string_value_ptr(&(v))
58
+
59
+ // Handle Quantum <-> Ruby Numeric object conversion
60
+ #if (QuantumDepth == 8 || QuantumDepth == 16)
61
+ #define QUANTUM2NUM(q) INT2FIX((q))
62
+ #define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
63
+ #elif (QuantumDepth == 32)
64
+ #define QUANTUM2NUM(q) UINT2NUM((q))
65
+ #define NUM2QUANTUM(n) (Quantum)NUM2UINT((n))
66
+ #elif (QuantumDepth == 64)
67
+ #define QUANTUM2NUM(q) ULL2NUM((q))
68
+ #define NUM2QUANTUM(n) (Quantum)NUM2ULL((n))
69
69
  #else
70
- #define STRING_PTR(v) StringValuePtr(v)
70
+ #error Specified QuantumDepth is not supported.
71
71
  #endif
72
-
73
- // Safe replacement for rb_str2cstr
74
- #define STRING_PTR_LEN(v,l) rm_string_value_ptr_len(&(v), &(l))
72
+ // Convert user-supplied objects to Quantum
73
+ #define APP2QUANTUM(n) rm_app2quantum((n))
75
74
 
76
75
  #undef DegreesToRadians // defined in ImageMagick.h in 6.0.2
77
76
  #define DegreesToRadians(x) ((x)*3.14159265358979323846/180.0)
@@ -83,6 +82,41 @@
83
82
  #define FMAX(a,b) ((((double)(a))>((double)(b)))?((double)(a)):((double)(b)))
84
83
  #define FMIN(a,b) ((((double)(a))<=((double)(b)))?((double)(a)):((double)(b)))
85
84
  #define RMAGICK_PI 3.14159265358979
85
+ #define ROUND_TO_QUANTUM(value) ((Quantum) ((value) > (Quantum)QuantumRange ? QuantumRange : (value) + 0.5))
86
+
87
+
88
+ // Ruby 1.9.0 changed the name to rb_frame_this_func
89
+ #if defined(HAVE_RB_FRAME_THIS_FUNC)
90
+ #define THIS_FUNC() rb_frame_this_func()
91
+ #else
92
+ #define THIS_FUNC() rb_frame_last_func()
93
+ #endif
94
+
95
+ // GetReadFile doesn't exist in Ruby 1.9.0
96
+ #if !defined(GetReadFile)
97
+ #define GetReadFile(fptr) rb_io_stdio_file(fptr)
98
+ #define GetWriteFile(fptr) rb_io_stdio_file(fptr)
99
+ #endif
100
+
101
+ // rb_io_t replaces OpenFile in Ruby 1.9.0
102
+ #if defined(HAVE_RB_IO_T)
103
+ #undef OpenFile
104
+ #define OpenFile rb_io_t
105
+ #endif
106
+
107
+ // ImageLayerMethod replaced MagickLayerMethod starting with 6.3.6
108
+ #if defined(HAVE_TYPE_IMAGELAYERMETHOD)
109
+ #define LAYERMETHODTYPE ImageLayerMethod
110
+ #define CLASS_LAYERMETHODTYPE Class_ImageLayerMethod
111
+ #define LAYERMETHODTYPE_NAME ImageLayerMethod_name
112
+ #define LAYERMETHODTYPE_NEW ImageLayerMethod_new
113
+ #else
114
+ #define LAYERMETHODTYPE MagickLayerMethod
115
+ #define CLASS_LAYERMETHODTYPE Class_MagickLayerMethod
116
+ #define LAYERMETHODTYPE_NAME MagickLayerMethod_name
117
+ #define LAYERMETHODTYPE_NEW MagickLayerMethod_new
118
+ #endif
119
+
86
120
 
87
121
  typedef ImageInfo Info; // Make type name match class name
88
122
  typedef PixelPacket Pixel;
@@ -157,7 +191,6 @@ typedef struct
157
191
 
158
192
  #define MAX_GEOM_STR 51 // max length of a geometry string
159
193
 
160
- #if defined(HAVE_QUANTUMOPERATORREGIONIMAGE) || defined(HAVE_EVALUATEIMAGECHANNEL)
161
194
  /*
162
195
  * Both ImageMagick and GraphicsMagick define an enum type for quantum-level
163
196
  * expressions, but they're different types. The QuantumExpressionOperator
@@ -178,87 +211,8 @@ typedef enum _QuantumExpressionOperator
178
211
  SubtractQuantumOperator,
179
212
  XorQuantumOperator
180
213
  } QuantumExpressionOperator ;
181
- #endif
182
-
183
-
184
- /*
185
- ImageMagick used simply size_t and off_t in 5.5.1, then defined the
186
- Extended(Un)SignedIntegralType from 5.5.2 thru 5.5.7. The 5.5.8 release
187
- deprecates these types and uses Magick(Un)SignedType instead.
188
- Prior to 1.1, GraphicsMagick defined the Extended(Un)SignedIntegralType(s).
189
- GraphicsMagick 1.1. introduced the magick_(u)int64_t types.
190
-
191
- Here, if we don't already have magick_(u)int64_t, define them in terms
192
- of whatever other types are defined.
193
- */
194
- #if !defined(HAVE_MAGICK_INT64_T)
195
- #if defined(HAVE_MAGICKOFFSETTYPE)
196
- typedef MagickOffsetType magick_int64_t;
197
- #elif defined(HAVE_EXTENDEDSIGNEDINTEGRALTYPE)
198
- typedef ExtendedSignedIntegralType magick_int64_t;
199
- #else
200
- typedef off_t magick_int64_t;
201
- #endif
202
- #endif
203
-
204
- #if !defined(HAVE_MAGICK_UINT64_T)
205
- #if defined(HAVE_MAGICKSIZETYPE)
206
- typedef MagickSizeType magick_uint64_t;
207
- #elif defined(HAVE_EXTENDEDUNSIGNEDINTEGRALTYPE)
208
- typedef ExtendedUnsignedIntegralType magick_uint64_t;
209
- #else
210
- typedef size_t magick_uint64_t;
211
- #endif
212
- #endif
213
-
214
- // IM < 6.2.0 and GM don't have MagickBooleanType
215
- #if !defined(HAVE_MAGICKBOOLEANTYPE)
216
- typedef unsigned int MagickBooleanType;
217
- #if !defined(MagickTrue)
218
- #define MagickTrue 1
219
- #endif
220
- #if !defined(MagickFalse)
221
- #define MagickFalse 0
222
- #endif
223
- #endif
224
-
225
- #if !defined(HAVE_UNDEFINEDGRAVITY)
226
- #define UndefinedGravity 0
227
- #endif
228
-
229
- #if !defined(HAVE_QUANTUMPIXEL)
230
- #if QuantumDepth == 8
231
- #define QuantumPixel CharPixel
232
- #else
233
- #define QuantumPixel ShortPixel
234
- #endif
235
- #endif
236
-
237
- #if !defined(HAVE_SETIMAGEINFOFILE)
238
- #define SetImageInfoFile(info, fptr) (info)->file = (fptr)
239
- #endif
240
-
241
- #if !defined(HAVE_REMOVEFIRSTIMAGEFROMLIST)
242
- #define RemoveFirstImageFromList(i) ShiftImageList(i)
243
- #endif
244
-
245
- #if !defined(HAVE_GETBLOBSIZE)
246
- #define GetBlobSize(i) SizeBlob(i)
247
- #endif
248
-
249
- #define ROUND_TO_QUANTUM(value) ((Quantum) ((value) > MaxRGB ? MaxRGB : (value) + 0.5))
250
-
251
- #if !defined(HAVE_SETIMAGEEXTENT)
252
- #define SetImageExtent(img, c, r) \
253
- (img)->columns = (c); \
254
- (img)->rows = (r)
255
- #endif
256
214
 
257
215
 
258
- #if !defined(HAVE_SETIMAGEBACKGROUNDCOLOR)
259
- #define SetImageBackgroundColor(img) SetImage((img), OpaqueOpacity)
260
- #endif
261
-
262
216
  // This implements the "omitted storage class model" for external variables.
263
217
  // (Ref: Harbison & Steele.) The rmmain.c file defines MAIN, which causes
264
218
  // the single defining declarations to be generated. No other source files
@@ -281,6 +235,7 @@ EXTERN VALUE Class_DrawOptions;
281
235
  EXTERN VALUE Class_Image;
282
236
  EXTERN VALUE Class_Montage;
283
237
  EXTERN VALUE Class_ImageMagickError;
238
+ EXTERN VALUE Class_DestroyedImageError;
284
239
  EXTERN VALUE Class_GradientFill;
285
240
  EXTERN VALUE Class_TextureFill;
286
241
  EXTERN VALUE Class_AffineMatrix;
@@ -296,20 +251,13 @@ EXTERN VALUE Class_Primary;
296
251
  EXTERN VALUE Class_Rectangle;
297
252
  EXTERN VALUE Class_Segment;
298
253
  EXTERN VALUE Class_TypeMetric;
299
- #if defined(HAVE_COMPAREIMAGECHANNELS) || defined(HAVE_GETIMAGECHANNELDISTORTION)
300
254
  EXTERN VALUE Class_MetricType;
301
- #endif
302
- #if defined(HAVE_QUANTUMOPERATORREGIONIMAGE) || defined(HAVE_EVALUATEIMAGECHANNEL)
303
255
  EXTERN VALUE Class_QuantumExpressionOperator;
304
- #endif
305
- #if defined(HAVE_GETIMAGESTATISTICS)
306
- EXTERN VALUE Class_Statistics;
307
- EXTERN VALUE Class_StatisticsChannel;
308
- #endif
309
256
 
310
257
  // Enum classes
311
258
  EXTERN VALUE Class_Enum;
312
259
  EXTERN VALUE Class_AlignType;
260
+ EXTERN VALUE Class_AlphaChannelType;
313
261
  EXTERN VALUE Class_AnchorType;
314
262
  EXTERN VALUE Class_ChannelType;
315
263
  EXTERN VALUE Class_ClassType;
@@ -319,21 +267,18 @@ EXTERN VALUE Class_CompositeOperator;
319
267
  EXTERN VALUE Class_CompressionType;
320
268
  EXTERN VALUE Class_DecorationType;
321
269
  EXTERN VALUE Class_DisposeType;
270
+ #if defined(HAVE_DISTORTIMAGE)
271
+ EXTERN VALUE Class_DistortImageMethod;
272
+ #endif
322
273
  EXTERN VALUE Class_EndianType;
323
274
  EXTERN VALUE Class_FilterTypes;
324
275
  EXTERN VALUE Class_GravityType;
325
276
  EXTERN VALUE Class_ImageType;
326
277
  EXTERN VALUE Class_InterlaceType;
327
- #if defined(HAVE_INTERPOLATEPIXELCOLOR)
328
278
  EXTERN VALUE Class_InterpolatePixelMethod;
329
- #endif
330
- #if defined(HAVE_COMPAREIMAGELAYERS)
331
- EXTERN VALUE Class_MagickLayerMethod;
332
- #endif
279
+ EXTERN VALUE CLASS_LAYERMETHODTYPE;
333
280
  EXTERN VALUE Class_NoiseType;
334
- #if defined(HAVE_IMAGE_ORIENTATION)
335
281
  EXTERN VALUE Class_OrientationType;
336
- #endif
337
282
  EXTERN VALUE Class_PaintMethod;
338
283
  EXTERN VALUE Class_PreviewType;
339
284
  EXTERN VALUE Class_RenderingIntent;
@@ -347,6 +292,7 @@ EXTERN VALUE Class_VirtualPixelMethod;
347
292
  /*
348
293
  * Commonly-used IDs
349
294
  */
295
+ EXTERN ID rm_ID_trace_proc; // "@trace_proc"
350
296
  EXTERN ID rm_ID__dummy_img_; // "_dummy_img_"
351
297
  EXTERN ID rm_ID_call; // "call"
352
298
  EXTERN ID rm_ID_changed; // "changed"
@@ -365,7 +311,8 @@ EXTERN ID rm_ID_notify_observers; // "notify_observers"
365
311
  EXTERN ID rm_ID_new; // "new"
366
312
  EXTERN ID rm_ID_push; // "push"
367
313
  EXTERN ID rm_ID_spaceship; // "<=>
368
- EXTERN ID rm_ID__tmpnam_; // "_tmpnam"
314
+ EXTERN ID rm_ID__tmpnam_; // "_tmpnam_"
315
+ EXTERN ID rm_ID_to_i; // "to_i"
369
316
  EXTERN ID rm_ID_to_s; // "to_s"
370
317
  EXTERN ID rm_ID_values; // "values"
371
318
  EXTERN ID rm_ID_width; // "width"
@@ -376,25 +323,11 @@ EXTERN ID rm_ID_y; // "y"
376
323
  #define min(a,b) ((a)<(b)?(a):(b))
377
324
  #define max(a,b) ((a)>(b)?(a):(b))
378
325
 
379
- #define Q(N) Q2(N)
380
- #define Q2(N) #N
381
-
382
326
  /*
383
327
  Handle warnings & errors
384
328
  */
385
329
  #define CHECK_EXCEPTION() rm_check_exception(&exception, NULL, RetainOnError);
386
330
 
387
- /*
388
- Map the QuantumDepth to a StorageType.
389
- */
390
- #if QuantumDepth == 8
391
- #define FIX_STG_TYPE CharPixel
392
- #elif QuantumDepth == 16
393
- #define FIX_STG_TYPE ShortPixel
394
- #else // QuantumDepth == 32
395
- #define FIX_STG_TYPE LongPixel
396
- #endif
397
-
398
331
 
399
332
  /*
400
333
  Call rb_define_method for an attribute accessor method
@@ -429,6 +362,9 @@ EXTERN ID rm_ID_y; // "y"
429
362
  VALUE class##_##attr(VALUE self)\
430
363
  {\
431
364
  class *ptr;\
365
+ if (rb_obj_is_kind_of(self, Class_Image) == Qtrue) {\
366
+ (void) rm_check_destroyed(self); \
367
+ }\
432
368
  Data_Get_Struct(self, class, ptr);\
433
369
  return C_##type##_to_R_##type(ptr->attr);\
434
370
  }
@@ -438,6 +374,7 @@ EXTERN ID rm_ID_y; // "y"
438
374
  VALUE class##_##attr(VALUE self)\
439
375
  {\
440
376
  class *ptr;\
377
+ (void) rm_check_destroyed(self); \
441
378
  Data_Get_Struct(self, class, ptr);\
442
379
  return C_##type##_to_R_##type(ptr->field);\
443
380
  }
@@ -445,7 +382,10 @@ EXTERN ID rm_ID_y; // "y"
445
382
  VALUE class##_##attr##_eq(VALUE self, VALUE val)\
446
383
  {\
447
384
  class *ptr;\
448
- rm_check_frozen(self);\
385
+ if (rb_obj_is_kind_of(self, Class_Image) == Qtrue) {\
386
+ (void) rm_check_destroyed(self); \
387
+ }\
388
+ rb_check_frozen(self);\
449
389
  Data_Get_Struct(self, class, ptr);\
450
390
  ptr->attr = R_##type##_to_C_##type(val);\
451
391
  return self;\
@@ -493,12 +433,12 @@ Pixel_##_channel_##_eq(VALUE self, VALUE v) \
493
433
  { \
494
434
  Pixel *pixel; \
495
435
  \
496
- rm_check_frozen(self); \
436
+ rb_check_frozen(self); \
497
437
  Data_Get_Struct(self, Pixel, pixel); \
498
- pixel->_channel_ = (Quantum) NUM2UINT(v); \
438
+ pixel->_channel_ = APP2QUANTUM(v); \
499
439
  (void) rb_funcall(self, rm_ID_changed, 0); \
500
440
  (void) rb_funcall(self, rm_ID_notify_observers, 1, self); \
501
- return UINT2NUM((unsigned int)(pixel->_channel_)); \
441
+ return QUANTUM2NUM((pixel->_channel_)); \
502
442
  }
503
443
 
504
444
 
@@ -511,12 +451,12 @@ Pixel_##_cmyk_channel_##_eq(VALUE self, VALUE v) \
511
451
  { \
512
452
  Pixel *pixel; \
513
453
  \
514
- rm_check_frozen(self); \
454
+ rb_check_frozen(self); \
515
455
  Data_Get_Struct(self, Pixel, pixel); \
516
- pixel->_rgb_channel_ = (Quantum) NUM2UINT(v); \
456
+ pixel->_rgb_channel_ = APP2QUANTUM(v); \
517
457
  (void) rb_funcall(self, rm_ID_changed, 0); \
518
458
  (void) rb_funcall(self, rm_ID_notify_observers, 1, self); \
519
- return UINT2NUM((unsigned int)pixel->_rgb_channel_); \
459
+ return QUANTUM2NUM(pixel->_rgb_channel_); \
520
460
  } \
521
461
  \
522
462
  extern VALUE \
@@ -544,7 +484,11 @@ Pixel_##_cmyk_channel_(VALUE self) \
544
484
  #define END_ENUM }
545
485
 
546
486
  // Define a Magick module constant
547
- #define DEF_CONST(constant) rb_define_const(Module_Magick, #constant, INT2FIX(constant))
487
+ #if QuantumDepth == 64
488
+ #define DEF_CONST(constant) rb_define_const(Module_Magick, #constant, ULL2NUM(constant))
489
+ #else // QuantumDepth == 8, 16, 32
490
+ #define DEF_CONST(constant) rb_define_const(Module_Magick, #constant, UINT2NUM(constant))
491
+ #endif
548
492
 
549
493
 
550
494
  // Convert a Ruby enum constant back to a C enum member.
@@ -576,6 +520,7 @@ ATTR_WRITER(Draw, decorate)
576
520
  ATTR_WRITER(Draw, density)
577
521
  ATTR_WRITER(Draw, encoding)
578
522
  ATTR_WRITER(Draw, fill)
523
+ ATTR_WRITER(Draw, fill_pattern)
579
524
  ATTR_WRITER(Draw, font)
580
525
  ATTR_WRITER(Draw, font_family)
581
526
  ATTR_WRITER(Draw, font_stretch)
@@ -585,6 +530,7 @@ ATTR_WRITER(Draw, gravity)
585
530
  ATTR_WRITER(Draw, pointsize)
586
531
  ATTR_WRITER(Draw, rotation)
587
532
  ATTR_WRITER(Draw, stroke)
533
+ ATTR_WRITER(Draw, stroke_pattern)
588
534
  ATTR_WRITER(Draw, stroke_width)
589
535
  ATTR_WRITER(Draw, text_antialias)
590
536
  ATTR_WRITER(Draw, tile)
@@ -599,13 +545,8 @@ extern VALUE Draw_get_type_metrics(int, VALUE *, VALUE);
599
545
  extern VALUE Draw_init_copy(VALUE, VALUE);
600
546
  extern VALUE Draw_initialize(VALUE);
601
547
  extern VALUE Draw_inspect(VALUE);
602
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
603
548
  extern VALUE Draw_alloc(VALUE);
604
549
  extern VALUE DrawOptions_alloc(VALUE);
605
- #else
606
- extern VALUE Draw_new(VALUE);
607
- extern VALUE DrawOptions_new(VALUE);
608
- #endif
609
550
  extern VALUE Draw_primitive(VALUE, VALUE);
610
551
  extern VALUE DrawOptions_initialize(VALUE);
611
552
 
@@ -628,21 +569,15 @@ ATTR_WRITER(Montage, texture)
628
569
  ATTR_WRITER(Montage, tile)
629
570
  ATTR_WRITER(Montage, title)
630
571
  extern VALUE Montage_initialize(VALUE);
631
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
632
572
  extern VALUE Montage_alloc(VALUE);
633
- #else
634
- extern VALUE Montage_new(VALUE);
635
- #endif
636
573
  extern VALUE rm_montage_new(void);
637
574
 
638
575
 
639
576
  extern VALUE PolaroidOptions_alloc(VALUE);
640
- #if !defined(HAVE_RB_DEFINE_ALLOC_FUNC)
641
- extern VALUE PolaroidOptions_new(VALUE);
642
- #endif
643
577
  extern VALUE PolaroidOptions_initialize(VALUE);
644
578
  extern VALUE rm_polaroid_new(void);
645
579
  ATTR_WRITER(PolaroidOptions, shadow_color);
580
+ ATTR_WRITER(PolaroidOptions, border_color);
646
581
 
647
582
 
648
583
  // rmmain.c
@@ -654,6 +589,7 @@ extern VALUE ImageList_animate(int, VALUE *, VALUE);
654
589
  extern VALUE ImageList_append(VALUE, VALUE);
655
590
  extern VALUE ImageList_average(VALUE);
656
591
  extern VALUE ImageList_coalesce(VALUE);
592
+ extern VALUE ImageList_composite_layers(int, VALUE *, VALUE);
657
593
  extern VALUE ImageList_deconstruct(VALUE);
658
594
  extern VALUE ImageList_display(VALUE);
659
595
  extern VALUE ImageList_flatten_images(VALUE);
@@ -667,16 +603,12 @@ extern VALUE ImageList_quantize(int, VALUE*, VALUE);
667
603
  extern VALUE ImageList_to_blob(VALUE);
668
604
  extern VALUE ImageList_write(VALUE, VALUE);
669
605
 
670
- extern VALUE rm_imagelist_new(void);
671
606
  extern VALUE rm_imagelist_from_images(Image *);
672
- extern Image *rm_images_from_imagelist(VALUE);
673
- extern VALUE rm_imagelist_scene_eq(VALUE, VALUE);
674
- extern int rm_imagelist_length(VALUE);
675
- extern void rm_imagelist_push(VALUE, VALUE);
676
607
 
677
608
 
678
609
  // rminfo.c
679
610
  ATTR_ACCESSOR(Info, antialias)
611
+ ATTR_ACCESSOR(Info, attenuate)
680
612
  ATTR_ACCESSOR(Info, authenticate)
681
613
  ATTR_ACCESSOR(Info, background_color)
682
614
  ATTR_ACCESSOR(Info, border_color)
@@ -713,24 +645,21 @@ ATTR_ACCESSOR(Info, quality)
713
645
  ATTR_ACCESSOR(Info, sampling_factor)
714
646
  ATTR_ACCESSOR(Info, scene)
715
647
  ATTR_ACCESSOR(Info, server_name)
716
- ATTR_ACCESSOR(Info, subimage)
717
- ATTR_ACCESSOR(Info, subrange)
718
- ATTR_WRITER(Info, texture)
719
- ATTR_ACCESSOR(Info, tile)
720
648
  ATTR_ACCESSOR(Info, size)
649
+ ATTR_ACCESSOR(Info, stroke)
650
+ ATTR_ACCESSOR(Info, stroke_width)
651
+ ATTR_WRITER(Info, texture)
652
+ ATTR_ACCESSOR(Info, tile_offset)
653
+ ATTR_ACCESSOR(Info, undercolor)
721
654
  ATTR_ACCESSOR(Info, units)
722
655
  ATTR_ACCESSOR(Info, view)
723
656
  //ATTR_ACCESSOR(Info, verbose)
724
657
 
725
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
726
658
  extern VALUE Info_alloc(VALUE);
727
- #else
728
- extern VALUE Info_new(VALUE);
729
- #endif
730
659
 
731
660
  extern VALUE Info_define(int, VALUE *, VALUE);
732
- extern VALUE Info_aset(VALUE, VALUE, VALUE, VALUE);
733
- extern VALUE Info_aref(VALUE, VALUE, VALUE);
661
+ extern VALUE Info_aset(int, VALUE *, VALUE);
662
+ extern VALUE Info_aref(int, VALUE *, VALUE);
734
663
  extern VALUE Info_channel(int, VALUE *, VALUE);
735
664
  extern VALUE Info_undefine(VALUE, VALUE, VALUE);
736
665
  extern VALUE Info_initialize(VALUE);
@@ -738,6 +667,7 @@ extern VALUE rm_info_new(void);
738
667
 
739
668
 
740
669
  // rmimage.c
670
+ ATTR_WRITER(Image, alpha)
741
671
  ATTR_ACCESSOR(Image, background_color)
742
672
  ATTR_READER(Image, base_columns)
743
673
  ATTR_READER(Image, base_filename)
@@ -769,7 +699,8 @@ ATTR_ACCESSOR(Image, format)
769
699
  ATTR_ACCESSOR(Image, fuzz)
770
700
  ATTR_ACCESSOR(Image, gamma)
771
701
  ATTR_ACCESSOR(Image, geometry)
772
- ATTR_ACCESSOR(Image, image_type)
702
+ ATTR_ACCESSOR(Image, gravity)
703
+ ATTR_READER(Image, image_type)
773
704
  ATTR_ACCESSOR(Image, interlace)
774
705
  ATTR_ACCESSOR(Image, iptc_profile)
775
706
  ATTR_ACCESSOR(Image, iterations)
@@ -779,7 +710,7 @@ ATTR_ACCESSOR(Image, matte_color)
779
710
  ATTR_READER(Image, mean_error_per_pixel)
780
711
  ATTR_READER(Image, mime_type)
781
712
  ATTR_WRITER(Image, monitor)
782
- ATTR_ACCESSOR(Image, montage)
713
+ ATTR_READER(Image, montage)
783
714
  ATTR_READER(Image, normalized_mean_error)
784
715
  ATTR_READER(Image, normalized_maximum_error)
785
716
  ATTR_READER(Image, number_colors)
@@ -795,7 +726,6 @@ ATTR_READER(Image, rows)
795
726
  ATTR_READER(Image, scene)
796
727
  ATTR_ACCESSOR(Image, start_loop)
797
728
  ATTR_ACCESSOR(Image, ticks_per_second)
798
- ATTR_ACCESSOR(Image, tile_info)
799
729
  ATTR_READER(Image, total_colors)
800
730
  ATTR_ACCESSOR(Image, transparent_color)
801
731
  ATTR_ACCESSOR(Image, units)
@@ -806,14 +736,8 @@ ATTR_ACCESSOR(Image, y_resolution)
806
736
  extern ChannelType extract_channels(int *, VALUE *);
807
737
  extern void raise_ChannelType_error(VALUE);
808
738
 
809
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
810
739
  extern VALUE Image_alloc(VALUE);
811
740
  extern VALUE Image_initialize(int, VALUE *, VALUE);
812
- #else
813
- extern VALUE Image_new(int, VALUE *, VALUE);
814
- extern VALUE Image_initialize(VALUE, VALUE, VALUE, VALUE, VALUE);
815
- #endif
816
-
817
741
  extern VALUE Image_adaptive_blur(int, VALUE *, VALUE);
818
742
  extern VALUE Image_adaptive_blur_channel(int, VALUE *, VALUE);
819
743
  extern VALUE Image_adaptive_resize(int, VALUE *, VALUE);
@@ -840,18 +764,20 @@ extern VALUE Image_capture(int, VALUE *, VALUE);
840
764
  extern VALUE Image_change_geometry(VALUE, VALUE);
841
765
  extern VALUE Image_changed_q(VALUE);
842
766
  extern VALUE Image_channel(VALUE, VALUE);
767
+ extern VALUE Image_check_destroyed(VALUE);
843
768
  extern VALUE Image_compare_channel(int, VALUE *, VALUE);
844
769
  extern VALUE Image_channel_depth(int, VALUE *, VALUE);
845
770
  extern VALUE Image_channel_extrema(int, VALUE *, VALUE);
846
771
  extern VALUE Image_channel_mean(int, VALUE *, VALUE);
847
- extern VALUE Image_channel_threshold(int, VALUE *, VALUE);
848
772
  extern VALUE Image_charcoal(int, VALUE *, VALUE);
849
773
  extern VALUE Image_chop(VALUE, VALUE, VALUE, VALUE, VALUE);
850
774
  extern VALUE Image_clone(VALUE);
775
+ extern VALUE Image_clut_channel(int, VALUE *, VALUE);
851
776
  extern VALUE Image_color_flood_fill(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
852
777
  extern VALUE Image_color_histogram(VALUE);
853
778
  extern VALUE Image_colorize(int, VALUE *, VALUE);
854
779
  extern VALUE Image_colormap(int, VALUE *, VALUE);
780
+ extern VALUE Image_combine(int, VALUE *, VALUE);
855
781
  extern VALUE Image_composite(int, VALUE *, VALUE);
856
782
  extern VALUE Image_composite_bang(int, VALUE *, VALUE);
857
783
  extern VALUE Image_composite_channel(int, VALUE *, VALUE);
@@ -869,11 +795,14 @@ extern VALUE Image_crop_bang(int, VALUE *, VALUE);
869
795
  extern VALUE Image_cycle_colormap(VALUE, VALUE);
870
796
  extern VALUE Image_delete_profile(VALUE, VALUE);
871
797
  extern VALUE Image_despeckle(VALUE);
798
+ extern VALUE Image_destroy_bang(VALUE);
799
+ extern VALUE Image_destroyed_q(VALUE);
872
800
  extern VALUE Image_difference(VALUE, VALUE);
873
801
  extern VALUE Image_dispatch(int, VALUE *, VALUE);
874
802
  extern VALUE Image_displace(int, VALUE *, VALUE);
875
803
  extern VALUE Image_display(VALUE);
876
804
  extern VALUE Image_dissolve(int, VALUE *, VALUE);
805
+ extern VALUE Image_distort(int, VALUE *, VALUE);
877
806
  extern VALUE Image_distortion_channel(int, VALUE *, VALUE);
878
807
  extern VALUE Image__dump(VALUE, VALUE);
879
808
  extern VALUE Image_dup(VALUE);
@@ -882,9 +811,13 @@ extern VALUE Image_edge(int, VALUE *, VALUE);
882
811
  extern VALUE Image_emboss(int, VALUE *, VALUE);
883
812
  extern VALUE Image_enhance(VALUE);
884
813
  extern VALUE Image_equalize(VALUE);
814
+ extern VALUE Image_equalize_channel(int, VALUE *, VALUE);
885
815
  extern VALUE Image_erase_bang(VALUE);
816
+ extern VALUE Image_excerpt(VALUE, VALUE, VALUE, VALUE, VALUE);
817
+ extern VALUE Image_excerpt_bang(VALUE, VALUE, VALUE, VALUE, VALUE);
886
818
  extern VALUE Image_export_pixels(int, VALUE *, VALUE);
887
819
  extern VALUE Image_export_pixels_to_str(int, VALUE *, VALUE);
820
+ extern VALUE Image_extent(int, VALUE *, VALUE);
888
821
  extern VALUE Image_find_similar_region(int, VALUE *, VALUE);
889
822
  extern VALUE Image_flip(VALUE);
890
823
  extern VALUE Image_flip_bang(VALUE);
@@ -898,7 +831,7 @@ extern VALUE Image_gaussian_blur(int, VALUE *, VALUE);
898
831
  extern VALUE Image_gaussian_blur_channel(int, VALUE *, VALUE);
899
832
  extern VALUE Image_get_pixels(VALUE, VALUE, VALUE, VALUE, VALUE);
900
833
  extern VALUE Image_gray_q(VALUE);
901
- extern VALUE Image_grayscale_pseudo_class(int, VALUE *, VALUE);
834
+ extern VALUE Image_histogram_q(VALUE);
902
835
  extern VALUE Image_implode(int, VALUE *, VALUE);
903
836
  extern VALUE Image_import_pixels(int, VALUE *, VALUE);
904
837
  extern VALUE Image_init_copy(VALUE, VALUE);
@@ -938,7 +871,6 @@ extern VALUE Image_quantum_operator(int, VALUE *, VALUE);
938
871
  extern VALUE Image_radial_blur(VALUE, VALUE);
939
872
  extern VALUE Image_radial_blur_channel(int, VALUE *, VALUE);
940
873
  extern VALUE Image_raise(int, VALUE *, VALUE);
941
- extern VALUE Image_random_channel_threshold(VALUE, VALUE, VALUE);
942
874
  extern VALUE Image_random_threshold_channel(int, VALUE *, VALUE);
943
875
  extern VALUE Image_read(VALUE, VALUE);
944
876
  extern VALUE Image_read_inline(VALUE, VALUE);
@@ -954,6 +886,7 @@ extern VALUE Image_sample_bang(int, VALUE *, VALUE);
954
886
  extern VALUE Image_scale(int, VALUE *, VALUE);
955
887
  extern VALUE Image_scale_bang(int, VALUE *, VALUE);
956
888
  extern VALUE Image_segment(int, VALUE *, VALUE);
889
+ extern VALUE Image_separate(int, VALUE *, VALUE);
957
890
  extern VALUE Image_sepiatone(int, VALUE *, VALUE);
958
891
  extern VALUE Image_set_channel_depth(VALUE, VALUE, VALUE);
959
892
  extern VALUE Image_shade(int, VALUE *, VALUE);
@@ -970,12 +903,12 @@ extern VALUE Image_solarize(int, VALUE *, VALUE);
970
903
  extern VALUE Image_spaceship(VALUE, VALUE);
971
904
  extern VALUE Image_splice(int, VALUE *, VALUE);
972
905
  extern VALUE Image_spread(int, VALUE *, VALUE);
973
- extern VALUE Image_statistics(VALUE);
974
906
  extern VALUE Image_stegano(VALUE, VALUE, VALUE);
975
907
  extern VALUE Image_stereo(VALUE, VALUE);
976
908
  extern VALUE Image_store_pixels(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
977
909
  extern VALUE Image_strip_bang(VALUE);
978
910
  extern VALUE Image_swirl(VALUE, VALUE);
911
+ extern VALUE Image_sync_profiles(VALUE);
979
912
  extern VALUE Image_texture_flood_fill(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
980
913
  extern VALUE Image_threshold(VALUE, VALUE);
981
914
  extern VALUE Image_thumbnail(int, VALUE *, VALUE);
@@ -988,8 +921,8 @@ extern VALUE Image_transpose(VALUE);
988
921
  extern VALUE Image_transpose_bang(VALUE);
989
922
  extern VALUE Image_transverse(VALUE);
990
923
  extern VALUE Image_transverse_bang(VALUE);
991
- extern VALUE Image_trim(VALUE);
992
- extern VALUE Image_trim_bang(VALUE);
924
+ extern VALUE Image_trim(int, VALUE *, VALUE);
925
+ extern VALUE Image_trim_bang(int, VALUE *, VALUE);
993
926
  extern VALUE Image_unique_colors(VALUE);
994
927
  extern VALUE Image_unsharp_mask(int, VALUE *, VALUE);
995
928
  extern VALUE Image_unsharp_mask_channel(int, VALUE *, VALUE);
@@ -1001,24 +934,16 @@ extern VALUE Image_white_threshold(int, VALUE *, VALUE);
1001
934
  extern VALUE Image_write(VALUE, VALUE);
1002
935
 
1003
936
  extern VALUE rm_image_new(Image *);
937
+ extern void rm_image_destroy(void *);
938
+ extern void rm_trace_creation(Image *);
1004
939
 
1005
940
 
1006
941
  // rmfill.c
1007
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1008
942
  extern VALUE GradientFill_alloc(VALUE);
1009
- #else
1010
- extern VALUE GradientFill_new(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
1011
- #endif
1012
-
1013
943
  extern VALUE GradientFill_initialize(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE);
1014
944
  extern VALUE GradientFill_fill(VALUE, VALUE);
1015
945
 
1016
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1017
946
  extern VALUE TextureFill_alloc(VALUE);
1018
- #else
1019
- extern VALUE TextureFill_new(VALUE, VALUE);
1020
- #endif
1021
-
1022
947
  extern VALUE TextureFill_initialize(VALUE, VALUE);
1023
948
  extern VALUE TextureFill_fill(VALUE, VALUE);
1024
949
 
@@ -1036,17 +961,15 @@ extern VALUE CompressionType_new(CompressionType);
1036
961
  extern VALUE DisposeType_new(DisposeType);
1037
962
  extern VALUE EndianType_new(EndianType);
1038
963
  extern VALUE FilterTypes_new(FilterTypes);
964
+ extern VALUE GravityType_new(GravityType);
1039
965
  extern VALUE Font_to_s(VALUE);
1040
966
  extern VALUE ImageList_cur_image(VALUE);
1041
967
  extern VALUE ImageMagickError_initialize(int, VALUE *, VALUE);
1042
968
  extern VALUE ImageType_new(ImageType);
1043
969
  extern VALUE InterlaceType_new(InterlaceType);
1044
970
 
1045
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1046
971
  extern VALUE Pixel_alloc(VALUE);
1047
- #else
1048
- extern VALUE Pixel_new(int, VALUE *, VALUE);
1049
- #endif
972
+
1050
973
  ATTR_ACCESSOR(Pixel, red)
1051
974
  ATTR_ACCESSOR(Pixel, green)
1052
975
  ATTR_ACCESSOR(Pixel, blue)
@@ -1087,12 +1010,8 @@ extern VALUE Segment_from_SegmentInfo(SegmentInfo *);
1087
1010
  extern void AffineMatrix_to_AffineMatrix(AffineMatrix *, VALUE);
1088
1011
  extern void ChromaticityInfo_to_ChromaticityInfo(ChromaticityInfo *, VALUE);
1089
1012
  extern void Color_to_ColorInfo(ColorInfo *, VALUE);
1090
- #if defined(HAVE_INTERPOLATEPIXELCOLOR)
1091
1013
  extern VALUE InterpolatePixelMethod_new(InterpolatePixelMethod);
1092
- #endif
1093
- #if defined(HAVE_IMAGE_ORIENTATION)
1094
1014
  extern VALUE OrientationType_new(OrientationType);
1095
- #endif
1096
1015
  extern void PrimaryInfo_to_PrimaryInfo(PrimaryInfo *, VALUE);
1097
1016
  extern void Rectangle_to_RectangleInfo(RectangleInfo *, VALUE);
1098
1017
  extern void Segment_to_SegmentInfo(SegmentInfo *, VALUE);
@@ -1101,17 +1020,10 @@ extern void TypeMetric_to_TypeMetric(TypeMetric *, VALUE);
1101
1020
  extern VALUE Font_from_TypeInfo(TypeInfo *);
1102
1021
  extern VALUE TypeMetric_to_s(VALUE);
1103
1022
  extern VALUE TypeMetric_from_TypeMetric(TypeMetric *);
1104
- #if defined(HAVE_GETIMAGESTATISTICS)
1105
- extern VALUE Statistics_new(ImageStatistics *);
1106
- #endif
1107
1023
  extern const char *StorageType_name(StorageType);
1108
1024
  extern VALUE VirtualPixelMethod_new(VirtualPixelMethod);
1109
1025
 
1110
- #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1111
1026
  extern VALUE Enum_alloc(VALUE);
1112
- #else
1113
- extern VALUE Enum_new(VALUE, VALUE, VALUE);
1114
- #endif
1115
1027
  extern VALUE Enum_initialize(VALUE, VALUE, VALUE);
1116
1028
  extern VALUE Enum_to_s(VALUE);
1117
1029
  extern VALUE Enum_to_i(VALUE);
@@ -1122,8 +1034,10 @@ extern VALUE Enum_type_each(VALUE);
1122
1034
 
1123
1035
 
1124
1036
  extern void *magick_malloc(const size_t);
1037
+ extern void *magick_safe_malloc(const size_t, const size_t);
1125
1038
  extern void magick_free(void *);
1126
1039
  extern void *magick_realloc(void *, size_t);
1040
+ extern void *magick_safe_realloc(void *, const size_t, const size_t);
1127
1041
  extern void magick_clone_string(char **, const char *);
1128
1042
  extern VALUE rm_enum_new(VALUE, VALUE, VALUE);
1129
1043
  extern VALUE rm_no_freeze(VALUE);
@@ -1134,9 +1048,11 @@ extern char *rm_string_value_ptr_len(volatile VALUE *, long *);
1134
1048
  extern int rm_strcasecmp(const char *, const char *);
1135
1049
  extern int rm_strncasecmp(const char *, const char *, size_t);
1136
1050
  extern void rm_check_ary_len(VALUE, long);
1137
- extern void rm_check_frozen(VALUE);
1051
+ extern Image *rm_check_destroyed(VALUE);
1052
+ extern Image *rm_check_frozen_image(VALUE);
1138
1053
  extern int rm_check_num2dbl(VALUE);
1139
1054
  extern double rm_fuzz_to_dbl(VALUE);
1055
+ extern Quantum rm_app2quantum(VALUE);
1140
1056
  extern double rm_percentage(VALUE);
1141
1057
  extern double rm_str_to_pct(VALUE);
1142
1058
  extern VALUE rm_define_enum_type(char *);
@@ -1146,7 +1062,7 @@ extern void rm_not_implemented(void);
1146
1062
  extern void rm_attr_write(VALUE, VALUE);
1147
1063
  extern void rm_get_geometry(VALUE, long *, long *, unsigned long *, unsigned long *, int *);
1148
1064
  extern const char *rm_get_property(const Image *, const char *);
1149
- extern unsigned int rm_set_property(Image *, const char *, const char *);
1065
+ extern MagickBooleanType rm_set_property(Image *, const char *, const char *);
1150
1066
  extern void rm_split(Image *);
1151
1067
  extern void rm_magick_error(const char *, const char *);
1152
1068
 
@@ -1160,9 +1076,7 @@ extern void rm_check_image_exception(Image *, ErrorRetention);
1160
1076
  extern void rm_check_exception(ExceptionInfo *, Image *, ErrorRetention);
1161
1077
  extern void rm_ensure_result(Image *);
1162
1078
  extern Image *rm_clone_image(Image *);
1163
- #if defined(HAVE_SETIMAGEPROGRESSMONITOR)
1164
1079
  extern MagickBooleanType rm_progress_monitor(const char *, const MagickOffsetType, const MagickSizeType, void *);
1165
- #endif
1166
1080
  extern VALUE rm_exif_by_entry(Image *);
1167
1081
  extern VALUE rm_exif_by_number(Image *);
1168
1082