rmagick 2.9.1 → 2.9.2

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 (60) hide show
  1. data/ChangeLog +13 -1
  2. data/README.html +8 -8
  3. data/doc/comtasks.html +2 -2
  4. data/doc/constants.html +2 -2
  5. data/doc/draw.html +4 -3
  6. data/doc/ilist.html +2 -2
  7. data/doc/image1.html +2 -2
  8. data/doc/image2.html +2 -2
  9. data/doc/image3.html +11 -8
  10. data/doc/imageattrs.html +17 -2
  11. data/doc/imusage.html +2 -2
  12. data/doc/index.html +6 -6
  13. data/doc/info.html +2 -2
  14. data/doc/magick.html +2 -2
  15. data/doc/optequiv.html +47 -9
  16. data/doc/rvg.html +2 -2
  17. data/doc/rvgclip.html +2 -2
  18. data/doc/rvggroup.html +2 -2
  19. data/doc/rvgimage.html +2 -2
  20. data/doc/rvgpattern.html +2 -2
  21. data/doc/rvgshape.html +2 -2
  22. data/doc/rvgstyle.html +2 -2
  23. data/doc/rvgtext.html +2 -2
  24. data/doc/rvgtspan.html +2 -2
  25. data/doc/rvgtut.html +2 -2
  26. data/doc/rvguse.html +2 -2
  27. data/doc/rvgxform.html +2 -2
  28. data/doc/struct.html +2 -2
  29. data/doc/usage.html +2 -2
  30. data/ext/RMagick/MANIFEST +1 -1
  31. data/ext/RMagick/extconf.rb +65 -21
  32. data/ext/RMagick/rmagick.c +2 -2
  33. data/ext/RMagick/rmagick.h +3 -2
  34. data/ext/RMagick/rmdraw.c +119 -4
  35. data/ext/RMagick/rmenum.c +12 -3
  36. data/ext/RMagick/rmfill.c +122 -42
  37. data/ext/RMagick/rmilist.c +2 -2
  38. data/ext/RMagick/rmimage.c +99 -14
  39. data/ext/RMagick/rminfo.c +3 -6
  40. data/ext/RMagick/rmmain.c +18 -4
  41. data/ext/RMagick/rmmontage.c +2 -2
  42. data/ext/RMagick/rmpixel.c +2 -2
  43. data/ext/RMagick/rmstruct.c +20 -12
  44. data/ext/RMagick/rmutil.c +2 -2
  45. data/lib/RMagick.rb +2 -2
  46. data/lib/rvg/clippath.rb +2 -2
  47. data/lib/rvg/container.rb +2 -2
  48. data/lib/rvg/describable.rb +2 -2
  49. data/lib/rvg/embellishable.rb +2 -2
  50. data/lib/rvg/misc.rb +2 -2
  51. data/lib/rvg/paint.rb +2 -2
  52. data/lib/rvg/pathdata.rb +2 -2
  53. data/lib/rvg/rvg.rb +2 -2
  54. data/lib/rvg/stretchable.rb +2 -2
  55. data/lib/rvg/stylable.rb +2 -2
  56. data/lib/rvg/text.rb +2 -2
  57. data/lib/rvg/transformable.rb +2 -2
  58. data/lib/rvg/units.rb +2 -2
  59. data/rmagick.gemspec +1 -1
  60. metadata +2 -2
@@ -1,6 +1,6 @@
1
- /* $Id: rmenum.c,v 1.1 2008/12/27 16:49:47 rmagick Exp $ */
1
+ /* $Id: rmenum.c,v 1.3 2009/03/18 22:40:41 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2008 by Timothy P. Hunter
3
+ | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmenum.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: Enumeration methods
@@ -204,7 +204,7 @@ Enum_type_inspect(VALUE self)
204
204
  MagickEnum *magick_enum;
205
205
 
206
206
  Data_Get_Struct(self, MagickEnum, magick_enum);
207
- sprintf(str, "%.32s=%d", rb_id2name(magick_enum->id), magick_enum->val);
207
+ sprintf(str, "%.48s=%d", rb_id2name(magick_enum->id), magick_enum->val);
208
208
 
209
209
  return rb_str_new2(str);
210
210
  }
@@ -997,6 +997,15 @@ VirtualPixelMethod_name(VirtualPixelMethod method)
997
997
  #endif
998
998
  #if defined(HAVE_ENUM_VERTICALTILEVIRTUALPIXELMETHOD)
999
999
  ENUM_TO_NAME(VerticalTileVirtualPixelMethod)
1000
+ #endif
1001
+ #if defined(HAVE_ENUM_HORIZONTALTILEEDGEVIRTUALPIXELMETHOD)
1002
+ ENUM_TO_NAME(HorizontalTileEdgeVirtualPixelMethod)
1003
+ #endif
1004
+ #if defined(HAVE_ENUM_VERTICALTILEEDGEVIRTUALPIXELMETHOD)
1005
+ ENUM_TO_NAME(VerticalTileEdgeVirtualPixelMethod)
1006
+ #endif
1007
+ #if defined(HAVE_ENUM_CHECKERTILEVIRTUALPIXELMETHOD)
1008
+ ENUM_TO_NAME(CheckerTileVirtualPixelMethod)
1000
1009
  #endif
1001
1010
  }
1002
1011
 
@@ -1,6 +1,6 @@
1
- /* $Id: rmfill.c,v 1.30 2008/09/02 23:40:19 rmagick Exp $ */
1
+ /* $Id: rmfill.c,v 1.32 2009/03/04 00:35:18 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2008 by Timothy P. Hunter
3
+ | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmfill.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: GradientFill, TextureFill class definitions for RMagick
@@ -86,6 +86,11 @@ point_fill(
86
86
  double steps, distance;
87
87
  unsigned long x, y;
88
88
  MagickRealType red_step, green_step, blue_step;
89
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
90
+ ExceptionInfo exception;
91
+
92
+ GetExceptionInfo(&exception);
93
+ #endif
89
94
 
90
95
  steps = sqrt((double)((image->columns-x0)*(image->columns-x0)
91
96
  + (image->rows-y0)*(image->rows-y0)));
@@ -98,10 +103,13 @@ point_fill(
98
103
  {
99
104
  PixelPacket *row_pixels;
100
105
 
101
- if (!(row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1)))
102
- {
103
- rm_check_image_exception(image, RetainOnError);
104
- }
106
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
107
+ row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, &exception);
108
+ CHECK_EXCEPTION()
109
+ #else
110
+ row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
111
+ rm_check_image_exception(image, RetainOnError);
112
+ #endif
105
113
  for (x = 0; x < image->columns; x++)
106
114
  {
107
115
  distance = sqrt((double)((x-x0)*(x-x0)+(y-y0)*(y-y0)));
@@ -110,11 +118,19 @@ point_fill(
110
118
  row_pixels[x].blue = ROUND_TO_QUANTUM(start_color->blue + (distance * blue_step));
111
119
  row_pixels[x].opacity = OpaqueOpacity;
112
120
  }
113
- if (!SyncImagePixels(image))
114
- {
115
- rm_check_image_exception(image, RetainOnError);
116
- }
121
+
122
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
123
+ SyncAuthenticPixels(image, &exception);
124
+ CHECK_EXCEPTION()
125
+ #else
126
+ SyncImagePixels(image);
127
+ rm_check_image_exception(image, RetainOnError);
128
+ #endif
117
129
  }
130
+
131
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
132
+ DestroyExceptionInfo(&exception);
133
+ #endif
118
134
  }
119
135
 
120
136
  /*
@@ -133,6 +149,11 @@ vertical_fill(
133
149
  unsigned long x, y;
134
150
  PixelPacket *master;
135
151
  MagickRealType red_step, green_step, blue_step;
152
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
153
+ ExceptionInfo exception;
154
+
155
+ GetExceptionInfo(&exception);
156
+ #endif
136
157
 
137
158
  steps = FMAX(x1, ((long)image->columns)-x1);
138
159
 
@@ -166,18 +187,29 @@ vertical_fill(
166
187
  {
167
188
  PixelPacket *row_pixels;
168
189
 
169
- if (!(row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1)))
170
- {
171
- rm_check_image_exception(image, RetainOnError);
172
- }
190
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
191
+ row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, &exception);
192
+ CHECK_EXCEPTION()
193
+ #else
194
+ row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
195
+ rm_check_image_exception(image, RetainOnError);
196
+ #endif
173
197
 
174
198
  memcpy(row_pixels, master, image->columns * sizeof(PixelPacket));
175
- if (!SyncImagePixels(image))
176
- {
177
- rm_check_image_exception(image, RetainOnError);
178
- }
199
+
200
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
201
+ SyncAuthenticPixels(image, &exception);
202
+ CHECK_EXCEPTION()
203
+ #else
204
+ SyncImagePixels(image);
205
+ rm_check_image_exception(image, RetainOnError);
206
+ #endif
179
207
  }
180
208
 
209
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
210
+ DestroyExceptionInfo(&exception);
211
+ #endif
212
+
181
213
  xfree((void *)master);
182
214
  }
183
215
 
@@ -196,6 +228,11 @@ horizontal_fill(
196
228
  unsigned long x, y;
197
229
  PixelPacket *master;
198
230
  MagickRealType red_step, green_step, blue_step;
231
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
232
+ ExceptionInfo exception;
233
+
234
+ GetExceptionInfo(&exception);
235
+ #endif
199
236
 
200
237
  steps = FMAX(y1, ((long)image->rows)-y1);
201
238
 
@@ -227,17 +264,27 @@ horizontal_fill(
227
264
  {
228
265
  PixelPacket *col_pixels;
229
266
 
230
- if (!(col_pixels = SetImagePixels(image, (long int)x, 0, 1, image->rows)))
231
- {
232
- rm_check_image_exception(image, RetainOnError);
233
- }
267
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
268
+ col_pixels = QueueAuthenticPixels(image, (long int)x, 0, 1, image->rows, &exception);
269
+ #else
270
+ col_pixels = SetImagePixels(image, (long int)x, 0, 1, image->rows);
271
+ rm_check_image_exception(image, RetainOnError);
272
+ #endif
234
273
  memcpy(col_pixels, master, image->rows * sizeof(PixelPacket));
235
- if (!SyncImagePixels(image))
236
- {
237
- rm_check_image_exception(image, RetainOnError);
238
- }
274
+
275
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
276
+ SyncAuthenticPixels(image, &exception);
277
+ CHECK_EXCEPTION()
278
+ #else
279
+ SyncImagePixels(image);
280
+ rm_check_image_exception(image, RetainOnError);
281
+ #endif
239
282
  }
240
283
 
284
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
285
+ DestroyExceptionInfo(&exception);
286
+ #endif
287
+
241
288
  xfree((PixelPacket *)master);
242
289
  }
243
290
 
@@ -260,6 +307,11 @@ v_diagonal_fill(
260
307
  MagickRealType red_step, green_step, blue_step;
261
308
  double m, b, steps = 0.0;
262
309
  double d1, d2;
310
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
311
+ ExceptionInfo exception;
312
+
313
+ GetExceptionInfo(&exception);
314
+ #endif
263
315
 
264
316
  // Compute the equation of the line: y=mx+b
265
317
  m = ((double)(y2 - y1))/((double)(x2 - x1));
@@ -301,10 +353,13 @@ v_diagonal_fill(
301
353
  {
302
354
  PixelPacket *row_pixels;
303
355
 
304
- if (!(row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1)))
305
- {
306
- rm_check_image_exception(image, RetainOnError);
307
- }
356
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
357
+ row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, &exception);
358
+ CHECK_EXCEPTION()
359
+ #else
360
+ row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
361
+ rm_check_image_exception(image, RetainOnError);
362
+ #endif
308
363
  for (x = 0; x < image->columns; x++)
309
364
  {
310
365
  double distance = (double) abs((int)(y-(m * x + b)));
@@ -313,11 +368,20 @@ v_diagonal_fill(
313
368
  row_pixels[x].blue = ROUND_TO_QUANTUM(start_color->blue + (distance * blue_step));
314
369
  row_pixels[x].opacity = OpaqueOpacity;
315
370
  }
316
- if (!SyncImagePixels(image))
317
- {
318
- rm_check_image_exception(image, RetainOnError);
319
- }
371
+
372
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
373
+ SyncAuthenticPixels(image, &exception);
374
+ CHECK_EXCEPTION()
375
+ #else
376
+ SyncImagePixels(image);
377
+ rm_check_image_exception(image, RetainOnError);
378
+ #endif
320
379
  }
380
+
381
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
382
+ DestroyExceptionInfo(&exception);
383
+ #endif
384
+
321
385
  }
322
386
 
323
387
  /*
@@ -339,6 +403,11 @@ h_diagonal_fill(
339
403
  double m, b, steps = 0.0;
340
404
  MagickRealType red_step, green_step, blue_step;
341
405
  double d1, d2;
406
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
407
+ ExceptionInfo exception;
408
+
409
+ GetExceptionInfo(&exception);
410
+ #endif
342
411
 
343
412
  // Compute the equation of the line: y=mx+b
344
413
  m = ((double)(y2 - y1))/((double)(x2 - x1));
@@ -382,10 +451,13 @@ h_diagonal_fill(
382
451
  {
383
452
  PixelPacket *row_pixels;
384
453
 
385
- if (!(row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1)))
386
- {
387
- rm_check_image_exception(image, RetainOnError);
388
- }
454
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
455
+ row_pixels = QueueAuthenticPixels(image, 0, (long int)y, image->columns, 1, &exception);
456
+ CHECK_EXCEPTION()
457
+ #else
458
+ row_pixels = SetImagePixels(image, 0, (long int)y, image->columns, 1);
459
+ rm_check_image_exception(image, RetainOnError);
460
+ #endif
389
461
  for (x = 0; x < image->columns; x++)
390
462
  {
391
463
  double distance = (double) abs((int)(x-((y-b)/m)));
@@ -394,11 +466,19 @@ h_diagonal_fill(
394
466
  row_pixels[x].blue = ROUND_TO_QUANTUM(start_color->blue + (distance * blue_step));
395
467
  row_pixels[x].opacity = OpaqueOpacity;
396
468
  }
397
- if (!SyncImagePixels(image))
398
- {
399
- rm_check_image_exception(image, RetainOnError);
400
- }
469
+
470
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
471
+ SyncAuthenticPixels(image, &exception);
472
+ CHECK_EXCEPTION()
473
+ #else
474
+ SyncImagePixels(image);
475
+ rm_check_image_exception(image, RetainOnError);
476
+ #endif
401
477
  }
478
+
479
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_QUEUEAUTHENTICPIXELS)
480
+ DestroyExceptionInfo(&exception);
481
+ #endif
402
482
  }
403
483
 
404
484
  /*
@@ -1,6 +1,6 @@
1
- /* $Id: rmilist.c,v 1.90 2008/11/13 00:03:32 rmagick Exp $ */
1
+ /* $Id: rmilist.c,v 1.91 2009/02/28 23:50:35 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2008 by Timothy P. Hunter
3
+ | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmilist.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: ImageList class method definitions for RMagick
@@ -1,6 +1,6 @@
1
- /* $Id: rmimage.c,v 1.344 2009/01/17 21:03:46 rmagick Exp $ */
1
+ /* $Id: rmimage.c,v 1.346 2009/03/04 00:35:19 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2008 by Timothy P. Hunter
3
+ | Copyright (C) 2009 by Timothy P. Hunter
4
4
  | Name: rmimage.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: Image class method definitions for RMagick
@@ -5281,7 +5281,11 @@ Image_get_pixels(VALUE self, VALUE x_arg, VALUE y_arg, VALUE cols_arg, VALUE row
5281
5281
  // Cast AcquireImagePixels to get rid of the const qualifier. We're not going
5282
5282
  // to change the pixels but I don't want to make "pixels" const.
5283
5283
  GetExceptionInfo(&exception);
5284
+ #if defined(HAVE_GETVIRTUALPIXELS)
5285
+ pixels = GetVirtualPixels(image, x, y, columns, rows, &exception);
5286
+ #else
5284
5287
  pixels = AcquireImagePixels(image, x, y, columns, rows, &exception);
5288
+ #endif
5285
5289
  CHECK_EXCEPTION()
5286
5290
 
5287
5291
  (void) DestroyExceptionInfo(&exception);
@@ -6431,10 +6435,18 @@ Image_mask(int argc, VALUE *argv, VALUE self)
6431
6435
  }
6432
6436
 
6433
6437
  // The following section is copied from mogrify.c (6.2.8-8)
6438
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
6439
+ GetExceptionInfo(&exception);
6440
+ #endif
6434
6441
  for (y = 0; y < (long) clip_mask->rows; y++)
6435
6442
  {
6443
+ #if defined(HAVE_GETAUTHENTICPIXELS)
6444
+ q = GetAuthenticPixels(clip_mask, 0, y, clip_mask->columns, 1, &exception);
6445
+ rm_check_exception(&exception, clip_mask, DestroyOnError);
6446
+ #else
6436
6447
  q = GetImagePixels(clip_mask, 0, y, clip_mask->columns, 1);
6437
6448
  rm_check_image_exception(clip_mask, DestroyOnError);
6449
+ #endif
6438
6450
  if (!q)
6439
6451
  {
6440
6452
  break;
@@ -6450,9 +6462,18 @@ Image_mask(int argc, VALUE *argv, VALUE self)
6450
6462
  q->blue = q->opacity;
6451
6463
  q += 1;
6452
6464
  }
6465
+
6466
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
6467
+ SyncAuthenticPixels(clip_mask, &exception);
6468
+ rm_check_exception(&exception, clip_mask, DestroyOnError);
6469
+ #else
6453
6470
  SyncImagePixels(clip_mask);
6454
6471
  rm_check_image_exception(clip_mask, DestroyOnError);
6472
+ #endif
6455
6473
  }
6474
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
6475
+ (void) DestroyExceptionInfo(&exception);
6476
+ #endif
6456
6477
 
6457
6478
  SetImageStorageClass(clip_mask, DirectClass);
6458
6479
  rm_check_image_exception(clip_mask, DestroyOnError);
@@ -7518,7 +7539,11 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
7518
7539
  if (!set)
7519
7540
  {
7520
7541
  GetExceptionInfo(&exception);
7542
+ #if defined(HAVE_GETVIRTUALPIXELS)
7543
+ old_color = *GetVirtualPixels(image, x, y, 1, 1, &exception);
7544
+ #else
7521
7545
  old_color = *AcquireImagePixels(image, x, y, 1, 1, &exception);
7546
+ #endif
7522
7547
  CHECK_EXCEPTION()
7523
7548
 
7524
7549
  (void) DestroyExceptionInfo(&exception);
@@ -7526,7 +7551,11 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
7526
7551
  // PseudoClass
7527
7552
  if (image->storage_class == PseudoClass)
7528
7553
  {
7554
+ #if defined(HAVE_GETAUTHENTICINDEXQUEUE)
7555
+ IndexPacket *indexes = GetAuthenticIndexQueue(image);
7556
+ #else
7529
7557
  IndexPacket *indexes = GetIndexes(image);
7558
+ #endif
7530
7559
  old_color = image->colormap[*indexes];
7531
7560
  }
7532
7561
  if (!image->matte)
@@ -7555,8 +7584,19 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
7555
7584
  }
7556
7585
  }
7557
7586
 
7587
+
7588
+ #if defined(HAVE_GETAUTHENTICPIXELS) || defined(HAVE_SYNCAUTHENTICPIXELS)
7589
+ GetExceptionInfo(&exception);
7590
+ #endif
7591
+
7592
+ #if defined(HAVE_GETAUTHENTICPIXELS)
7593
+ pixel = GetAuthenticPixels(image, x, y, 1, 1, &exception);
7594
+ CHECK_EXCEPTION()
7595
+ #else
7558
7596
  pixel = GetImagePixels(image, x, y, 1, 1);
7559
7597
  rm_check_image_exception(image, RetainOnError);
7598
+ #endif
7599
+
7560
7600
  if (pixel)
7561
7601
  {
7562
7602
  old_color = *pixel;
@@ -7566,8 +7606,18 @@ Image_pixel_color(int argc, VALUE *argv, VALUE self)
7566
7606
  }
7567
7607
  }
7568
7608
  *pixel = new_color;
7609
+
7610
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
7611
+ SyncAuthenticPixels(image, &exception);
7612
+ CHECK_EXCEPTION()
7613
+ #else
7569
7614
  SyncImagePixels(image);
7570
7615
  rm_check_image_exception(image, RetainOnError);
7616
+ #endif
7617
+
7618
+ #if defined(HAVE_GETAUTHENTICPIXELS) || defined(HAVE_SYNCAUTHENTICPIXELS)
7619
+ (void) DestroyExceptionInfo(&exception);
7620
+ #endif
7571
7621
 
7572
7622
  return Pixel_from_PixelPacket(&old_color);
7573
7623
  }
@@ -9755,20 +9805,40 @@ Image_store_pixels(VALUE self, VALUE x_arg, VALUE y_arg, VALUE cols_arg
9755
9805
 
9756
9806
  // Get a pointer to the pixels. Replace the values with the PixelPackets
9757
9807
  // from the pixels argument.
9758
- pixels = GetImagePixels(image, x, y, cols, rows);
9759
- rm_check_image_exception(image, RetainOnError);
9760
-
9761
- if (pixels)
9762
9808
  {
9763
- for (n = 0; n < size; n++)
9809
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_GETAUTHENTICPIXELS)
9810
+ ExceptionInfo exception;
9811
+ GetExceptionInfo(&exception);
9812
+ #endif
9813
+
9814
+ #if defined(HAVE_GETAUTHENTICPIXELS)
9815
+ pixels = GetAuthenticPixels(image, x, y, cols, rows, &exception);
9816
+ CHECK_EXCEPTION()
9817
+ #else
9818
+ pixels = GetImagePixels(image, x, y, cols, rows);
9819
+ rm_check_image_exception(image, RetainOnError);
9820
+ #endif
9821
+
9822
+ if (pixels)
9764
9823
  {
9765
- new_pixel = rb_ary_entry(new_pixels, n);
9766
- Data_Get_Struct(new_pixel, Pixel, pixel);
9767
- pixels[n] = *pixel;
9824
+ for (n = 0; n < size; n++)
9825
+ {
9826
+ new_pixel = rb_ary_entry(new_pixels, n);
9827
+ Data_Get_Struct(new_pixel, Pixel, pixel);
9828
+ pixels[n] = *pixel;
9829
+ }
9830
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
9831
+ SyncAuthenticPixels(image, &exception);
9832
+ CHECK_EXCEPTION()
9833
+ #else
9834
+ SyncImagePixels(image);
9835
+ rm_check_image_exception(image, RetainOnError);
9836
+ #endif
9768
9837
  }
9769
9838
 
9770
- SyncImagePixels(image);
9771
- rm_check_image_exception(image, RetainOnError);
9839
+ #if defined(HAVE_SYNCAUTHENTICPIXELS) || defined(HAVE_GETAUTHENTICPIXELS)
9840
+ DestroyExceptionInfo(&exception);
9841
+ #endif
9772
9842
  }
9773
9843
 
9774
9844
  return self;
@@ -11106,16 +11176,25 @@ Image_wet_floor(int argc, VALUE *argv, VALUE self)
11106
11176
  opacity = TransparentOpacity;
11107
11177
  }
11108
11178
 
11179
+
11180
+ #if defined(HAVE_GETVIRTUALPIXELS)
11181
+ p = GetVirtualPixels(reflection, 0, y, image->columns, 1, &exception);
11182
+ #else
11109
11183
  p = AcquireImagePixels(reflection, 0, y, image->columns, 1, &exception);
11110
- rm_check_exception(&exception, reflection, RetainOnError);
11184
+ #endif
11185
+ rm_check_exception(&exception, reflection, DestroyOnError);
11111
11186
  if (!p)
11112
11187
  {
11113
11188
  func = "AcquireImagePixels";
11114
11189
  goto error;
11115
11190
  }
11116
11191
 
11192
+ #if defined(HAVE_QUEUEAUTHENTICPIXELS)
11193
+ q = QueueAuthenticPixels(reflection, 0, y, image->columns, 1, &exception);
11194
+ #else
11117
11195
  q = SetImagePixels(reflection, 0, y, image->columns, 1);
11118
- rm_check_image_exception(reflection, DestroyOnError);
11196
+ #endif
11197
+ rm_check_exception(&exception, reflection, DestroyOnError);
11119
11198
  if (!q)
11120
11199
  {
11121
11200
  func = "SetImagePixels";
@@ -11129,8 +11208,14 @@ Image_wet_floor(int argc, VALUE *argv, VALUE self)
11129
11208
  q[x].opacity = max(q[x].opacity, (Quantum)opacity);
11130
11209
  }
11131
11210
 
11211
+
11212
+ #if defined(HAVE_SYNCAUTHENTICPIXELS)
11213
+ SyncAuthenticPixels(reflection, &exception);
11214
+ rm_check_exception(&exception, reflection, DestroyOnError);
11215
+ #else
11132
11216
  SyncImagePixels(reflection);
11133
11217
  rm_check_image_exception(reflection, DestroyOnError);
11218
+ #endif
11134
11219
 
11135
11220
  opacity += step;
11136
11221
  }