rmagick 4.1.0.rc2 → 4.1.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 (412) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +63 -0
  3. data/.editorconfig +3 -0
  4. data/.github/workflows/ci.yml +148 -0
  5. data/.gitignore +3 -1
  6. data/.rspec +1 -0
  7. data/.rubocop.yml +24 -0
  8. data/.rubocop_todo.yml +80 -270
  9. data/.yardopts +5 -0
  10. data/CHANGELOG.md +63 -0
  11. data/CONTRIBUTING.md +14 -10
  12. data/README.md +292 -0
  13. data/Rakefile +16 -22
  14. data/before_install_linux.sh +22 -32
  15. data/before_install_osx.sh +56 -2
  16. data/ext/RMagick/extconf.rb +100 -94
  17. data/ext/RMagick/rmagick.c +77 -104
  18. data/ext/RMagick/rmagick.h +74 -70
  19. data/ext/RMagick/rmdraw.c +261 -444
  20. data/ext/RMagick/rmenum.c +96 -113
  21. data/ext/RMagick/rmfill.c +46 -77
  22. data/ext/RMagick/rmilist.c +136 -244
  23. data/ext/RMagick/rmimage.c +3395 -4166
  24. data/ext/RMagick/rminfo.c +531 -737
  25. data/ext/RMagick/rmkinfo.c +21 -87
  26. data/ext/RMagick/rmmain.c +405 -245
  27. data/ext/RMagick/rmmontage.c +60 -126
  28. data/ext/RMagick/rmpixel.c +401 -345
  29. data/ext/RMagick/rmstruct.c +62 -88
  30. data/ext/RMagick/rmutil.c +112 -218
  31. data/lib/rmagick/version.rb +1 -1
  32. data/lib/rmagick_internal.rb +128 -77
  33. data/lib/rvg/clippath.rb +2 -1
  34. data/lib/rvg/container.rb +10 -5
  35. data/lib/rvg/describable.rb +1 -1
  36. data/lib/rvg/embellishable.rb +5 -4
  37. data/lib/rvg/misc.rb +15 -12
  38. data/lib/rvg/paint.rb +2 -1
  39. data/lib/rvg/pathdata.rb +12 -11
  40. data/lib/rvg/rvg.rb +8 -4
  41. data/lib/rvg/stylable.rb +9 -7
  42. data/lib/rvg/text.rb +11 -6
  43. data/lib/rvg/transformable.rb +3 -2
  44. data/lib/rvg/units.rb +1 -1
  45. data/rmagick.gemspec +7 -6
  46. metadata +31 -421
  47. data/.appveyor.yml +0 -57
  48. data/.circleci/config.yml +0 -56
  49. data/.ruby-version +0 -1
  50. data/.simplecov +0 -27
  51. data/.travis.yml +0 -64
  52. data/Doxyfile +0 -1514
  53. data/README.textile +0 -259
  54. data/benchmarks/memory/README.md +0 -50
  55. data/benchmarks/memory/image_new.rb +0 -8
  56. data/benchmarks/memory/rmagick.gnuplot +0 -16
  57. data/doc/.cvsignore +0 -1
  58. data/doc/comtasks.html +0 -287
  59. data/doc/constants.html +0 -1581
  60. data/doc/css/doc.css +0 -299
  61. data/doc/css/popup.css +0 -34
  62. data/doc/css/ref.css +0 -67
  63. data/doc/draw.html +0 -3272
  64. data/doc/ex/InitialCoords.rb +0 -22
  65. data/doc/ex/NewCoordSys.rb +0 -30
  66. data/doc/ex/OrigCoordSys.rb +0 -16
  67. data/doc/ex/PreserveAspectRatio.rb +0 -204
  68. data/doc/ex/RotateScale.rb +0 -36
  69. data/doc/ex/Skew.rb +0 -38
  70. data/doc/ex/Use01.rb +0 -15
  71. data/doc/ex/Use02.rb +0 -20
  72. data/doc/ex/Use03.rb +0 -16
  73. data/doc/ex/ViewBox.rb +0 -31
  74. data/doc/ex/adaptive_threshold.rb +0 -9
  75. data/doc/ex/add_noise.rb +0 -16
  76. data/doc/ex/affine.rb +0 -48
  77. data/doc/ex/affine_transform.rb +0 -20
  78. data/doc/ex/arc.rb +0 -49
  79. data/doc/ex/arcpath.rb +0 -32
  80. data/doc/ex/arcs01.rb +0 -28
  81. data/doc/ex/arcs02.rb +0 -59
  82. data/doc/ex/average.rb +0 -15
  83. data/doc/ex/axes.rb +0 -64
  84. data/doc/ex/baseline_shift01.rb +0 -17
  85. data/doc/ex/bilevel_channel.rb +0 -8
  86. data/doc/ex/blur_image.rb +0 -12
  87. data/doc/ex/border.rb +0 -10
  88. data/doc/ex/bounding_box.rb +0 -42
  89. data/doc/ex/cbezier1.rb +0 -41
  90. data/doc/ex/cbezier2.rb +0 -41
  91. data/doc/ex/cbezier3.rb +0 -41
  92. data/doc/ex/cbezier4.rb +0 -42
  93. data/doc/ex/cbezier5.rb +0 -42
  94. data/doc/ex/cbezier6.rb +0 -53
  95. data/doc/ex/channel.rb +0 -25
  96. data/doc/ex/charcoal.rb +0 -12
  97. data/doc/ex/chop.rb +0 -29
  98. data/doc/ex/circle.rb +0 -33
  99. data/doc/ex/circle01.rb +0 -16
  100. data/doc/ex/clip_path.rb +0 -60
  101. data/doc/ex/coalesce.rb +0 -57
  102. data/doc/ex/color_fill_to_border.rb +0 -29
  103. data/doc/ex/color_floodfill.rb +0 -28
  104. data/doc/ex/color_histogram.rb +0 -47
  105. data/doc/ex/color_reset.rb +0 -11
  106. data/doc/ex/colorize.rb +0 -16
  107. data/doc/ex/colors.rb +0 -64
  108. data/doc/ex/compose_mask.rb +0 -22
  109. data/doc/ex/composite.rb +0 -133
  110. data/doc/ex/composite_layers.rb +0 -52
  111. data/doc/ex/composite_tiled.rb +0 -21
  112. data/doc/ex/contrast.rb +0 -36
  113. data/doc/ex/crop.rb +0 -31
  114. data/doc/ex/crop_with_gravity.rb +0 -42
  115. data/doc/ex/cubic01.rb +0 -43
  116. data/doc/ex/cubic02.rb +0 -91
  117. data/doc/ex/cycle_colormap.rb +0 -21
  118. data/doc/ex/dissolve.rb +0 -12
  119. data/doc/ex/drawcomp.rb +0 -41
  120. data/doc/ex/drop_shadow.rb +0 -60
  121. data/doc/ex/edge.rb +0 -11
  122. data/doc/ex/ellipse.rb +0 -45
  123. data/doc/ex/ellipse01.rb +0 -21
  124. data/doc/ex/emboss.rb +0 -11
  125. data/doc/ex/enhance.rb +0 -28
  126. data/doc/ex/equalize.rb +0 -11
  127. data/doc/ex/evenodd.rb +0 -42
  128. data/doc/ex/fill_pattern.rb +0 -23
  129. data/doc/ex/flatten_images.rb +0 -36
  130. data/doc/ex/flip.rb +0 -11
  131. data/doc/ex/flop.rb +0 -11
  132. data/doc/ex/font_styles.rb +0 -32
  133. data/doc/ex/fonts.rb +0 -16
  134. data/doc/ex/frame.rb +0 -12
  135. data/doc/ex/gaussian_blur.rb +0 -11
  136. data/doc/ex/get_multiline_type_metrics.rb +0 -41
  137. data/doc/ex/get_pixels.rb +0 -45
  138. data/doc/ex/get_type_metrics.rb +0 -142
  139. data/doc/ex/gradientfill.rb +0 -27
  140. data/doc/ex/grav.rb +0 -45
  141. data/doc/ex/gravity.rb +0 -78
  142. data/doc/ex/group.rb +0 -26
  143. data/doc/ex/hatchfill.rb +0 -27
  144. data/doc/ex/image.rb +0 -44
  145. data/doc/ex/images/Apple.miff +0 -0
  146. data/doc/ex/images/Ballerina.jpg +0 -0
  147. data/doc/ex/images/Ballerina3.jpg +0 -0
  148. data/doc/ex/images/Button_0.gif +0 -0
  149. data/doc/ex/images/Button_1.gif +0 -0
  150. data/doc/ex/images/Button_2.gif +0 -0
  151. data/doc/ex/images/Button_3.gif +0 -0
  152. data/doc/ex/images/Button_4.gif +0 -0
  153. data/doc/ex/images/Button_5.gif +0 -0
  154. data/doc/ex/images/Button_6.gif +0 -0
  155. data/doc/ex/images/Button_7.gif +0 -0
  156. data/doc/ex/images/Button_8.gif +0 -0
  157. data/doc/ex/images/Button_9.gif +0 -0
  158. data/doc/ex/images/Button_A.gif +0 -0
  159. data/doc/ex/images/Button_B.gif +0 -0
  160. data/doc/ex/images/Button_C.gif +0 -0
  161. data/doc/ex/images/Button_D.gif +0 -0
  162. data/doc/ex/images/Button_E.gif +0 -0
  163. data/doc/ex/images/Button_F.gif +0 -0
  164. data/doc/ex/images/Button_G.gif +0 -0
  165. data/doc/ex/images/Button_H.gif +0 -0
  166. data/doc/ex/images/Button_I.gif +0 -0
  167. data/doc/ex/images/Button_J.gif +0 -0
  168. data/doc/ex/images/Button_K.gif +0 -0
  169. data/doc/ex/images/Button_L.gif +0 -0
  170. data/doc/ex/images/Button_M.gif +0 -0
  171. data/doc/ex/images/Button_N.gif +0 -0
  172. data/doc/ex/images/Button_O.gif +0 -0
  173. data/doc/ex/images/Button_P.gif +0 -0
  174. data/doc/ex/images/Button_Q.gif +0 -0
  175. data/doc/ex/images/Button_R.gif +0 -0
  176. data/doc/ex/images/Button_S.gif +0 -0
  177. data/doc/ex/images/Button_T.gif +0 -0
  178. data/doc/ex/images/Button_U.gif +0 -0
  179. data/doc/ex/images/Button_V.gif +0 -0
  180. data/doc/ex/images/Button_W.gif +0 -0
  181. data/doc/ex/images/Button_X.gif +0 -0
  182. data/doc/ex/images/Button_Y.gif +0 -0
  183. data/doc/ex/images/Button_Z.gif +0 -0
  184. data/doc/ex/images/Cheetah.jpg +0 -0
  185. data/doc/ex/images/Coffee.png +0 -0
  186. data/doc/ex/images/Flower_Hat.jpg +0 -0
  187. data/doc/ex/images/Gold_Statue.jpg +0 -0
  188. data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
  189. data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
  190. data/doc/ex/images/Leaf.miff +0 -0
  191. data/doc/ex/images/No.png +0 -0
  192. data/doc/ex/images/Polynesia.jpg +0 -0
  193. data/doc/ex/images/Red_Rocks.jpg +0 -0
  194. data/doc/ex/images/Rocks_On_Beach.miff +0 -0
  195. data/doc/ex/images/Shorts.jpg +0 -0
  196. data/doc/ex/images/Snake.png +0 -0
  197. data/doc/ex/images/Violin.jpg +0 -0
  198. data/doc/ex/images/Yellow_Rose.miff +0 -0
  199. data/doc/ex/images/big-duck.gif +0 -0
  200. data/doc/ex/images/duck.gif +0 -0
  201. data/doc/ex/images/duck0.gif +0 -0
  202. data/doc/ex/images/duck1.gif +0 -0
  203. data/doc/ex/images/duck10.gif +0 -0
  204. data/doc/ex/images/duck11.gif +0 -0
  205. data/doc/ex/images/duck12.gif +0 -0
  206. data/doc/ex/images/duck13.gif +0 -0
  207. data/doc/ex/images/duck14.gif +0 -0
  208. data/doc/ex/images/duck15.gif +0 -0
  209. data/doc/ex/images/duck2.gif +0 -0
  210. data/doc/ex/images/duck3.gif +0 -0
  211. data/doc/ex/images/duck4.gif +0 -0
  212. data/doc/ex/images/duck5.gif +0 -0
  213. data/doc/ex/images/duck6.gif +0 -0
  214. data/doc/ex/images/duck7.gif +0 -0
  215. data/doc/ex/images/duck8.gif +0 -0
  216. data/doc/ex/images/duck9.gif +0 -0
  217. data/doc/ex/images/graydient230x6.gif +0 -0
  218. data/doc/ex/images/image_with_profile.jpg +0 -0
  219. data/doc/ex/images/logo400x83.gif +0 -0
  220. data/doc/ex/images/model.miff +0 -0
  221. data/doc/ex/images/notimplemented.gif +0 -0
  222. data/doc/ex/images/smile.miff +0 -0
  223. data/doc/ex/images/spin.gif +0 -0
  224. data/doc/ex/implode.rb +0 -34
  225. data/doc/ex/level.rb +0 -11
  226. data/doc/ex/level_colors.rb +0 -11
  227. data/doc/ex/line.rb +0 -41
  228. data/doc/ex/line01.rb +0 -21
  229. data/doc/ex/mask.rb +0 -35
  230. data/doc/ex/matte_fill_to_border.rb +0 -39
  231. data/doc/ex/matte_floodfill.rb +0 -32
  232. data/doc/ex/matte_replace.rb +0 -39
  233. data/doc/ex/median_filter.rb +0 -28
  234. data/doc/ex/modulate.rb +0 -11
  235. data/doc/ex/mono.rb +0 -23
  236. data/doc/ex/morph.rb +0 -25
  237. data/doc/ex/mosaic.rb +0 -37
  238. data/doc/ex/motion_blur.rb +0 -11
  239. data/doc/ex/negate.rb +0 -11
  240. data/doc/ex/negate_channel.rb +0 -9
  241. data/doc/ex/nested_rvg.rb +0 -21
  242. data/doc/ex/nonzero.rb +0 -42
  243. data/doc/ex/normalize.rb +0 -11
  244. data/doc/ex/oil_paint.rb +0 -11
  245. data/doc/ex/opacity.rb +0 -37
  246. data/doc/ex/ordered_dither.rb +0 -11
  247. data/doc/ex/path.rb +0 -63
  248. data/doc/ex/pattern1.rb +0 -25
  249. data/doc/ex/pattern2.rb +0 -26
  250. data/doc/ex/polaroid.rb +0 -26
  251. data/doc/ex/polygon.rb +0 -23
  252. data/doc/ex/polygon01.rb +0 -21
  253. data/doc/ex/polyline.rb +0 -22
  254. data/doc/ex/polyline01.rb +0 -21
  255. data/doc/ex/posterize.rb +0 -8
  256. data/doc/ex/preview.rb +0 -8
  257. data/doc/ex/qbezierpath.rb +0 -52
  258. data/doc/ex/quad01.rb +0 -34
  259. data/doc/ex/quantize-m.rb +0 -25
  260. data/doc/ex/radial_blur.rb +0 -9
  261. data/doc/ex/raise.rb +0 -8
  262. data/doc/ex/random_threshold_channel.rb +0 -13
  263. data/doc/ex/rect01.rb +0 -14
  264. data/doc/ex/rect02.rb +0 -20
  265. data/doc/ex/rectangle.rb +0 -34
  266. data/doc/ex/reduce_noise.rb +0 -28
  267. data/doc/ex/remap.rb +0 -11
  268. data/doc/ex/remap_images.rb +0 -19
  269. data/doc/ex/resize_to_fill.rb +0 -8
  270. data/doc/ex/resize_to_fit.rb +0 -8
  271. data/doc/ex/roll.rb +0 -9
  272. data/doc/ex/rotate.rb +0 -44
  273. data/doc/ex/rotate_f.rb +0 -14
  274. data/doc/ex/roundrect.rb +0 -33
  275. data/doc/ex/rubyname.rb +0 -30
  276. data/doc/ex/rvg_clippath.rb +0 -12
  277. data/doc/ex/rvg_linecap.rb +0 -42
  278. data/doc/ex/rvg_linejoin.rb +0 -40
  279. data/doc/ex/rvg_opacity.rb +0 -18
  280. data/doc/ex/rvg_pattern.rb +0 -26
  281. data/doc/ex/rvg_stroke_dasharray.rb +0 -11
  282. data/doc/ex/segment.rb +0 -11
  283. data/doc/ex/sepiatone.rb +0 -7
  284. data/doc/ex/shade.rb +0 -11
  285. data/doc/ex/shadow.rb +0 -30
  286. data/doc/ex/shave.rb +0 -15
  287. data/doc/ex/shear.rb +0 -10
  288. data/doc/ex/sketch.rb +0 -17
  289. data/doc/ex/skewx.rb +0 -51
  290. data/doc/ex/skewy.rb +0 -47
  291. data/doc/ex/smile.rb +0 -126
  292. data/doc/ex/solarize.rb +0 -11
  293. data/doc/ex/sparse_color.rb +0 -55
  294. data/doc/ex/splice.rb +0 -8
  295. data/doc/ex/spread.rb +0 -11
  296. data/doc/ex/stegano.rb +0 -54
  297. data/doc/ex/stroke_dasharray.rb +0 -42
  298. data/doc/ex/stroke_fill.rb +0 -10
  299. data/doc/ex/stroke_linecap.rb +0 -44
  300. data/doc/ex/stroke_linejoin.rb +0 -48
  301. data/doc/ex/stroke_width.rb +0 -49
  302. data/doc/ex/swirl.rb +0 -17
  303. data/doc/ex/text.rb +0 -37
  304. data/doc/ex/text01.rb +0 -16
  305. data/doc/ex/text_align.rb +0 -36
  306. data/doc/ex/text_antialias.rb +0 -37
  307. data/doc/ex/text_styles.rb +0 -19
  308. data/doc/ex/text_undercolor.rb +0 -28
  309. data/doc/ex/texture_fill_to_border.rb +0 -34
  310. data/doc/ex/texture_floodfill.rb +0 -32
  311. data/doc/ex/texturefill.rb +0 -24
  312. data/doc/ex/threshold.rb +0 -13
  313. data/doc/ex/to_blob.rb +0 -13
  314. data/doc/ex/translate.rb +0 -39
  315. data/doc/ex/transparent.rb +0 -38
  316. data/doc/ex/transpose.rb +0 -9
  317. data/doc/ex/transverse.rb +0 -9
  318. data/doc/ex/tref01.rb +0 -24
  319. data/doc/ex/triangle01.rb +0 -15
  320. data/doc/ex/trim.rb +0 -23
  321. data/doc/ex/tspan01.rb +0 -17
  322. data/doc/ex/tspan02.rb +0 -17
  323. data/doc/ex/tspan03.rb +0 -19
  324. data/doc/ex/unsharp_mask.rb +0 -28
  325. data/doc/ex/viewex.rb +0 -33
  326. data/doc/ex/vignette.rb +0 -12
  327. data/doc/ex/watermark.rb +0 -27
  328. data/doc/ex/wave.rb +0 -9
  329. data/doc/ex/wet_floor.rb +0 -58
  330. data/doc/ex/writing_mode01.rb +0 -26
  331. data/doc/ex/writing_mode02.rb +0 -26
  332. data/doc/ilist.html +0 -2056
  333. data/doc/image1.html +0 -4680
  334. data/doc/image2.html +0 -3665
  335. data/doc/image3.html +0 -4522
  336. data/doc/imageattrs.html +0 -1638
  337. data/doc/imusage.html +0 -514
  338. data/doc/index.html +0 -416
  339. data/doc/info.html +0 -1499
  340. data/doc/magick.html +0 -570
  341. data/doc/optequiv.html +0 -2435
  342. data/doc/rvg.html +0 -975
  343. data/doc/rvgclip.html +0 -248
  344. data/doc/rvggroup.html +0 -305
  345. data/doc/rvgimage.html +0 -289
  346. data/doc/rvgpattern.html +0 -475
  347. data/doc/rvgshape.html +0 -406
  348. data/doc/rvgstyle.html +0 -270
  349. data/doc/rvgtext.html +0 -465
  350. data/doc/rvgtspan.html +0 -238
  351. data/doc/rvgtut.html +0 -530
  352. data/doc/rvguse.html +0 -145
  353. data/doc/rvgxform.html +0 -294
  354. data/doc/scripts/doc.js +0 -22
  355. data/doc/scripts/stripeTables.js +0 -23
  356. data/doc/struct.html +0 -1339
  357. data/doc/usage.html +0 -1621
  358. data/examples/constitute.rb +0 -7
  359. data/examples/crop_with_gravity.rb +0 -43
  360. data/examples/demo.rb +0 -323
  361. data/examples/describe.rb +0 -41
  362. data/examples/find_similar_region.rb +0 -34
  363. data/examples/histogram.rb +0 -312
  364. data/examples/identify.rb +0 -174
  365. data/examples/image_opacity.rb +0 -28
  366. data/examples/import_export.rb +0 -31
  367. data/examples/pattern_fill.rb +0 -37
  368. data/examples/rotating_text.rb +0 -45
  369. data/examples/spinner.rb +0 -49
  370. data/examples/thumbnail.rb +0 -64
  371. data/examples/vignette.rb +0 -78
  372. data/spec/rmagick/ImageList1_spec.rb +0 -24
  373. data/spec/rmagick/draw_spec.rb +0 -155
  374. data/spec/rmagick/image/blue_shift_spec.rb +0 -14
  375. data/spec/rmagick/image/channel_entropy_spec.rb +0 -9
  376. data/spec/rmagick/image/composite_spec.rb +0 -72
  377. data/spec/rmagick/image/constitute_spec.rb +0 -13
  378. data/spec/rmagick/image/dispatch_spec.rb +0 -16
  379. data/spec/rmagick/image/dissolve_spec.rb +0 -54
  380. data/spec/rmagick/image/from_blob_spec.rb +0 -12
  381. data/spec/rmagick/image/ping_spec.rb +0 -12
  382. data/spec/rmagick/image/properties_spec.rb +0 -27
  383. data/spec/rmagick/image/read_spec.rb +0 -28
  384. data/spec/spec_helper.rb +0 -9
  385. data/spec/support/issue_200/app.rb +0 -8
  386. data/test/Draw.rb +0 -351
  387. data/test/Enum.rb +0 -228
  388. data/test/Fill.rb +0 -93
  389. data/test/Image1.rb +0 -606
  390. data/test/Image2.rb +0 -1408
  391. data/test/Image3.rb +0 -1086
  392. data/test/ImageList1.rb +0 -858
  393. data/test/ImageList2.rb +0 -375
  394. data/test/Image_attributes.rb +0 -635
  395. data/test/Import_Export.rb +0 -111
  396. data/test/Info.rb +0 -436
  397. data/test/KernelInfo.rb +0 -59
  398. data/test/Magick.rb +0 -311
  399. data/test/Pixel.rb +0 -259
  400. data/test/PolaroidOptions.rb +0 -23
  401. data/test/Preview.rb +0 -26
  402. data/test/Struct.rb +0 -45
  403. data/test/appearance/Montage.rb +0 -26
  404. data/test/appearance/appearance_assertion.rb +0 -13
  405. data/test/appearance/expected/montage_border_color.jpg +0 -0
  406. data/test/cmyk.icm +0 -0
  407. data/test/lib/internal/Draw.rb +0 -811
  408. data/test/lib/internal/Geometry.rb +0 -98
  409. data/test/lib/internal/Magick.rb +0 -40
  410. data/test/srgb.icm +0 -0
  411. data/test/test_all_basic.rb +0 -49
  412. data/test/tmpnam_test.rb +0 -50
@@ -16,7 +16,6 @@ static Image *clone_imagelist(Image *);
16
16
  static Image *images_from_imagelist(VALUE);
17
17
  static long imagelist_length(VALUE);
18
18
  static long check_imagelist_length(VALUE);
19
- static VALUE imagelist_scene_eq(VALUE, VALUE);
20
19
  static void imagelist_push(VALUE, VALUE);
21
20
  static VALUE ImageList_new(void);
22
21
 
@@ -26,17 +25,15 @@ static VALUE ImageList_new(void);
26
25
 
27
26
  /**
28
27
  * Repeatedly display the images in the images array to an XWindow screen. The
29
- * "delay" argument is the number of 1/100ths of a second (0 to 65535) to delay
28
+ * +delay+ argument is the number of 1/100ths of a second (0 to 65535) to delay
30
29
  * between images.
31
30
  *
32
- * Ruby usage:
33
- * - @verbatim ImageList#animate @endverbatim
34
- * - @verbatim ImageList#animate(delay) @endverbatim
31
+ * @overload animate
35
32
  *
36
- * @param argc number of input arguments
37
- * @param argv array of input arguments
38
- * @param self this object
39
- * @return self
33
+ * @overload animate(delay)
34
+ * @param delay [Numeric] the length of time between each image in an animation
35
+ *
36
+ * @return [Magick::ImageList] self
40
37
  */
41
38
 
42
39
  VALUE
@@ -78,12 +75,12 @@ ImageList_animate(int argc, VALUE *argv, VALUE self)
78
75
  Data_Get_Struct(info_obj, Info, info);
79
76
  #if defined(IMAGEMAGICK_7)
80
77
  exception = AcquireExceptionInfo();
81
- (void) AnimateImages(info, images, exception);
78
+ AnimateImages(info, images, exception);
82
79
  rm_split(images);
83
- CHECK_EXCEPTION()
84
- (void) DestroyExceptionInfo(exception);
80
+ CHECK_EXCEPTION();
81
+ DestroyExceptionInfo(exception);
85
82
  #else
86
- (void) AnimateImages(info, images);
83
+ AnimateImages(info, images);
87
84
  rm_split(images);
88
85
  rm_check_image_exception(images, RetainOnError);
89
86
  #endif
@@ -95,14 +92,10 @@ ImageList_animate(int argc, VALUE *argv, VALUE self)
95
92
 
96
93
 
97
94
  /**
98
- * Append all the images by calling ImageAppend.
99
- *
100
- * Ruby usage:
101
- * - @verbatim ImageList#append(stack) @endverbatim
95
+ * Append all the images
102
96
  *
103
- * @param self this object
104
- * @param stack_arg the stack of images
105
- * @return a Frame object for the result
97
+ * @param stack_arg [Magick::ImageList] the stack of images
98
+ * @return [Magick::Image] a frame object for the result
106
99
  */
107
100
  VALUE
108
101
  ImageList_append(VALUE self, VALUE stack_arg)
@@ -122,22 +115,16 @@ ImageList_append(VALUE self, VALUE stack_arg)
122
115
  new_image = AppendImages(images, stack, exception);
123
116
  rm_split(images);
124
117
  rm_check_exception(exception, new_image, DestroyOnError);
125
- (void) DestroyExceptionInfo(exception);
126
-
127
- rm_ensure_result(new_image);
118
+ DestroyExceptionInfo(exception);
128
119
 
129
120
  return rm_image_new(new_image);
130
121
  }
131
122
 
132
123
 
133
124
  /**
134
- * Average all images together by calling AverageImages.
135
- *
136
- * Ruby usage:
137
- * - @verbatim ImageList#average @endverbatim
125
+ * Average all images together
138
126
  *
139
- * @param self this object
140
- * @return a Frame object for the averaged image
127
+ * @return [Magick::Image] a frame object for the averaged image
141
128
  */
142
129
  VALUE
143
130
  ImageList_average(VALUE self)
@@ -153,26 +140,19 @@ ImageList_average(VALUE self)
153
140
 
154
141
  rm_split(images);
155
142
  rm_check_exception(exception, new_image, DestroyOnError);
156
- (void) DestroyExceptionInfo(exception);
157
-
158
- rm_ensure_result(new_image);
143
+ DestroyExceptionInfo(exception);
159
144
 
160
145
  return rm_image_new(new_image);
161
146
  }
162
147
 
163
148
 
164
149
  /**
165
- * Call CoalesceImages.
166
- *
167
- * Ruby usage:
168
- * - @verbatim ImageList#coalesce @endverbatim
150
+ * Composites a set of images while respecting any page offsets and disposal methods.
169
151
  *
170
- * Notes:
171
- * - Respects the delay, matte, and start_loop fields in each image.
152
+ * - Respects the delay, matte, and start_loop fields in each image.
172
153
  *
173
- * @param self this object
174
- * @return a new Image with the coalesced image sequence return stored in the
175
- * images array
154
+ * @return [Magick::ImageList] a new image with the coalesced image sequence return stored in the
155
+ * images array
176
156
  */
177
157
  VALUE
178
158
  ImageList_coalesce(VALUE self)
@@ -187,9 +167,7 @@ ImageList_coalesce(VALUE self)
187
167
  new_images = CoalesceImages(images, exception);
188
168
  rm_split(images);
189
169
  rm_check_exception(exception, new_images, DestroyOnError);
190
- (void) DestroyExceptionInfo(exception);
191
-
192
- rm_ensure_result(new_images);
170
+ DestroyExceptionInfo(exception);
193
171
 
194
172
  return rm_imagelist_from_images(new_images);
195
173
  }
@@ -198,24 +176,20 @@ ImageList_coalesce(VALUE self)
198
176
  /**
199
177
  * Combines the images using the specified colorspace.
200
178
  *
201
- * Ruby usage:
202
- * - @verbatim new_image = ImageList#combine @endverbatim
203
- * - @verbatim new_image = ImageList#combine(colorspace) @endverbatim
179
+ * @overload combine
204
180
  *
205
- * Notes:
206
- * - Calls CombineImages.
181
+ * @overload combine(colorspace)
182
+ * @param colorspace [Magick::ColorspaceType] the colorspace
207
183
  *
208
- * @param argc number of input arguments
209
- * @param argv array of input arguments
210
- * @param self this object
211
- * @return a new image
184
+ * @return [Magick::Image] a new image
212
185
  */
213
186
  VALUE ImageList_combine(int argc, VALUE *argv, VALUE self)
214
187
  {
215
188
  #if defined(IMAGEMAGICK_6)
216
189
  ChannelType channel;
190
+ ColorspaceType old_colorspace;
217
191
  #endif
218
- ColorspaceType colorspace, old_colorspace;
192
+ ColorspaceType colorspace;
219
193
  long len;
220
194
  Image *images, *new_image;
221
195
  ExceptionInfo *exception;
@@ -288,29 +262,24 @@ VALUE ImageList_combine(int argc, VALUE *argv, VALUE self)
288
262
  images->colorspace = old_colorspace;
289
263
  #endif
290
264
  rm_check_exception(exception, new_image, DestroyOnError);
291
- (void) DestroyExceptionInfo(exception);
292
-
293
- rm_ensure_result(new_image);
265
+ DestroyExceptionInfo(exception);
294
266
 
295
267
  return rm_image_new(new_image);
296
268
  }
297
269
 
298
270
 
299
271
  /**
300
- * Equivalent to convert's -layers composite option.
272
+ * An image from source images is composited over an image from receiver's list until one list is finished.
301
273
  *
302
- * Ruby usage:
303
- * - @verbatim ImageList#composite_layers(images) @endverbatim
304
- * - @verbatim ImageList#composite_layers(images,operator) @endverbatim
274
+ * @overload composite_layers(images)
275
+ * @param images [Magick::ImageList] the source images
305
276
  *
306
- * Notes:
307
- * - Default operator is OverCompositeOp
277
+ * @overload composite_layers(images, operator)
278
+ * - Default operator is {Magick::OverCompositeOp}
279
+ * @param images [Magick::ImageList] the source images
280
+ * @param operator [Magick::CompositeOperator] the operator
308
281
  *
309
- * @param argc number of input arguments
310
- * @param argv array of input arguments
311
- * @param self this object
312
- * @return a new imagelist
313
- * @see mogrify.c in ImageMagick
282
+ * @return [Magick::ImageList] a new imagelist
314
283
  */
315
284
  VALUE
316
285
  ImageList_composite_layers(int argc, VALUE *argv, VALUE self)
@@ -340,20 +309,20 @@ ImageList_composite_layers(int argc, VALUE *argv, VALUE self)
340
309
 
341
310
  source = images_from_imagelist(source_images);
342
311
 
343
- SetGeometry(new_images,&geometry);
344
- (void) ParseAbsoluteGeometry(new_images->geometry, &geometry);
312
+ SetGeometry(new_images, &geometry);
313
+ ParseAbsoluteGeometry(new_images->geometry, &geometry);
345
314
 
346
315
  geometry.width = source->page.width != 0 ? source->page.width : source->columns;
347
316
  geometry.height = source->page.height != 0 ? source->page.height : source->rows;
348
- GravityAdjustGeometry(new_images->page.width != 0 ? new_images->page.width : new_images->columns
349
- , new_images->page.height != 0 ? new_images->page.height : new_images->rows
350
- , new_images->gravity, &geometry);
317
+ GravityAdjustGeometry(new_images->page.width != 0 ? new_images->page.width : new_images->columns,
318
+ new_images->page.height != 0 ? new_images->page.height : new_images->rows,
319
+ new_images->gravity, &geometry);
351
320
 
352
321
  exception = AcquireExceptionInfo();
353
322
  CompositeLayers(new_images, operator, source, geometry.x, geometry.y, exception);
354
323
  rm_split(source);
355
324
  rm_check_exception(exception, new_images, DestroyOnError);
356
- (void) DestroyExceptionInfo(exception);
325
+ DestroyExceptionInfo(exception);
357
326
 
358
327
  RB_GC_GUARD(source_images);
359
328
 
@@ -365,11 +334,7 @@ ImageList_composite_layers(int argc, VALUE *argv, VALUE self)
365
334
  * Compare each image with the next in a sequence and returns the maximum
366
335
  * bounding region of any pixel differences it discovers.
367
336
  *
368
- * Ruby usage:
369
- * - @verbatim ImageList#deconstruct @endverbatim
370
- *
371
- * @param self this object
372
- * @return a new imagelist
337
+ * @return [Magick::ImageList] a new imagelist
373
338
  */
374
339
  VALUE
375
340
  ImageList_deconstruct(VALUE self)
@@ -386,9 +351,7 @@ ImageList_deconstruct(VALUE self)
386
351
  #endif
387
352
  rm_split(images);
388
353
  rm_check_exception(exception, new_images, DestroyOnError);
389
- (void) DestroyExceptionInfo(exception);
390
-
391
- rm_ensure_result(new_images);
354
+ DestroyExceptionInfo(exception);
392
355
 
393
356
  return rm_imagelist_from_images(new_images);
394
357
  }
@@ -397,11 +360,7 @@ ImageList_deconstruct(VALUE self)
397
360
  /**
398
361
  * Display all the images to an X window screen.
399
362
  *
400
- * Ruby usage:
401
- * - @verbatim ImageList#display @endverbatim
402
- *
403
- * @param self this object
404
- * @return self
363
+ * @return [Magick::ImageList] self
405
364
  */
406
365
  VALUE
407
366
  ImageList_display(VALUE self)
@@ -421,12 +380,12 @@ ImageList_display(VALUE self)
421
380
  images = images_from_imagelist(self);
422
381
  #if defined(IMAGEMAGICK_7)
423
382
  exception = AcquireExceptionInfo();
424
- (void) DisplayImages(info, images, exception);
383
+ DisplayImages(info, images, exception);
425
384
  rm_split(images);
426
385
  CHECK_EXCEPTION();
427
- (void) DestroyExceptionInfo(exception);
386
+ DestroyExceptionInfo(exception);
428
387
  #else
429
- (void) DisplayImages(info, images);
388
+ DisplayImages(info, images);
430
389
  rm_split(images);
431
390
  rm_check_image_exception(images, RetainOnError);
432
391
  #endif
@@ -440,14 +399,7 @@ ImageList_display(VALUE self)
440
399
  /**
441
400
  * Merge all the images into a single image.
442
401
  *
443
- * Ruby usage:
444
- * - @verbatim ImageList#flatten_images @endverbatim
445
- *
446
- * Notes:
447
- * - Can't use "flatten" because that's an Array method
448
- *
449
- * @param self this object
450
- * @return the new image
402
+ * @return [Magick::ImageList] the new image
451
403
  */
452
404
  VALUE
453
405
  ImageList_flatten_images(VALUE self)
@@ -462,26 +414,23 @@ ImageList_flatten_images(VALUE self)
462
414
 
463
415
  rm_split(images);
464
416
  rm_check_exception(exception, new_image, DestroyOnError);
465
- (void) DestroyExceptionInfo(exception);
466
-
467
- rm_ensure_result(new_image);
417
+ DestroyExceptionInfo(exception);
468
418
 
469
419
  return rm_image_new(new_image);
470
420
  }
471
421
 
472
422
 
473
423
  /**
474
- * Call MontageImages.
424
+ * Tile one or more thumbnails across an image canvas.
475
425
  *
476
- * Ruby usage:
477
- * - @verbatim ImageList#montage <{parm block}> @endverbatim
426
+ * @overload montage
478
427
  *
479
- * Notes:
480
- * - Creates Montage object, yields to block if present in Montage object's
481
- * scope.
482
- *
483
- * @param self this object
484
- * @return a new image list
428
+ * @overload montage
429
+ * Creates {Magick::ImageList::Montage} object, yields to block
430
+ * if present in {Magick::ImageList::Montage} object's scope.
431
+ * @yield []
432
+ *
433
+ * @return [Magick::ImageList] a new image list
485
434
  */
486
435
  VALUE
487
436
  ImageList_montage(VALUE self)
@@ -497,7 +446,7 @@ ImageList_montage(VALUE self)
497
446
  {
498
447
  // Run the block in the instance's context, allowing the app to modify the
499
448
  // object's attributes.
500
- (void) rb_obj_instance_eval(0, NULL, montage_obj);
449
+ rb_obj_instance_eval(0, NULL, montage_obj);
501
450
  }
502
451
 
503
452
  Data_Get_Struct(montage_obj, Montage, montage);
@@ -522,9 +471,7 @@ ImageList_montage(VALUE self)
522
471
  new_images = MontageImages(images, montage->info, exception);
523
472
  rm_split(images);
524
473
  rm_check_exception(exception, new_images, DestroyOnError);
525
- (void) DestroyExceptionInfo(exception);
526
-
527
- rm_ensure_result(new_images);
474
+ DestroyExceptionInfo(exception);
528
475
 
529
476
  RB_GC_GUARD(montage_obj);
530
477
 
@@ -534,17 +481,11 @@ ImageList_montage(VALUE self)
534
481
 
535
482
  /**
536
483
  * Requires a minimum of two images. The first image is transformed into the
537
- * second by a number of intervening images as specified by "number_images".
484
+ * second by a number of intervening images as specified by "nimages".
538
485
  *
539
- * Ruby usage:
540
- * - @verbatim ImageList#morph(number_images) @endverbatim
541
- *
542
- * Notes:
543
- * - Sets \@scenes to 0
544
- *
545
- * @param self this object
546
- * @param nimages the number of images
547
- * @return a new image list with the images array set to the morph sequence.
486
+ * @note Sets +@scenes+ to 0
487
+ * @param nimages [Numeric] the number of images
488
+ * @return [Magick::ImageList] a new image list with the images array set to the morph sequence.
548
489
  */
549
490
  VALUE
550
491
  ImageList_morph(VALUE self, VALUE nimages)
@@ -566,9 +507,7 @@ ImageList_morph(VALUE self, VALUE nimages)
566
507
  new_images = MorphImages(images, (unsigned long)number_images, exception);
567
508
  rm_split(images);
568
509
  rm_check_exception(exception, new_images, DestroyOnError);
569
- (void) DestroyExceptionInfo(exception);
570
-
571
- rm_ensure_result(new_images);
510
+ DestroyExceptionInfo(exception);
572
511
 
573
512
  return rm_imagelist_from_images(new_images);
574
513
  }
@@ -577,11 +516,7 @@ ImageList_morph(VALUE self, VALUE nimages)
577
516
  /**
578
517
  * Merge all the images into a single image.
579
518
  *
580
- * Ruby usage:
581
- * - @verbatim ImageList#mosaic @endverbatim
582
- *
583
- * @param self this object
584
- * @return the new image
519
+ * @return [Magick::Image] the new image
585
520
  */
586
521
  VALUE
587
522
  ImageList_mosaic(VALUE self)
@@ -596,23 +531,18 @@ ImageList_mosaic(VALUE self)
596
531
 
597
532
  rm_split(images);
598
533
  rm_check_exception(exception, new_image, DestroyOnError);
599
- (void) DestroyExceptionInfo(exception);
600
-
601
- rm_ensure_result(new_image);
534
+ DestroyExceptionInfo(exception);
602
535
 
603
536
  return rm_image_new(new_image);
604
537
  }
605
538
 
606
539
 
607
540
  /**
608
- * Equivalent to -layers option in ImageMagick 6.2.6.
541
+ * Optimizes or compares the images in the list.
542
+ * Equivalent to the -layers option in ImageMagick's mogrify command.
609
543
  *
610
- * Ruby usage:
611
- * - @verbatim ImageList#optimize_layers(method) @endverbatim
612
- *
613
- * @param self this object
614
- * @param method the method to use
615
- * @return a new imagelist
544
+ * @param method [Magick::LayerMethod] the method to use
545
+ * @return [Magick::ImageList] a new imagelist
616
546
  */
617
547
  VALUE
618
548
  ImageList_optimize_layers(VALUE self, VALUE method)
@@ -650,7 +580,7 @@ ImageList_optimize_layers(VALUE self, VALUE method)
650
580
  break;
651
581
  case CompositeLayer:
652
582
  rm_split(images);
653
- (void) DestroyExceptionInfo(exception);
583
+ DestroyExceptionInfo(exception);
654
584
  rb_raise(rb_eNotImpError, "Magick::CompositeLayer is not supported. Use the composite_layers method instead.");
655
585
  break;
656
586
  // In 6.3.4-ish, OptimizeImageLayer replaced OptimizeLayer
@@ -671,9 +601,9 @@ ImageList_optimize_layers(VALUE self, VALUE method)
671
601
  // mogrify supports -dither here. We don't.
672
602
  GetQuantizeInfo(&quantize_info);
673
603
  #if defined(IMAGEMAGICK_7)
674
- (void) RemapImages(&quantize_info, new_images, NULL, exception);
604
+ RemapImages(&quantize_info, new_images, NULL, exception);
675
605
  #else
676
- (void) RemapImages(&quantize_info, new_images, NULL);
606
+ RemapImages(&quantize_info, new_images, NULL);
677
607
  #endif
678
608
  break;
679
609
  case OptimizePlusLayer:
@@ -702,16 +632,14 @@ ImageList_optimize_layers(VALUE self, VALUE method)
702
632
  break;
703
633
  default:
704
634
  rm_split(images);
705
- (void) DestroyExceptionInfo(exception);
635
+ DestroyExceptionInfo(exception);
706
636
  rb_raise(rb_eArgError, "undefined layer method");
707
637
  break;
708
638
  }
709
639
 
710
640
  rm_split(images);
711
641
  rm_check_exception(exception, new_images, DestroyOnError);
712
- (void) DestroyExceptionInfo(exception);
713
-
714
- rm_ensure_result(new_images);
642
+ DestroyExceptionInfo(exception);
715
643
 
716
644
  return rm_imagelist_from_images(new_images);
717
645
  }
@@ -750,22 +678,20 @@ VALUE
750
678
  rm_imagelist_from_images(Image *images)
751
679
  {
752
680
  VALUE new_imagelist;
753
- Image *image;
754
681
 
755
- if (!images)
756
- {
757
- rb_bug("rm_imagelist_from_images called with NULL argument");
758
- }
682
+ rm_ensure_result(images);
759
683
 
760
684
  new_imagelist = ImageList_new();
761
685
 
762
686
  while (images)
763
687
  {
688
+ Image *image;
689
+
764
690
  image = RemoveFirstImageFromList(&images);
765
691
  imagelist_push(new_imagelist, rm_image_new(image));
766
692
  }
767
693
 
768
- (void) rb_iv_set(new_imagelist, "@scene", INT2FIX(0));
694
+ rb_iv_set(new_imagelist, "@scene", INT2FIX(0));
769
695
 
770
696
  RB_GC_GUARD(new_imagelist);
771
697
 
@@ -803,6 +729,9 @@ images_from_imagelist(VALUE imagelist)
803
729
  if (head == image || GetPreviousImageInList(image) != NULL)
804
730
  {
805
731
  image = rm_clone_image(image);
732
+
733
+ // Wrap raw ImageMagick object by Ruby object to destroy using Ruby's GC.
734
+ rm_image_new(image);
806
735
  }
807
736
  AppendImageToList(&head, image);
808
737
  }
@@ -814,24 +743,6 @@ images_from_imagelist(VALUE imagelist)
814
743
  }
815
744
 
816
745
 
817
- /**
818
- * \@scene attribute writer.
819
- *
820
- * No Ruby usage (internal function)
821
- *
822
- * @param imagelist the imagelist
823
- * @param scene the scene
824
- * @return the scene
825
- */
826
- static VALUE
827
- imagelist_scene_eq(VALUE imagelist, VALUE scene)
828
- {
829
- rb_check_frozen(imagelist);
830
- (void) rb_iv_set(imagelist, "@scene", scene);
831
- return scene;
832
- }
833
-
834
-
835
746
  /**
836
747
  * return the # of images in an imagelist.
837
748
  *
@@ -890,7 +801,7 @@ static void
890
801
  imagelist_push(VALUE imagelist, VALUE image)
891
802
  {
892
803
  rb_check_frozen(imagelist);
893
- (void) rb_funcall(imagelist, rm_ID_push, 1, image);
804
+ rb_funcall(imagelist, rm_ID_push, 1, image);
894
805
  }
895
806
 
896
807
 
@@ -905,7 +816,7 @@ imagelist_push(VALUE imagelist, VALUE image)
905
816
  static Image *
906
817
  clone_imagelist(Image *images)
907
818
  {
908
- Image *new_imagelist = NULL, *image, *clone;
819
+ Image *new_imagelist = NULL, *image;
909
820
  ExceptionInfo *exception;
910
821
 
911
822
  exception = AcquireExceptionInfo();
@@ -913,40 +824,31 @@ clone_imagelist(Image *images)
913
824
  image = GetFirstImageInList(images);
914
825
  while (image)
915
826
  {
827
+ Image *clone;
828
+
916
829
  clone = CloneImage(image, 0, 0, MagickTrue, exception);
917
830
  rm_check_exception(exception, new_imagelist, DestroyOnError);
918
831
  AppendImageToList(&new_imagelist, clone);
919
832
  image = GetNextImageInList(image);
920
833
  }
921
834
 
922
- (void) DestroyExceptionInfo(exception);
835
+ DestroyExceptionInfo(exception);
923
836
  return new_imagelist;
924
837
  }
925
838
 
926
839
 
927
840
  /**
928
- * Call QuantizeImages.
929
- *
930
- * Ruby usage:
931
- * - @verbatim ImageList#quantize @endverbatim
932
- * - @verbatim ImageList#quantize(number_colors) @endverbatim
933
- * - @verbatim ImageList#quantize(number_colors, colorspace) @endverbatim
934
- * - @verbatim ImageList#quantize(number_colors, colorspace, dither) @endverbatim
935
- * - @verbatim ImageList#quantize(number_colors, colorspace, dither, tree_depth) @endverbatim
936
- * - @verbatim ImageList#quantize(number_colors, colorspace, dither, tree_depth, measure_error) @endverbatim
937
- *
938
- * Notes:
939
- * - Default number_colors is 256
940
- * - Default coorspace is Magick::RGBColorsapce
941
- * - Default dither is true
942
- * - Default tree_depth is 0
943
- * - Default measure_error is false
944
- * - Sets \@scene to the same value as self.scene
945
- *
946
- * @param argc number of input arguments
947
- * @param argv array of input arguments
948
- * @param self this object
949
- * @return a new ImageList with quantized images
841
+ * Analyzes the colors within a set of reference images and chooses a fixed number of colors to represent the set.
842
+ * The goal of the algorithm is to minimize the difference between the input and output images while minimizing the processing time.
843
+ *
844
+ * @overload quantize(number_colors = 256, colorspace = Magick::RGBColorsapce, dither = true, tree_depth = 0, measure_error = false)
845
+ * @param number_colors [Numeric] the maximum number of colors to use in the output images.
846
+ * @param colorspace [Magick::ColorspaceType] the colorspace to quantize in.
847
+ * @param dither [Magick::DitherMethod, Boolean] a DitherMethod value or true if you want apply dither.
848
+ * @param tree_depth [Numeric] specify the tree depth to use while quantizing.
849
+ * @param measure_error [Boolean] calculate quantization errors when quantizing the image.
850
+ * @return [Magick::ImageList] a new ImageList with quantized images
851
+ * @note Sets +@scene+ to the same value as +self.scene+
950
852
  */
951
853
  VALUE
952
854
  ImageList_quantize(int argc, VALUE *argv, VALUE self)
@@ -971,6 +873,10 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
971
873
  {
972
874
  VALUE_TO_ENUM(argv[2], quantize_info.dither_method, DitherMethod);
973
875
  }
876
+ else
877
+ {
878
+ quantize_info.dither_method = RTEST(argv[2]) ? UndefinedDitherMethod : NoDitherMethod;
879
+ }
974
880
  #else
975
881
  if (rb_obj_is_kind_of(argv[2], Class_DitherMethod))
976
882
  {
@@ -1004,12 +910,12 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
1004
910
  rm_ensure_result(new_images);
1005
911
 
1006
912
  #if defined(IMAGEMAGICK_7)
1007
- (void) QuantizeImages(&quantize_info, new_images, exception);
913
+ QuantizeImages(&quantize_info, new_images, exception);
1008
914
  #else
1009
- (void) QuantizeImages(&quantize_info, new_images);
915
+ QuantizeImages(&quantize_info, new_images);
1010
916
  #endif
1011
917
  rm_check_exception(exception, new_images, DestroyOnError);
1012
- (void) DestroyExceptionInfo(exception);
918
+ DestroyExceptionInfo(exception);
1013
919
 
1014
920
  // Create new ImageList object, convert mapped image sequence to images,
1015
921
  // append to images array.
@@ -1021,7 +927,7 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
1021
927
 
1022
928
  // Set @scene in new ImageList object to same value as in self.
1023
929
  scene = rb_iv_get(self, "@scene");
1024
- (void) rb_iv_set(new_imagelist, "@scene", scene);
930
+ rb_iv_set(new_imagelist, "@scene", scene);
1025
931
 
1026
932
  RB_GC_GUARD(new_imagelist);
1027
933
  RB_GC_GUARD(scene);
@@ -1031,22 +937,14 @@ ImageList_quantize(int argc, VALUE *argv, VALUE self)
1031
937
 
1032
938
 
1033
939
  /**
1034
- * Call RemapImages.
1035
- *
1036
- * Ruby usage:
1037
- * - @verbatim ImageList#remap @endverbatim
1038
- * - @verbatim ImageList#remap(remap_image) @endverbatim
1039
- * - @verbatim ImageList#remap(remap_image, dither_method) @endverbatim
1040
- *
1041
- * Notes:
1042
- * - Default remap_image is nil
1043
- * - Default dither_method is RiemersmaDitherMethod
1044
- * - Modifies images in-place.
1045
- *
1046
- * @param argc number of input arguments
1047
- * @param argv array of input arguments
1048
- * @param self this object
1049
- * @see Image_remap
940
+ * Reduce the colors used in the image list to the set of colors in +remap_image+.
941
+ *
942
+ * @overload remap(remap_image = nil, dither_method = Magick::RiemersmaDitherMethod)
943
+ * @param remap_image [Magick::Image, Magick::ImageList] Either an imagelist or an image. If an
944
+ * imagelist, uses the current image.
945
+ * @param dither_method [Magick::DitherMethod] a DitherMethod value.
946
+ * @return [Magick::ImageList] self
947
+ * @note Modifies images in-place.
1050
948
  */
1051
949
  VALUE
1052
950
  ImageList_remap(int argc, VALUE *argv, VALUE self)
@@ -1082,11 +980,12 @@ ImageList_remap(int argc, VALUE *argv, VALUE self)
1082
980
 
1083
981
  #if defined(IMAGEMAGICK_7)
1084
982
  exception = AcquireExceptionInfo();
1085
- (void) RemapImages(&quantize_info, images, remap_image, exception);
983
+ RemapImages(&quantize_info, images, remap_image, exception);
1086
984
  rm_split(images);
1087
- CHECK_EXCEPTION()
1088
- (void) DestroyExceptionInfo(exception);
985
+ CHECK_EXCEPTION();
986
+ DestroyExceptionInfo(exception);
1089
987
  #else
988
+ RemapImages(&quantize_info, images, remap_image);
1090
989
  rm_split(images);
1091
990
  rm_check_image_exception(images, RetainOnError);
1092
991
  #endif
@@ -1098,15 +997,13 @@ ImageList_remap(int argc, VALUE *argv, VALUE self)
1098
997
  /**
1099
998
  * Return the imagelist as a blob (a String).
1100
999
  *
1101
- * Ruby usage:
1102
- * - @verbatim ImageList#to_blob @endverbatim
1000
+ * @overload to_blob
1103
1001
  *
1104
- * Notes:
1105
- * - Runs an info parm block if present - the user can specify the image
1106
- * format and depth
1002
+ * @overload to_blob
1003
+ * Runs an info parm block if present - the user can specify the image format and depth
1004
+ * @yield []
1107
1005
  *
1108
- * @param self this object
1109
- * @return the blob
1006
+ * @return [String] the blob
1110
1007
  */
1111
1008
  VALUE
1112
1009
  ImageList_to_blob(VALUE self)
@@ -1126,7 +1023,7 @@ ImageList_to_blob(VALUE self)
1126
1023
  images = images_from_imagelist(self);
1127
1024
 
1128
1025
  exception = AcquireExceptionInfo();
1129
- (void) SetImageInfo(info, MagickTrue, exception);
1026
+ SetImageInfo(info, MagickTrue, exception);
1130
1027
  rm_check_exception(exception, images, RetainOnError);
1131
1028
 
1132
1029
  if (*info->magick != '\0')
@@ -1134,7 +1031,7 @@ ImageList_to_blob(VALUE self)
1134
1031
  Image *img;
1135
1032
  for (img = images; img; img = GetNextImageInList(img))
1136
1033
  {
1137
- strncpy(img->magick, info->magick, sizeof(info->magick)-1);
1034
+ strlcpy(img->magick, info->magick, sizeof(img->magick));
1138
1035
  }
1139
1036
  }
1140
1037
 
@@ -1155,8 +1052,8 @@ ImageList_to_blob(VALUE self)
1155
1052
  length = 0;
1156
1053
  }
1157
1054
  rm_split(images);
1158
- CHECK_EXCEPTION()
1159
- (void) DestroyExceptionInfo(exception);
1055
+ CHECK_EXCEPTION();
1056
+ DestroyExceptionInfo(exception);
1160
1057
 
1161
1058
 
1162
1059
  if (length == 0 || !blob)
@@ -1180,12 +1077,7 @@ ImageList_to_blob(VALUE self)
1180
1077
  * the images will be written as a single multi-image file. Otherwise each image
1181
1078
  * will be written to a separate file.
1182
1079
  *
1183
- * Ruby usage:
1184
- * - @verbatim ImageList#write(file) @endverbatim
1185
- *
1186
- * @param self this object
1187
- * @param file the file
1188
- * @return self
1080
+ * @param file [File, String] the file
1189
1081
  */
1190
1082
  VALUE
1191
1083
  ImageList_write(VALUE self, VALUE file)
@@ -1228,18 +1120,18 @@ ImageList_write(VALUE self, VALUE file)
1228
1120
  for (scene = 0, img = images; img; img = GetNextImageInList(img))
1229
1121
  {
1230
1122
  img->scene = scene++;
1231
- strcpy(img->filename, info->filename);
1123
+ strlcpy(img->filename, info->filename, sizeof(img->filename));
1232
1124
  }
1233
1125
 
1234
1126
  // Find out if the format supports multi-images files.
1235
1127
  exception = AcquireExceptionInfo();
1236
- (void) SetImageInfo(info, MagickTrue, exception);
1128
+ SetImageInfo(info, MagickTrue, exception);
1237
1129
  rm_check_exception(exception, images, RetainOnError);
1238
1130
 
1239
1131
  m = GetMagickInfo(info->magick, exception);
1240
1132
  rm_check_exception(exception, images, RetainOnError);
1241
1133
  #if defined(IMAGEMAGICK_6)
1242
- (void) DestroyExceptionInfo(exception);
1134
+ DestroyExceptionInfo(exception);
1243
1135
  #endif
1244
1136
 
1245
1137
  // Tell WriteImage if we want a multi-images file.
@@ -1252,10 +1144,10 @@ ImageList_write(VALUE self, VALUE file)
1252
1144
  {
1253
1145
  rm_sync_image_options(img, info);
1254
1146
  #if defined(IMAGEMAGICK_7)
1255
- (void) WriteImage(info, img, exception);
1147
+ WriteImage(info, img, exception);
1256
1148
  rm_check_exception(exception, img, RetainOnError);
1257
1149
  #else
1258
- (void) WriteImage(info, img);
1150
+ WriteImage(info, img);
1259
1151
  // images will be split before raising an exception
1260
1152
  rm_check_image_exception(images, RetainOnError);
1261
1153
  #endif
@@ -1266,7 +1158,7 @@ ImageList_write(VALUE self, VALUE file)
1266
1158
  }
1267
1159
 
1268
1160
  #if defined(IMAGEMAGICK_7)
1269
- (void) DestroyExceptionInfo(exception);
1161
+ DestroyExceptionInfo(exception);
1270
1162
  #endif
1271
1163
 
1272
1164
  rm_split(images);