rmagick 1.11.0 → 1.11.1

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.

data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ RMagick 1.11.1
2
+ o Fix bug #4511, add Makefile, rmagick_config.h as dependencies
3
+ in the Makefile (bug report from Eric Hodel)
4
+ o Ensure ExceptionInfo structures are freed
5
+
1
6
  RMagick 1.11.0
2
7
  o Feature #3705, add resize_to_fit (thanks to Robert Manni for the code)
3
8
  o Added optimize_layers method to the ImageList class (available with
data/README.html CHANGED
@@ -1,14 +1,14 @@
1
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
2
  <html>
3
3
  <head>
4
- <title>RMagick 1.11.0 README</title>
4
+ <title>RMagick 1.11.1 README</title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6
6
  <meta name="GENERATOR" content="BlueCloth">
7
7
  </head>
8
8
  <body>
9
- <h1>RMagick 1.11.0 README</h1>
9
+ <h1>RMagick 1.11.1 README</h1>
10
10
 
11
- <h2>05/11/06</h2>
11
+ <h2>05/28/06</h2>
12
12
 
13
13
  <h2>Table Of Contents</h2>
14
14
 
@@ -42,7 +42,7 @@ ImageMagick and GraphicsMagick image processing libraries.</p>
42
42
 
43
43
  <p><strong>Author:</strong> Tim Hunter</p>
44
44
 
45
- <p><strong>Email:</strong> <a href="&#109;&#097;&#105;&#108;&#x74;&#x6F;:&#x72;&#x6D;&#x61;&#103;&#105;&#x63;&#x6B;&#x40;r&#x75;&#098;&#x79;&#102;&#111;&#x72;&#x67;&#101;&#046;&#x6F;&#114;&#103;">&#x72;&#x6D;&#x61;&#103;&#105;&#x63;&#x6B;&#x40;r&#x75;&#098;&#x79;&#102;&#111;&#x72;&#x67;&#101;&#046;&#x6F;&#114;&#103;</a></p>
45
+ <p><strong>Email:</strong> <a href="&#109;&#097;&#x69;&#108;&#x74;&#111;:&#114;&#x6D;&#x61;&#x67;&#105;&#099;&#107;&#064;&#x72;&#x75;&#098;&#x79;&#x66;&#x6F;r&#x67;e&#046;&#x6F;&#x72;&#x67;">&#114;&#x6D;&#x61;&#x67;&#105;&#099;&#107;&#064;&#x72;&#x75;&#098;&#x79;&#x66;&#x6F;r&#x67;e&#046;&#x6F;&#x72;&#x67;</a></p>
46
46
 
47
47
  <p><strong>RubyForge:</strong> <a href="http://rubyforge.org/projects/rmagick/">http://rubyforge.org/projects/rmagick/</a></p>
48
48
 
@@ -225,7 +225,7 @@ addition to the regular options, there are a few RMagick-specific options:</p>
225
225
 
226
226
  <h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
227
227
 
228
- <p>De-compress the RMagick-1.11.0.tar.gz archive and enter the top
228
+ <p>De-compress the RMagick-1.11.1.tar.gz archive and enter the top
229
229
  directory. Then type:</p>
230
230
 
231
231
  <pre><code>$ ./configure &lt;configuration options&gt;
@@ -246,9 +246,9 @@ $ make clean
246
246
 
247
247
  <p>When make is running the examples, if you get a message like this:</p>
248
248
 
249
- <pre><code>/home/you/RMagick-1.11.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
249
+ <pre><code>/home/you/RMagick-1.11.1/lib/RMagick.rb:11:in `require': libMagick.so.0:
250
250
  cannot open shared object file: No such file or directory -
251
- /home/you/RMagick-1.11.0/ext/RMagick/RMagick.so (LoadError)
251
+ /home/you/RMagick-1.11.1/ext/RMagick/RMagick.so (LoadError)
252
252
  </code></pre>
253
253
 
254
254
  <p>you probably do not have the directory in which the ImageMagick or GraphicsMagick
@@ -268,7 +268,7 @@ systems, see the documentation for the dynamic loading facility.</p>
268
268
 
269
269
  <p>When make is running the examples, if you get a message like this:</p>
270
270
 
271
- <pre><code>hook /home/me/src/RMagick-1.11.0/./post-setup.rb failed:
271
+ <pre><code>hook /home/me/src/RMagick-1.11.1/./post-setup.rb failed:
272
272
  No such file or directory - "/tmp/rmagick6872.6"
273
273
  </code></pre>
274
274
 
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
- RMagick 1.11.0 README
1
+ RMagick 1.11.1 README
2
2
  ================================
3
- 05/11/06
3
+ 05/28/06
4
4
  --------
5
5
 
6
6
  Table Of Contents
@@ -193,7 +193,7 @@ addition to the regular options, there are a few RMagick-specific options:
193
193
 
194
194
  <h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
195
195
 
196
- De-compress the RMagick-1.11.0.tar.gz archive and enter the top
196
+ De-compress the RMagick-1.11.1.tar.gz archive and enter the top
197
197
  directory. Then type:
198
198
 
199
199
  $ ./configure <configuration options>
@@ -211,9 +211,9 @@ The message can also refer to "libGraphicsMagick". Typically this message means
211
211
  #### Cannot open shared object file
212
212
  When make is running the examples, if you get a message like this:
213
213
 
214
- /home/you/RMagick-1.11.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
214
+ /home/you/RMagick-1.11.1/lib/RMagick.rb:11:in `require': libMagick.so.0:
215
215
  cannot open shared object file: No such file or directory -
216
- /home/you/RMagick-1.11.0/ext/RMagick/RMagick.so (LoadError)
216
+ /home/you/RMagick-1.11.1/ext/RMagick/RMagick.so (LoadError)
217
217
 
218
218
  you probably do not have the directory in which the ImageMagick or GraphicsMagick
219
219
  library is installed in your load path. An easy way to fix this is to define the
@@ -230,7 +230,7 @@ systems, see the documentation for the dynamic loading facility.
230
230
  #### No such file or directory - "/tmp/rmagick6872.6"
231
231
  When make is running the examples, if you get a message like this:
232
232
 
233
- hook /home/me/src/RMagick-1.11.0/./post-setup.rb failed:
233
+ hook /home/me/src/RMagick-1.11.1/./post-setup.rb failed:
234
234
  No such file or directory - "/tmp/rmagick6872.6"
235
235
 
236
236
  you probably do not have a temporary directory environment variable set. Set
data/configure CHANGED
@@ -1,6 +1,6 @@
1
1
  #! /bin/sh
2
2
  # Guess values for system-dependent variables and create Makefiles.
3
- # Generated by GNU Autoconf 2.59 for RMagick 1.11.0.
3
+ # Generated by GNU Autoconf 2.59 for RMagick 1.11.1.
4
4
  #
5
5
  # Report bugs to <rmagick@rubyforge.org>.
6
6
  #
@@ -268,9 +268,9 @@ SHELL=${CONFIG_SHELL-/bin/sh}
268
268
 
269
269
  # Identity of this package.
270
270
  PACKAGE_NAME='RMagick'
271
- PACKAGE_TARNAME='RMagick-1.11.0.tar.gz'
272
- PACKAGE_VERSION='1.11.0'
273
- PACKAGE_STRING='RMagick 1.11.0'
271
+ PACKAGE_TARNAME='RMagick-1.11.1.tar.gz'
272
+ PACKAGE_VERSION='1.11.1'
273
+ PACKAGE_STRING='RMagick 1.11.1'
274
274
  PACKAGE_BUGREPORT='rmagick@rubyforge.org'
275
275
 
276
276
  # Factoring default headers for most tests.
@@ -779,7 +779,7 @@ if test "$ac_init_help" = "long"; then
779
779
  # Omit some internal or obsolete options to make the list less imposing.
780
780
  # This message is too long to be a string in the A/UX 3.1 sh.
781
781
  cat <<_ACEOF
782
- \`configure' configures RMagick 1.11.0 to adapt to many kinds of systems.
782
+ \`configure' configures RMagick 1.11.1 to adapt to many kinds of systems.
783
783
 
784
784
  Usage: $0 [OPTION]... [VAR=VALUE]...
785
785
 
@@ -836,7 +836,7 @@ fi
836
836
 
837
837
  if test -n "$ac_init_help"; then
838
838
  case $ac_init_help in
839
- short | recursive ) echo "Configuration of RMagick 1.11.0:";;
839
+ short | recursive ) echo "Configuration of RMagick 1.11.1:";;
840
840
  esac
841
841
  cat <<\_ACEOF
842
842
 
@@ -983,7 +983,7 @@ fi
983
983
  test -n "$ac_init_help" && exit 0
984
984
  if $ac_init_version; then
985
985
  cat <<\_ACEOF
986
- RMagick configure 1.11.0
986
+ RMagick configure 1.11.1
987
987
  generated by GNU Autoconf 2.59
988
988
 
989
989
  Copyright (C) 2003 Free Software Foundation, Inc.
@@ -997,7 +997,7 @@ cat >&5 <<_ACEOF
997
997
  This file contains any messages produced by compilers while
998
998
  running configure, to aid debugging if configure makes a mistake.
999
999
 
1000
- It was created by RMagick $as_me 1.11.0, which was
1000
+ It was created by RMagick $as_me 1.11.1, which was
1001
1001
  generated by GNU Autoconf 2.59. Invocation command line was
1002
1002
 
1003
1003
  $ $0 $@
@@ -9308,7 +9308,7 @@ _ASBOX
9308
9308
  } >&5
9309
9309
  cat >&5 <<_CSEOF
9310
9310
 
9311
- This file was extended by RMagick $as_me 1.11.0, which was
9311
+ This file was extended by RMagick $as_me 1.11.1, which was
9312
9312
  generated by GNU Autoconf 2.59. Invocation command line was
9313
9313
 
9314
9314
  CONFIG_FILES = $CONFIG_FILES
@@ -9368,7 +9368,7 @@ _ACEOF
9368
9368
 
9369
9369
  cat >>$CONFIG_STATUS <<_ACEOF
9370
9370
  ac_cs_version="\\
9371
- RMagick config.status 1.11.0
9371
+ RMagick config.status 1.11.1
9372
9372
  configured by $0, generated by GNU Autoconf 2.59,
9373
9373
  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
9374
9374
 
data/configure.ac CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  # RMagick configure.ac
3
3
 
4
- AC_INIT(RMagick, 1.11.0, rmagick@rubyforge.org, RMagick-1.11.0.tar.gz)
4
+ AC_INIT(RMagick, 1.11.1, rmagick@rubyforge.org, RMagick-1.11.1.tar.gz)
5
5
  echo "Configuring ${PACKAGE_STRING}"
6
6
 
7
7
  AC_CONFIG_HEADER([ext/RMagick/rmagick_config.h])
data/ext/RMagick/MANIFEST CHANGED
@@ -1,4 +1,4 @@
1
- MANIFEST for RMagick-1.11.0 - 17:57:50 05/11/06
1
+ MANIFEST for RMagick-1.11.1 - 18:58:06 05/28/06
2
2
 
3
3
  configure
4
4
  README.html
@@ -17,5 +17,9 @@ end
17
17
 
18
18
  $LOCAL_LIBS = "@LOCAL_LIBS@"
19
19
 
20
+ # Force re-compilation if the generated Makefile or
21
+ # rmagick_config.h changed.
22
+ $config_h = 'Makefile rmagick_config.h'
23
+
20
24
  create_makefile("RMagick")
21
25
 
@@ -1,4 +1,4 @@
1
- /* $Id: rmilist.c,v 1.39 2006/05/08 22:45:27 rmagick Exp $ */
1
+ /* $Id: rmilist.c,v 1.40 2006/05/27 21:05:59 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmilist.c
@@ -77,6 +77,8 @@ ImageList_append(VALUE self, VALUE stack_arg)
77
77
  new_image = AppendImages(images, stack, &exception);
78
78
  rm_split(images);
79
79
  rm_check_exception(&exception, new_image, DestroyOnError);
80
+ DestroyExceptionInfo(&exception);
81
+
80
82
  rm_ensure_result(new_image);
81
83
 
82
84
  return rm_image_new(new_image);
@@ -100,6 +102,8 @@ ImageList_average(VALUE self)
100
102
  new_image = AverageImages(images, &exception);
101
103
  rm_split(images);
102
104
  rm_check_exception(&exception, new_image, DestroyOnError);
105
+ DestroyExceptionInfo(&exception);
106
+
103
107
  rm_ensure_result(new_image);
104
108
 
105
109
  return rm_image_new(new_image);
@@ -126,6 +130,8 @@ ImageList_coalesce(VALUE self)
126
130
  new_images = CoalesceImages(images, &exception);
127
131
  rm_split(images);
128
132
  rm_check_exception(&exception, new_images, DestroyOnError);
133
+ DestroyExceptionInfo(&exception);
134
+
129
135
  rm_ensure_result(new_images);
130
136
 
131
137
  return rm_imagelist_from_images(new_images);
@@ -150,6 +156,8 @@ ImageList_deconstruct(VALUE self)
150
156
  new_images = DeconstructImages(images, &exception);
151
157
  rm_split(images);
152
158
  rm_check_exception(&exception, new_images, DestroyOnError);
159
+ DestroyExceptionInfo(&exception);
160
+
153
161
  rm_ensure_result(new_images);
154
162
 
155
163
  return rm_imagelist_from_images(new_images);
@@ -197,6 +205,8 @@ ImageList_flatten_images(VALUE self)
197
205
  new_image = FlattenImages(images, &exception);
198
206
  rm_split(images);
199
207
  rm_check_exception(&exception, new_image, DestroyOnError);
208
+ DestroyExceptionInfo(&exception);
209
+
200
210
  rm_ensure_result(new_image);
201
211
 
202
212
  return rm_image_new(new_image);
@@ -233,6 +243,8 @@ ImageList_map(VALUE self, VALUE map_image, VALUE dither_arg)
233
243
  new_images = CloneImageList(images, &exception);
234
244
  rm_split(images);
235
245
  rm_check_exception(&exception, new_images, DestroyOnError);
246
+ DestroyExceptionInfo(&exception);
247
+
236
248
  rm_ensure_result(new_images);
237
249
 
238
250
  // Call ImageMagick
@@ -291,6 +303,8 @@ ImageList_montage(VALUE self)
291
303
  new_images = MontageImages(images, montage->info, &exception);
292
304
  rm_split(images);
293
305
  rm_check_exception(&exception, new_images, DestroyOnError);
306
+ DestroyExceptionInfo(&exception);
307
+
294
308
  rm_ensure_result(new_images);
295
309
 
296
310
  return rm_imagelist_from_images(new_images);
@@ -328,6 +342,8 @@ ImageList_morph(VALUE self, VALUE nimages)
328
342
  new_images = MorphImages(images, (unsigned long)number_images, &exception);
329
343
  rm_split(images);
330
344
  rm_check_exception(&exception, new_images, DestroyOnError);
345
+ DestroyExceptionInfo(&exception);
346
+
331
347
  rm_ensure_result(new_images);
332
348
 
333
349
  return rm_imagelist_from_images(new_images);
@@ -349,6 +365,8 @@ ImageList_mosaic(VALUE self)
349
365
  new_image = MosaicImages(images, &exception);
350
366
  rm_split(images);
351
367
  rm_check_exception(&exception, new_image, DestroyOnError);
368
+ DestroyExceptionInfo(&exception);
369
+
352
370
  rm_ensure_result(new_image);
353
371
 
354
372
  return rm_image_new(new_image);
@@ -395,6 +413,8 @@ ImageList_optimize_layers(VALUE self, VALUE method)
395
413
 
396
414
  rm_split(images);
397
415
  rm_check_exception(&exception, new_images, DestroyOnError);
416
+ DestroyExceptionInfo(&exception);
417
+
398
418
  rm_ensure_result(new_images);
399
419
 
400
420
  return rm_imagelist_from_images(new_images);
@@ -563,6 +583,8 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
563
583
  new_images = CloneImageList(images, &exception);
564
584
  rm_split(images);
565
585
  rm_check_exception(&exception, new_images, DestroyOnError);
586
+ DestroyExceptionInfo(&exception);
587
+
566
588
  rm_ensure_result(new_images);
567
589
 
568
590
 
@@ -624,7 +646,6 @@ ImageList_to_blob(VALUE self)
624
646
  // can happen is that there's only one image or the format
625
647
  // doesn't support multi-image files.
626
648
  info->adjoin = True;
627
- GetExceptionInfo(&exception);
628
649
  #if defined(HAVE_IMAGESTOBLOB)
629
650
  blob = ImagesToBlob(info, images, &length, &exception);
630
651
  #else
@@ -636,6 +657,8 @@ ImageList_to_blob(VALUE self)
636
657
  }
637
658
  rm_split(images);
638
659
  CHECK_EXCEPTION()
660
+ DestroyExceptionInfo(&exception);
661
+
639
662
 
640
663
  if (length == 0 || !blob)
641
664
  {
@@ -722,6 +745,7 @@ ImageList_write(VALUE self, VALUE file)
722
745
  // Find out if the format supports multi-images files.
723
746
  m = GetMagickInfo(info->magick, &exception);
724
747
  CHECK_EXCEPTION()
748
+ DestroyExceptionInfo(&exception);
725
749
 
726
750
  // Tell WriteImage if we want a multi-images file.
727
751
  if (rm_imagelist_length(self) > 1 && m->adjoin)
@@ -1,4 +1,4 @@
1
- /* $Id: rmimage.c,v 1.145 2006/05/07 21:41:12 rmagick Exp $ */
1
+ /* $Id: rmimage.c,v 1.146 2006/05/27 21:05:59 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2006 by Timothy P. Hunter
4
4
  | Name: rmimage.c
@@ -70,6 +70,9 @@ Image_adaptive_threshold(int argc, VALUE *argv, VALUE self)
70
70
  GetExceptionInfo(&exception);
71
71
  new_image = AdaptiveThresholdImage(image, width, height, offset, &exception);
72
72
  rm_check_exception(&exception, new_image, DestroyOnError);
73
+
74
+ DestroyExceptionInfo(&exception);
75
+
73
76
  rm_ensure_result(new_image);
74
77
 
75
78
  return rm_image_new(new_image);
@@ -94,6 +97,9 @@ Image_add_noise(VALUE self, VALUE noise)
94
97
  GetExceptionInfo(&exception);
95
98
  new_image = AddNoiseImage(image, noise_type, &exception);
96
99
  rm_check_exception(&exception, new_image, DestroyOnError);
100
+
101
+ DestroyExceptionInfo(&exception);
102
+
97
103
  rm_ensure_result(new_image);
98
104
 
99
105
  return rm_image_new(new_image);
@@ -133,6 +139,9 @@ Image_add_noise_channel(int argc, VALUE *argv, VALUE self)
133
139
  GetExceptionInfo(&exception);
134
140
  new_image = AddNoiseImageChannel(image, channels, noise_type, &exception);
135
141
  rm_check_exception(&exception, new_image, DestroyOnError);
142
+
143
+ DestroyExceptionInfo(&exception);
144
+
136
145
  rm_ensure_result(new_image);
137
146
 
138
147
  return rm_image_new(new_image);
@@ -163,6 +172,9 @@ Image_affine_transform(VALUE self, VALUE affine)
163
172
  GetExceptionInfo(&exception);
164
173
  new_image = AffineTransformImage(image, &matrix, &exception);
165
174
  rm_check_exception(&exception, new_image, DestroyOnError);
175
+
176
+ DestroyExceptionInfo(&exception);
177
+
166
178
  rm_ensure_result(new_image);
167
179
 
168
180
  return rm_image_new(new_image);
@@ -449,6 +461,9 @@ Image_blur_channel(int argc, VALUE *argv, VALUE self)
449
461
  GetExceptionInfo(&exception);
450
462
  new_image = BlurImageChannel(image, channels, radius, sigma, &exception);
451
463
  rm_check_exception(&exception, new_image, DestroyOnError);
464
+
465
+ DestroyExceptionInfo(&exception);
466
+
452
467
  rm_ensure_result(new_image);
453
468
 
454
469
  return rm_image_new(new_image);
@@ -501,6 +516,9 @@ static VALUE border(
501
516
  GetExceptionInfo(&exception);
502
517
  new_image = BorderImage(image, &rect, &exception);
503
518
  rm_check_exception(&exception, new_image, DestroyOnError);
519
+
520
+ DestroyExceptionInfo(&exception);
521
+
504
522
  rm_ensure_result(new_image);
505
523
 
506
524
  if (bang)
@@ -582,6 +600,8 @@ VALUE Image_bounding_box(VALUE self)
582
600
  box = GetImageBoundingBox(image, &exception);
583
601
  CHECK_EXCEPTION()
584
602
 
603
+ DestroyExceptionInfo(&exception);
604
+
585
605
  return Rectangle_from_RectangleInfo(&box);
586
606
  }
587
607
 
@@ -641,7 +661,6 @@ Image_capture(
641
661
  rm_check_image_exception(image, DestroyOnError);
642
662
  rm_ensure_result(image);
643
663
 
644
-
645
664
  return rm_image_new(image);
646
665
  #else
647
666
  rm_not_implemented();
@@ -786,6 +805,8 @@ Image_channel_depth(int argc, VALUE *argv, VALUE self)
786
805
  channel_depth = GetImageChannelDepth(image, channels, &exception);
787
806
  CHECK_EXCEPTION()
788
807
 
808
+ DestroyExceptionInfo(&exception);
809
+
789
810
  return ULONG2NUM(channel_depth);
790
811
  #else
791
812
  rm_not_implemented();
@@ -828,6 +849,8 @@ Image_channel_extrema(int argc, VALUE *argv, VALUE self)
828
849
  (void) GetImageChannelExtrema(image, channels, &min, &max, &exception);
829
850
  CHECK_EXCEPTION()
830
851
 
852
+ DestroyExceptionInfo(&exception);
853
+
831
854
  ary = rb_ary_new2(2);
832
855
  rb_ary_store(ary, 0, ULONG2NUM(min));
833
856
  rb_ary_store(ary, 1, ULONG2NUM(max));
@@ -865,6 +888,7 @@ Image_channel_extrema(int argc, VALUE *argv, VALUE self)
865
888
  (void) GetImageStatistics(image, &stats, &exception);
866
889
  CHECK_EXCEPTION()
867
890
 
891
+ DestroyExceptionInfo(&exception);
868
892
 
869
893
  ary = rb_ary_new2(2);
870
894
  switch(channel)
@@ -933,6 +957,8 @@ Image_channel_mean(int argc, VALUE *argv, VALUE self)
933
957
  (void) GetImageChannelMean(image, channels, &mean, &stddev, &exception);
934
958
  CHECK_EXCEPTION()
935
959
 
960
+ DestroyExceptionInfo(&exception);
961
+
936
962
  ary = rb_ary_new2(2);
937
963
  rb_ary_store(ary, 0, rb_float_new(mean));
938
964
  rb_ary_store(ary, 1, rb_float_new(stddev));
@@ -970,6 +996,8 @@ Image_channel_mean(int argc, VALUE *argv, VALUE self)
970
996
  (void) GetImageStatistics(image, &stats, &exception);
971
997
  CHECK_EXCEPTION()
972
998
 
999
+ DestroyExceptionInfo(&exception);
1000
+
973
1001
  ary = rb_ary_new2(2);
974
1002
  switch(channel)
975
1003
  {
@@ -1159,6 +1187,8 @@ Image_color_histogram(VALUE self)
1159
1187
  histogram = GetColorHistogram(image, &colors, &exception);
1160
1188
  CHECK_EXCEPTION()
1161
1189
 
1190
+ DestroyExceptionInfo(&exception);
1191
+
1162
1192
  hash = rb_hash_new();
1163
1193
  for (x = 0; x < colors; x++)
1164
1194
  {
@@ -1212,6 +1242,7 @@ Image_color_histogram(VALUE self)
1212
1242
  rm_check_exception(&exception, dc_copy, DestroyOnError);
1213
1243
  }
1214
1244
 
1245
+ DestroyExceptionInfo(&exception);
1215
1246
 
1216
1247
  hash = rb_hash_new();
1217
1248
  for (x = 0; x < colors; x++)
@@ -1519,6 +1550,9 @@ Image_colorize(
1519
1550
  GetExceptionInfo(&exception);
1520
1551
  new_image = ColorizeImage(image, opacity, target, &exception);
1521
1552
  rm_check_exception(&exception, new_image, DestroyOnError);
1553
+
1554
+ DestroyExceptionInfo(&exception);
1555
+
1522
1556
  rm_ensure_result(new_image);
1523
1557
 
1524
1558
  return rm_image_new(new_image);
@@ -1733,8 +1767,10 @@ VALUE Image_compare_channel(
1733
1767
  , &distortion
1734
1768
  , &exception);
1735
1769
  rm_check_exception(&exception, difference_image, DestroyOnError);
1736
- rm_ensure_result(difference_image);
1737
1770
 
1771
+ DestroyExceptionInfo(&exception);
1772
+
1773
+ rm_ensure_result(difference_image);
1738
1774
 
1739
1775
  ary = rb_ary_new2(2);
1740
1776
  rb_ary_store(ary, 0, rm_image_new(difference_image));
@@ -2134,6 +2170,7 @@ Image_constitute(VALUE class, VALUE width_arg, VALUE height_arg
2134
2170
  rm_check_exception(&exception, image, DestroyOnError);
2135
2171
  #endif
2136
2172
 
2173
+ DestroyExceptionInfo(&exception);
2137
2174
  DestroyConstitute();
2138
2175
 
2139
2176
  xfree((void *)pixels.v);
@@ -2270,11 +2307,12 @@ Image_convolve(
2270
2307
  Data_Get_Struct(self, Image, image);
2271
2308
 
2272
2309
  order = NUM2UINT(order_arg);
2273
- kernel = (volatile double *)ALLOC_N(double, order*order);
2274
2310
 
2275
2311
  rm_check_ary_len(kernel_arg, order*order);
2276
2312
 
2277
2313
  // Convert the kernel array argument to an array of doubles
2314
+
2315
+ kernel = (volatile double *)ALLOC_N(double, order*order);
2278
2316
  for (x = 0; x < order*order; x++)
2279
2317
  {
2280
2318
  kernel[x] = NUM2DBL(rb_ary_entry(kernel_arg, x));
@@ -2285,6 +2323,9 @@ Image_convolve(
2285
2323
  new_image = ConvolveImage(image, order, (double *)kernel, &exception);
2286
2324
  xfree((double *)kernel);
2287
2325
  rm_check_exception(&exception, new_image, DestroyOnError);
2326
+
2327
+ DestroyExceptionInfo(&exception);
2328
+
2288
2329
  rm_ensure_result(new_image);
2289
2330
 
2290
2331
  return rm_image_new(new_image);
@@ -2341,6 +2382,9 @@ Image_convolve_channel(
2341
2382
  new_image = ConvolveImageChannel(image, channels, order, (double *)kernel, &exception);
2342
2383
  xfree((double *)kernel);
2343
2384
  rm_check_exception(&exception, new_image, DestroyOnError);
2385
+
2386
+ DestroyExceptionInfo(&exception);
2387
+
2344
2388
  rm_ensure_result(new_image);
2345
2389
 
2346
2390
  return rm_image_new(new_image);
@@ -2405,11 +2449,9 @@ VALUE
2405
2449
  Image_cycle_colormap(VALUE self, VALUE amount)
2406
2450
  {
2407
2451
  Image *image, *new_image;
2408
- ExceptionInfo exception;
2409
2452
  int amt;
2410
2453
 
2411
2454
  Data_Get_Struct(self, Image, image);
2412
- GetExceptionInfo(&exception);
2413
2455
 
2414
2456
  new_image = rm_clone_image(image);
2415
2457
  amt = NUM2INT(amount);
@@ -2524,6 +2566,8 @@ Image_depth(VALUE self)
2524
2566
  depth = GetImageDepth(image, &exception);
2525
2567
  CHECK_EXCEPTION()
2526
2568
 
2569
+ DestroyExceptionInfo(&exception);
2570
+
2527
2571
  return INT2FIX(depth);
2528
2572
  }
2529
2573
 
@@ -2548,6 +2592,9 @@ Image_despeckle(VALUE self)
2548
2592
 
2549
2593
  new_image = DespeckleImage(image, &exception);
2550
2594
  rm_check_exception(&exception, new_image, DestroyOnError);
2595
+
2596
+ DestroyExceptionInfo(&exception);
2597
+
2551
2598
  rm_ensure_result(new_image);
2552
2599
 
2553
2600
  return rm_image_new(new_image);
@@ -2659,6 +2706,8 @@ Image_dispatch(int argc, VALUE *argv, VALUE self)
2659
2706
 
2660
2707
  CHECK_EXCEPTION()
2661
2708
 
2709
+ DestroyExceptionInfo(&exception);
2710
+
2662
2711
  // Convert the pixel data to the appropriate Ruby type
2663
2712
  if (stg_type == FIX_STG_TYPE)
2664
2713
  {
@@ -2767,6 +2816,8 @@ Image_distortion_channel(int argc, VALUE *argv, VALUE self)
2767
2816
  , metric, &distortion, &exception);
2768
2817
  CHECK_EXCEPTION()
2769
2818
 
2819
+ DestroyExceptionInfo(&exception);
2820
+
2770
2821
  return rb_float_new(distortion);
2771
2822
  #else
2772
2823
  rm_not_implemented();
@@ -2807,6 +2858,8 @@ Image__dump(VALUE self, VALUE depth)
2807
2858
 
2808
2859
  CHECK_EXCEPTION()
2809
2860
 
2861
+ DestroyExceptionInfo(&exception);
2862
+
2810
2863
  if (!blob)
2811
2864
  {
2812
2865
  rb_raise(rb_eNoMemError, "not enough memory to continue");
@@ -2921,6 +2974,9 @@ Image_edge(int argc, VALUE *argv, VALUE self)
2921
2974
 
2922
2975
  new_image = EdgeImage(image, radius, &exception);
2923
2976
  rm_check_exception(&exception, new_image, DestroyOnError);
2977
+
2978
+ DestroyExceptionInfo(&exception);
2979
+
2924
2980
  rm_ensure_result(new_image);
2925
2981
 
2926
2982
  return rm_image_new(new_image);
@@ -2963,6 +3019,9 @@ effect_image(
2963
3019
  GetExceptionInfo(&exception);
2964
3020
  new_image = (effector)(image, radius, sigma, &exception);
2965
3021
  rm_check_exception(&exception, new_image, DestroyOnError);
3022
+
3023
+ DestroyExceptionInfo(&exception);
3024
+
2966
3025
  rm_ensure_result(new_image);
2967
3026
 
2968
3027
  return rm_image_new(new_image);
@@ -3025,6 +3084,9 @@ Image_enhance(VALUE self)
3025
3084
 
3026
3085
  new_image = EnhanceImage(image, &exception);
3027
3086
  rm_check_exception(&exception, new_image, DestroyOnError);
3087
+
3088
+ DestroyExceptionInfo(&exception);
3089
+
3028
3090
  rm_ensure_result(new_image);
3029
3091
 
3030
3092
  return rm_image_new(new_image);
@@ -3047,6 +3109,8 @@ Image_equalize(VALUE self)
3047
3109
  (void) EqualizeImage(new_image);
3048
3110
  rm_check_image_exception(new_image, DestroyOnError);
3049
3111
 
3112
+ DestroyExceptionInfo(&exception);
3113
+
3050
3114
  return rm_image_new(new_image);
3051
3115
  }
3052
3116
 
@@ -3139,10 +3203,13 @@ Image_export_pixels(int argc, VALUE *argv, VALUE self)
3139
3203
  {
3140
3204
  xfree((unsigned int *)pixels);
3141
3205
  CHECK_EXCEPTION()
3206
+
3142
3207
  // Should never get here...
3143
3208
  rb_raise(rb_eStandardError, "ExportImagePixels failed with no explanation.");
3144
3209
  }
3145
3210
 
3211
+ DestroyExceptionInfo(&exception);
3212
+
3146
3213
  ary = rb_ary_new2(npixels);
3147
3214
  for (n = 0; n < npixels; n++)
3148
3215
  {
@@ -3260,10 +3327,13 @@ Image_export_pixels_to_str(int argc, VALUE *argv, VALUE self)
3260
3327
  // Let GC have the string buffer.
3261
3328
  rb_str_resize(string, 0);
3262
3329
  CHECK_EXCEPTION()
3330
+
3263
3331
  // Should never get here...
3264
3332
  rb_raise(rb_eStandardError, "ExportImagePixels failed with no explanation.");
3265
3333
  }
3266
3334
 
3335
+ DestroyExceptionInfo(&exception);
3336
+
3267
3337
  return string;
3268
3338
 
3269
3339
  #else
@@ -3368,6 +3438,9 @@ flipflop(int bang, VALUE self, flipper_t flipflopper)
3368
3438
 
3369
3439
  new_image = (flipflopper)(image, &exception);
3370
3440
  rm_check_exception(&exception, new_image, DestroyOnError);
3441
+
3442
+ DestroyExceptionInfo(&exception);
3443
+
3371
3444
  rm_ensure_result(new_image);
3372
3445
 
3373
3446
  if (bang)
@@ -3462,6 +3535,8 @@ Image_format_eq(VALUE self, VALUE magick)
3462
3535
  m = GetMagickInfo(mgk, &exception);
3463
3536
  CHECK_EXCEPTION()
3464
3537
 
3538
+ DestroyExceptionInfo(&exception);
3539
+
3465
3540
  if (!m)
3466
3541
  {
3467
3542
  rb_raise(rb_eArgError, "unknown format: %s", mgk);
@@ -3543,6 +3618,9 @@ Image_frame(int argc, VALUE *argv, VALUE self)
3543
3618
  GetExceptionInfo(&exception);
3544
3619
  new_image = FrameImage(image, &frame_info, &exception);
3545
3620
  rm_check_exception(&exception, new_image, DestroyOnError);
3621
+
3622
+ DestroyExceptionInfo(&exception);
3623
+
3546
3624
  rm_ensure_result(new_image);
3547
3625
 
3548
3626
  return rm_image_new(new_image);
@@ -3572,6 +3650,9 @@ Image_from_blob(VALUE class, VALUE blob_arg)
3572
3650
  GetExceptionInfo(&exception);
3573
3651
  images = BlobToImage(info, blob, (size_t)length, &exception);
3574
3652
  rm_check_exception(&exception, images, DestroyOnError);
3653
+
3654
+ DestroyExceptionInfo(&exception);
3655
+
3575
3656
  rm_ensure_result(images);
3576
3657
 
3577
3658
  return array_from_images(images);
@@ -3744,6 +3825,8 @@ Image_gaussian_blur_channel(int argc, VALUE *argv, VALUE self)
3744
3825
  new_image = GaussianBlurImageChannel(image, channels, radius, sigma, &exception);
3745
3826
  rm_check_exception(&exception, new_image, DestroyOnError);
3746
3827
 
3828
+ DestroyExceptionInfo(&exception);
3829
+
3747
3830
  return rm_image_new(new_image);
3748
3831
 
3749
3832
  #else
@@ -3832,6 +3915,8 @@ Image_get_pixels(
3832
3915
  pixels = (PixelPacket *)AcquireImagePixels(image, x, y, columns, rows, &exception);
3833
3916
  CHECK_EXCEPTION()
3834
3917
 
3918
+ DestroyExceptionInfo(&exception);
3919
+
3835
3920
  // If the function failed, return a 0-length array.
3836
3921
  if (!pixels)
3837
3922
  {
@@ -3872,6 +3957,8 @@ Image_get_one_pixel(VALUE self, VALUE x, VALUE y)
3872
3957
  pixel = AcquireOnePixel(image, NUM2LONG(x), NUM2LONG(y), &exception);
3873
3958
  CHECK_EXCEPTION()
3874
3959
 
3960
+ DestroyExceptionInfo(&exception);
3961
+
3875
3962
  return Pixel_from_PixelPacket(&pixel);
3876
3963
  }
3877
3964
  #endif
@@ -3894,6 +3981,8 @@ Image_gray_q(VALUE self)
3894
3981
  r = IsGrayImage(image, &exception);
3895
3982
  CHECK_EXCEPTION()
3896
3983
 
3984
+ DestroyExceptionInfo(&exception);
3985
+
3897
3986
  return r ? Qtrue : Qfalse;
3898
3987
  }
3899
3988
 
@@ -3963,6 +4052,8 @@ Image_implode(int argc, VALUE *argv, VALUE self)
3963
4052
 
3964
4053
  new_image = ImplodeImage(image, amount, &exception);
3965
4054
  rm_check_exception(&exception, new_image, DestroyOnError);
4055
+ DestroyExceptionInfo(&exception);
4056
+
3966
4057
  rm_ensure_result(new_image);
3967
4058
 
3968
4059
  return rm_image_new(new_image);
@@ -4635,6 +4726,9 @@ Image__load(VALUE class, VALUE str)
4635
4726
  DestroyImageInfo(info);
4636
4727
 
4637
4728
  rm_check_exception(&exception, image, DestroyOnError);
4729
+
4730
+ DestroyExceptionInfo(&exception);
4731
+
4638
4732
  rm_ensure_result(image);
4639
4733
 
4640
4734
  return rm_image_new(image);
@@ -4661,6 +4755,9 @@ magnify(int bang, VALUE self, magnifier_t magnifier)
4661
4755
 
4662
4756
  new_image = (magnifier)(image, &exception);
4663
4757
  rm_check_exception(&exception, new_image, DestroyOnError);
4758
+
4759
+ DestroyExceptionInfo(&exception);
4760
+
4664
4761
  rm_ensure_result(new_image);
4665
4762
 
4666
4763
  if (bang)
@@ -4836,6 +4933,9 @@ Image_median_filter(int argc, VALUE *argv, VALUE self)
4836
4933
 
4837
4934
  new_image = MedianFilterImage(image, radius, &exception);
4838
4935
  rm_check_exception(&exception, new_image, DestroyOnError);
4936
+
4937
+ DestroyExceptionInfo(&exception);
4938
+
4839
4939
  rm_ensure_result(new_image);
4840
4940
 
4841
4941
  return rm_image_new(new_image);
@@ -4990,6 +5090,8 @@ Image_monochrome_q(VALUE self)
4990
5090
  r = IsMonochromeImage(image, &exception);
4991
5091
  CHECK_EXCEPTION()
4992
5092
 
5093
+ DestroyExceptionInfo(&exception);
5094
+
4993
5095
  return r ? Qtrue : Qfalse;
4994
5096
  }
4995
5097
 
@@ -5053,6 +5155,9 @@ Image_motion_blur(
5053
5155
  GetExceptionInfo(&exception);
5054
5156
  new_image = MotionBlurImage(image, radius, sigma, angle, &exception);
5055
5157
  rm_check_exception(&exception, new_image, DestroyOnError);
5158
+
5159
+ DestroyExceptionInfo(&exception);
5160
+
5056
5161
  rm_ensure_result(new_image);
5057
5162
 
5058
5163
  return rm_image_new(new_image);
@@ -5385,6 +5490,8 @@ Image_number_colors(VALUE self)
5385
5490
  n = (unsigned long) GetNumberColors(image, NULL, &exception);
5386
5491
  CHECK_EXCEPTION()
5387
5492
 
5493
+ DestroyExceptionInfo(&exception);
5494
+
5388
5495
  return ULONG2NUM(n);
5389
5496
  }
5390
5497
 
@@ -5416,6 +5523,9 @@ Image_oil_paint(int argc, VALUE *argv, VALUE self)
5416
5523
 
5417
5524
  new_image = OilPaintImage(image, radius, &exception);
5418
5525
  rm_check_exception(&exception, new_image, DestroyOnError);
5526
+
5527
+ DestroyExceptionInfo(&exception);
5528
+
5419
5529
  rm_ensure_result(new_image);
5420
5530
 
5421
5531
  return rm_image_new(new_image);
@@ -5468,6 +5578,8 @@ Image_opaque_q(VALUE self)
5468
5578
  r = IsOpaqueImage(image, &exception);
5469
5579
  CHECK_EXCEPTION()
5470
5580
 
5581
+ DestroyExceptionInfo(&exception);
5582
+
5471
5583
  return r ? Qtrue : Qfalse;
5472
5584
  }
5473
5585
 
@@ -5522,6 +5634,8 @@ Image_ordered_dither(int argc, VALUE *argv, VALUE self)
5522
5634
  #endif
5523
5635
  rm_check_exception(&exception, new_image, DestroyOnError);
5524
5636
 
5637
+ DestroyExceptionInfo(&exception);
5638
+
5525
5639
  return rm_image_new(new_image);
5526
5640
  }
5527
5641
 
@@ -5590,6 +5704,8 @@ Image_palette_q(VALUE self)
5590
5704
  r = IsPaletteImage(image, &exception);
5591
5705
  CHECK_EXCEPTION()
5592
5706
 
5707
+ DestroyExceptionInfo(&exception);
5708
+
5593
5709
  return r ? Qtrue : Qfalse;
5594
5710
  }
5595
5711
 
@@ -5653,6 +5769,8 @@ Image_pixel_color(
5653
5769
  old_color = *AcquireImagePixels(image, x, y, 1, 1, &exception);
5654
5770
  CHECK_EXCEPTION()
5655
5771
 
5772
+ DestroyExceptionInfo(&exception);
5773
+
5656
5774
  // PseudoClass
5657
5775
  if (image->storage_class == PseudoClass)
5658
5776
  {
@@ -5805,6 +5923,9 @@ Image_preview(VALUE self, VALUE preview)
5805
5923
  Data_Get_Struct(self, Image, image);
5806
5924
  new_image = PreviewImage(image, preview_type, &exception);
5807
5925
  rm_check_exception(&exception, new_image, DestroyOnError);
5926
+
5927
+ DestroyExceptionInfo(&exception);
5928
+
5808
5929
  rm_ensure_result(new_image);
5809
5930
 
5810
5931
  return rm_image_new(new_image);
@@ -5969,6 +6090,8 @@ Image_quantum_operator(int argc, VALUE *argv, VALUE self)
5969
6090
  (void) QuantumOperatorImage(image, channel, qop, rvalue, &exception);
5970
6091
  CHECK_EXCEPTION()
5971
6092
 
6093
+ DestroyExceptionInfo(&exception);
6094
+
5972
6095
  return self;
5973
6096
 
5974
6097
  #elif defined(HAVE_EVALUATEIMAGECHANNEL)
@@ -6042,6 +6165,8 @@ Image_quantum_operator(int argc, VALUE *argv, VALUE self)
6042
6165
  (void) EvaluateImageChannel(image, channel, operator, rvalue, &exception);
6043
6166
  CHECK_EXCEPTION()
6044
6167
 
6168
+ DestroyExceptionInfo(&exception);
6169
+
6045
6170
  return self;
6046
6171
 
6047
6172
  #else
@@ -6111,6 +6236,9 @@ Image_radial_blur(VALUE self, VALUE angle)
6111
6236
 
6112
6237
  new_image = RadialBlurImage(image, NUM2DBL(angle), &exception);
6113
6238
  rm_check_exception(&exception, new_image, DestroyOnError);
6239
+
6240
+ DestroyExceptionInfo(&exception);
6241
+
6114
6242
  rm_ensure_result(new_image);
6115
6243
 
6116
6244
  return rm_image_new(new_image);
@@ -6161,6 +6289,8 @@ Image_random_channel_threshold(
6161
6289
  (void) RandomChannelThresholdImage(new_image, channel, thresholds, &exception);
6162
6290
  rm_check_exception(&exception, new_image, DestroyOnError);
6163
6291
 
6292
+ DestroyExceptionInfo(&exception);
6293
+
6164
6294
  return rm_image_new(new_image);
6165
6295
  #else
6166
6296
  rm_not_implemented();
@@ -6214,6 +6344,8 @@ Image_random_threshold_channel(
6214
6344
  (void) RandomThresholdImageChannel(new_image, channels, thresholds, &exception);
6215
6345
  rm_check_exception(&exception, new_image, DestroyOnError);
6216
6346
 
6347
+ DestroyExceptionInfo(&exception);
6348
+
6217
6349
  return rm_image_new(new_image);
6218
6350
 
6219
6351
  #else
@@ -6253,7 +6385,7 @@ Image_raise(int argc, VALUE *argv, VALUE self)
6253
6385
  case 0:
6254
6386
  break;
6255
6387
  default:
6256
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 3)");
6388
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 0 to 3)", argc);
6257
6389
  break;
6258
6390
  }
6259
6391
 
@@ -6338,6 +6470,8 @@ rd_image(VALUE class, VALUE file, reader_t reader)
6338
6470
  images = (reader)(info, &exception);
6339
6471
  rm_check_exception(&exception, images, DestroyOnError);
6340
6472
 
6473
+ DestroyExceptionInfo(&exception);
6474
+
6341
6475
  return array_from_images(images);
6342
6476
  }
6343
6477
 
@@ -6397,6 +6531,8 @@ Image_read_inline(VALUE self, VALUE content)
6397
6531
 
6398
6532
  rm_check_exception(&exception, images, DestroyOnError);
6399
6533
 
6534
+ DestroyExceptionInfo(&exception);
6535
+
6400
6536
  return array_from_images(images);
6401
6537
  }
6402
6538
 
@@ -6443,6 +6579,8 @@ Image_reduce_noise(VALUE self, VALUE radius)
6443
6579
  new_image = ReduceNoiseImage(image, NUM2DBL(radius), &exception);
6444
6580
  rm_check_exception(&exception, new_image, DestroyOnError);
6445
6581
 
6582
+ DestroyExceptionInfo(&exception);
6583
+
6446
6584
  return rm_image_new(new_image);
6447
6585
  }
6448
6586
 
@@ -6539,6 +6677,9 @@ resize(int bang, int argc, VALUE *argv, VALUE self)
6539
6677
  GetExceptionInfo(&exception);
6540
6678
  new_image = ResizeImage(image, columns, rows, filter, blur, &exception);
6541
6679
  rm_check_exception(&exception, new_image, DestroyOnError);
6680
+
6681
+ DestroyExceptionInfo(&exception);
6682
+
6542
6683
  rm_ensure_result(new_image);
6543
6684
 
6544
6685
  if (bang)
@@ -6579,6 +6720,9 @@ Image_roll(VALUE self, VALUE x_offset, VALUE y_offset)
6579
6720
 
6580
6721
  new_image = RollImage(image, NUM2LONG(x_offset), NUM2LONG(y_offset), &exception);
6581
6722
  rm_check_exception(&exception, new_image, DestroyOnError);
6723
+
6724
+ DestroyExceptionInfo(&exception);
6725
+
6582
6726
  rm_ensure_result(new_image);
6583
6727
 
6584
6728
  return rm_image_new(new_image);
@@ -6602,6 +6746,9 @@ rotate(int bang, VALUE self, VALUE degrees)
6602
6746
 
6603
6747
  new_image = RotateImage(image, NUM2DBL(degrees), &exception);
6604
6748
  rm_check_exception(&exception, new_image, DestroyOnError);
6749
+
6750
+ DestroyExceptionInfo(&exception);
6751
+
6605
6752
  rm_ensure_result(new_image);
6606
6753
 
6607
6754
  if (bang)
@@ -6717,6 +6864,9 @@ scale(int bang, int argc, VALUE *argv, VALUE self, scaler_t *scaler)
6717
6864
  GetExceptionInfo(&exception);
6718
6865
  new_image = (scaler)(image, columns, rows, &exception);
6719
6866
  rm_check_exception(&exception, new_image, DestroyOnError);
6867
+
6868
+ DestroyExceptionInfo(&exception);
6869
+
6720
6870
  rm_ensure_result(new_image);
6721
6871
 
6722
6872
  if (bang)
@@ -6788,6 +6938,9 @@ Image_sepiatone(int argc, VALUE *argv, VALUE self)
6788
6938
 
6789
6939
  new_image = SepiaToneImage(image, threshold, &exception);
6790
6940
  rm_check_exception(&exception, new_image, DestroyOnError);
6941
+
6942
+ DestroyExceptionInfo(&exception);
6943
+
6791
6944
  rm_ensure_result(new_image);
6792
6945
 
6793
6946
  return rm_image_new(new_image);
@@ -6972,6 +7125,9 @@ Image_shade(int argc, VALUE *argv, VALUE self)
6972
7125
 
6973
7126
  new_image = ShadeImage(image, shading, azimuth, elevation, &exception);
6974
7127
  rm_check_exception(&exception, new_image, DestroyOnError);
7128
+
7129
+ DestroyExceptionInfo(&exception);
7130
+
6975
7131
  rm_ensure_result(new_image);
6976
7132
 
6977
7133
  return rm_image_new(new_image);
@@ -7028,6 +7184,9 @@ Image_shadow(int argc, VALUE *argv, VALUE self)
7028
7184
 
7029
7185
  new_image = ShadowImage(image, opacity, sigma, x_offset, y_offset, &exception);
7030
7186
  rm_check_exception(&exception, new_image, DestroyOnError);
7187
+
7188
+ DestroyExceptionInfo(&exception);
7189
+
7031
7190
  rm_ensure_result(new_image);
7032
7191
 
7033
7192
  return rm_image_new(new_image);
@@ -7087,6 +7246,8 @@ Image_sharpen_channel(int argc, VALUE *argv, VALUE self)
7087
7246
  (void) SharpenImageChannel(new_image, channels, radius, sigma, &exception);
7088
7247
  rm_check_exception(&exception, new_image, DestroyOnError);
7089
7248
 
7249
+ DestroyExceptionInfo(&exception);
7250
+
7090
7251
  return rm_image_new(new_image);
7091
7252
  #else
7092
7253
  rm_not_implemented();
@@ -7144,6 +7305,9 @@ Image_shear(
7144
7305
 
7145
7306
  new_image = ShearImage(image, NUM2DBL(x_shear), NUM2DBL(y_shear), &exception);
7146
7307
  rm_check_exception(&exception, new_image, DestroyOnError);
7308
+
7309
+ DestroyExceptionInfo(&exception);
7310
+
7147
7311
  rm_ensure_result(new_image);
7148
7312
 
7149
7313
  return rm_image_new(new_image);
@@ -7347,6 +7511,9 @@ Image_splice(int argc, VALUE *argv, VALUE self)
7347
7511
  image->background_color = old_color;
7348
7512
 
7349
7513
  rm_check_exception(&exception, new_image, DestroyOnError);
7514
+
7515
+ DestroyExceptionInfo(&exception);
7516
+
7350
7517
  rm_ensure_result(new_image);
7351
7518
 
7352
7519
  return rm_image_new(new_image);
@@ -7387,6 +7554,8 @@ Image_spread(int argc, VALUE *argv, VALUE self)
7387
7554
  rm_check_exception(&exception, new_image, DestroyOnError);
7388
7555
  rm_ensure_result(new_image);
7389
7556
 
7557
+ DestroyExceptionInfo(&exception);
7558
+
7390
7559
  return rm_image_new(new_image);
7391
7560
  }
7392
7561
 
@@ -7411,6 +7580,8 @@ Image_statistics(VALUE self)
7411
7580
  (void) GetImageStatistics(image, &stats, &exception);
7412
7581
  CHECK_EXCEPTION()
7413
7582
 
7583
+ DestroyExceptionInfo(&exception);
7584
+
7414
7585
  return Statistics_new(&stats);
7415
7586
  #else
7416
7587
  rm_not_implemented();
@@ -7448,6 +7619,9 @@ Image_stegano(
7448
7619
  GetExceptionInfo(&exception);
7449
7620
  new_image = SteganoImage(image, watermark, &exception);
7450
7621
  rm_check_exception(&exception, new_image, DestroyOnError);
7622
+
7623
+ DestroyExceptionInfo(&exception);
7624
+
7451
7625
  rm_ensure_result(new_image);
7452
7626
 
7453
7627
  return rm_image_new(new_image);
@@ -7479,6 +7653,9 @@ Image_stereo(
7479
7653
  GetExceptionInfo(&exception);
7480
7654
  new_image = StereoImage(image, offset, &exception);
7481
7655
  rm_check_exception(&exception, new_image, DestroyOnError);
7656
+
7657
+ DestroyExceptionInfo(&exception);
7658
+
7482
7659
  rm_ensure_result(new_image);
7483
7660
 
7484
7661
  return rm_image_new(new_image);
@@ -7633,6 +7810,9 @@ Image_swirl(VALUE self, VALUE degrees)
7633
7810
 
7634
7811
  new_image = SwirlImage(image, NUM2DBL(degrees), &exception);
7635
7812
  rm_check_exception(&exception, new_image, DestroyOnError);
7813
+
7814
+ DestroyExceptionInfo(&exception);
7815
+
7636
7816
  rm_ensure_result(new_image);
7637
7817
 
7638
7818
  return rm_image_new(new_image);
@@ -7839,6 +8019,9 @@ thumbnail(int bang, int argc, VALUE *argv, VALUE self)
7839
8019
  GetExceptionInfo(&exception);
7840
8020
  new_image = ThumbnailImage(image, columns, rows, &exception);
7841
8021
  rm_check_exception(&exception, new_image, DestroyOnError);
8022
+
8023
+ DestroyExceptionInfo(&exception);
8024
+
7842
8025
  rm_ensure_result(new_image);
7843
8026
 
7844
8027
  if (bang)
@@ -8003,6 +8186,9 @@ Image_tint(int argc, VALUE *argv, VALUE self)
8003
8186
 
8004
8187
  new_image = TintImage(image, opacity, *tint, &exception);
8005
8188
  rm_check_exception(&exception, new_image, DestroyOnError);
8189
+
8190
+ DestroyExceptionInfo(&exception);
8191
+
8006
8192
  rm_ensure_result(new_image);
8007
8193
 
8008
8194
  return rm_image_new(new_image);
@@ -8079,6 +8265,8 @@ Image_to_blob(VALUE self)
8079
8265
  blob = ImageToBlob(info, image, &length, &exception);
8080
8266
  CHECK_EXCEPTION()
8081
8267
 
8268
+ DestroyExceptionInfo(&exception);
8269
+
8082
8270
  if (length == 0 || !blob)
8083
8271
  {
8084
8272
  return Qnil;
@@ -8117,6 +8305,8 @@ Image_to_color(VALUE self, VALUE pixel_arg)
8117
8305
  (void) QueryColorname(image, pixel, AllCompliance, name, &exception);
8118
8306
  CHECK_EXCEPTION()
8119
8307
 
8308
+ DestroyExceptionInfo(&exception);
8309
+
8120
8310
  return rb_str_new2(name);
8121
8311
 
8122
8312
  }
@@ -8198,6 +8388,9 @@ trimmer(int bang, VALUE self)
8198
8388
 
8199
8389
  new_image = CropImage(image, &geometry, &exception);
8200
8390
  rm_check_exception(&exception, new_image, DestroyOnError);
8391
+
8392
+ DestroyExceptionInfo(&exception);
8393
+
8201
8394
  rm_ensure_result(new_image);
8202
8395
 
8203
8396
  if (bang)
@@ -8260,6 +8453,8 @@ VALUE Image_image_type(VALUE self)
8260
8453
  type = GetImageType(image, &exception);
8261
8454
  CHECK_EXCEPTION()
8262
8455
 
8456
+ DestroyExceptionInfo(&exception);
8457
+
8263
8458
  return ImageType_new(type);
8264
8459
  }
8265
8460
 
@@ -8361,6 +8556,9 @@ Image_unsharp_mask(int argc, VALUE *argv, VALUE self)
8361
8556
  GetExceptionInfo(&exception);
8362
8557
  new_image = UnsharpMaskImage(image, radius, sigma, amount, threshold, &exception);
8363
8558
  rm_check_exception(&exception, new_image, DestroyOnError);
8559
+
8560
+ DestroyExceptionInfo(&exception);
8561
+
8364
8562
  rm_ensure_result(new_image);
8365
8563
 
8366
8564
  return rm_image_new(new_image);
@@ -8394,6 +8592,9 @@ Image_unsharp_mask_channel(int argc, VALUE *argv, VALUE self)
8394
8592
  new_image = UnsharpMaskImageChannel(image, channels, radius, sigma, amount
8395
8593
  , threshold, &exception);
8396
8594
  rm_check_exception(&exception, new_image, DestroyOnError);
8595
+
8596
+ DestroyExceptionInfo(&exception);
8597
+
8397
8598
  rm_ensure_result(new_image);
8398
8599
 
8399
8600
  return rm_image_new(new_image);
@@ -8444,6 +8645,9 @@ Image_vignette(int argc, VALUE *argv, VALUE self)
8444
8645
 
8445
8646
  new_image = VignetteImage(image, radius, sigma, horz_radius, vert_radius, &exception);
8446
8647
  rm_check_exception(&exception, new_image, DestroyOnError);
8648
+
8649
+ DestroyExceptionInfo(&exception);
8650
+
8447
8651
  rm_ensure_result(new_image);
8448
8652
 
8449
8653
  return rm_image_new(new_image);
@@ -8521,6 +8725,9 @@ Image_wave(int argc, VALUE *argv, VALUE self)
8521
8725
 
8522
8726
  new_image = WaveImage(image, amplitude, wavelength, &exception);
8523
8727
  rm_check_exception(&exception, new_image, DestroyOnError);
8728
+
8729
+ DestroyExceptionInfo(&exception);
8730
+
8524
8731
  rm_ensure_result(new_image);
8525
8732
 
8526
8733
  return rm_image_new(new_image);
@@ -8591,6 +8798,8 @@ Image_write(VALUE self, VALUE file)
8591
8798
  (void) SetImageInfo(info, True, &exception);
8592
8799
  CHECK_EXCEPTION()
8593
8800
 
8801
+ DestroyExceptionInfo(&exception);
8802
+
8594
8803
  if (*info->magick == '\0')
8595
8804
  {
8596
8805
  return Qnil;
@@ -8810,6 +9019,9 @@ xform_image(
8810
9019
  // An exception can occur in either the old or the new images
8811
9020
  rm_check_image_exception(image, RetainOnError);
8812
9021
  rm_check_exception(&exception, new_image, DestroyOnError);
9022
+
9023
+ DestroyExceptionInfo(&exception);
9024
+
8813
9025
  rm_ensure_result(new_image);
8814
9026
 
8815
9027
  if (bang)