rmagick 1.7.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.

Files changed (239) hide show
  1. data/ChangeLog +232 -0
  2. data/Makefile.in +28 -0
  3. data/README.html +404 -0
  4. data/README.txt +397 -0
  5. data/configure +8554 -0
  6. data/configure.ac +497 -0
  7. data/doc/comtasks.html +241 -0
  8. data/doc/constants.html +1195 -0
  9. data/doc/css/doc.css +299 -0
  10. data/doc/css/popup.css +34 -0
  11. data/doc/draw.html +3108 -0
  12. data/doc/ex/Adispatch.rb +43 -0
  13. data/doc/ex/Zconstitute.rb +9 -0
  14. data/doc/ex/adaptive_threshold.rb +19 -0
  15. data/doc/ex/add_noise.rb +18 -0
  16. data/doc/ex/affine.rb +48 -0
  17. data/doc/ex/affine_transform.rb +20 -0
  18. data/doc/ex/arc.rb +47 -0
  19. data/doc/ex/arcpath.rb +33 -0
  20. data/doc/ex/average.rb +15 -0
  21. data/doc/ex/axes.rb +64 -0
  22. data/doc/ex/bilevel_channel.rb +20 -0
  23. data/doc/ex/blur_image.rb +12 -0
  24. data/doc/ex/border.rb +10 -0
  25. data/doc/ex/bounding_box.rb +48 -0
  26. data/doc/ex/cbezier1.rb +40 -0
  27. data/doc/ex/cbezier2.rb +40 -0
  28. data/doc/ex/cbezier3.rb +40 -0
  29. data/doc/ex/cbezier4.rb +41 -0
  30. data/doc/ex/cbezier5.rb +41 -0
  31. data/doc/ex/cbezier6.rb +51 -0
  32. data/doc/ex/channel.rb +26 -0
  33. data/doc/ex/channel_threshold.rb +48 -0
  34. data/doc/ex/charcoal.rb +12 -0
  35. data/doc/ex/chop.rb +29 -0
  36. data/doc/ex/circle.rb +31 -0
  37. data/doc/ex/clip_path.rb +56 -0
  38. data/doc/ex/coalesce.rb +60 -0
  39. data/doc/ex/color_fill_to_border.rb +29 -0
  40. data/doc/ex/color_floodfill.rb +28 -0
  41. data/doc/ex/color_histogram.rb +60 -0
  42. data/doc/ex/color_reset.rb +11 -0
  43. data/doc/ex/colorize.rb +16 -0
  44. data/doc/ex/colors.rb +65 -0
  45. data/doc/ex/composite.rb +135 -0
  46. data/doc/ex/contrast.rb +37 -0
  47. data/doc/ex/crop.rb +31 -0
  48. data/doc/ex/crop_with_gravity.rb +46 -0
  49. data/doc/ex/cycle_colormap.rb +21 -0
  50. data/doc/ex/demo.rb +324 -0
  51. data/doc/ex/drawcomp.rb +42 -0
  52. data/doc/ex/drop_shadow.rb +60 -0
  53. data/doc/ex/edge.rb +11 -0
  54. data/doc/ex/ellipse.rb +43 -0
  55. data/doc/ex/emboss.rb +11 -0
  56. data/doc/ex/enhance.rb +28 -0
  57. data/doc/ex/equalize.rb +11 -0
  58. data/doc/ex/flatten_images.rb +38 -0
  59. data/doc/ex/flip.rb +11 -0
  60. data/doc/ex/flop.rb +11 -0
  61. data/doc/ex/fonts.rb +20 -0
  62. data/doc/ex/frame.rb +12 -0
  63. data/doc/ex/gaussian_blur.rb +11 -0
  64. data/doc/ex/get_multiline_type_metrics.rb +53 -0
  65. data/doc/ex/get_pixels.rb +48 -0
  66. data/doc/ex/get_type_metrics.rb +140 -0
  67. data/doc/ex/gradientfill.rb +27 -0
  68. data/doc/ex/grav.rb +44 -0
  69. data/doc/ex/gravity.rb +80 -0
  70. data/doc/ex/hatchfill.rb +27 -0
  71. data/doc/ex/images/Ballerina.jpg +0 -0
  72. data/doc/ex/images/Ballerina3.jpg +0 -0
  73. data/doc/ex/images/Button_0.gif +0 -0
  74. data/doc/ex/images/Button_1.gif +0 -0
  75. data/doc/ex/images/Button_2.gif +0 -0
  76. data/doc/ex/images/Button_3.gif +0 -0
  77. data/doc/ex/images/Button_4.gif +0 -0
  78. data/doc/ex/images/Button_5.gif +0 -0
  79. data/doc/ex/images/Button_6.gif +0 -0
  80. data/doc/ex/images/Button_7.gif +0 -0
  81. data/doc/ex/images/Button_8.gif +0 -0
  82. data/doc/ex/images/Button_9.gif +0 -0
  83. data/doc/ex/images/Button_A.gif +0 -0
  84. data/doc/ex/images/Button_B.gif +0 -0
  85. data/doc/ex/images/Button_C.gif +0 -0
  86. data/doc/ex/images/Button_D.gif +0 -0
  87. data/doc/ex/images/Button_E.gif +0 -0
  88. data/doc/ex/images/Button_F.gif +0 -0
  89. data/doc/ex/images/Button_G.gif +0 -0
  90. data/doc/ex/images/Button_H.gif +0 -0
  91. data/doc/ex/images/Button_I.gif +0 -0
  92. data/doc/ex/images/Button_J.gif +0 -0
  93. data/doc/ex/images/Button_K.gif +0 -0
  94. data/doc/ex/images/Button_L.gif +0 -0
  95. data/doc/ex/images/Button_M.gif +0 -0
  96. data/doc/ex/images/Button_N.gif +0 -0
  97. data/doc/ex/images/Button_O.gif +0 -0
  98. data/doc/ex/images/Button_P.gif +0 -0
  99. data/doc/ex/images/Button_Q.gif +0 -0
  100. data/doc/ex/images/Button_R.gif +0 -0
  101. data/doc/ex/images/Button_S.gif +0 -0
  102. data/doc/ex/images/Button_T.gif +0 -0
  103. data/doc/ex/images/Button_U.gif +0 -0
  104. data/doc/ex/images/Button_V.gif +0 -0
  105. data/doc/ex/images/Button_W.gif +0 -0
  106. data/doc/ex/images/Button_X.gif +0 -0
  107. data/doc/ex/images/Button_Y.gif +0 -0
  108. data/doc/ex/images/Button_Z.gif +0 -0
  109. data/doc/ex/images/Cheetah.jpg +0 -0
  110. data/doc/ex/images/Coffee.wmf +0 -0
  111. data/doc/ex/images/Flower_Hat.jpg +0 -0
  112. data/doc/ex/images/Gold_Statue.jpg +0 -0
  113. data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
  114. data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
  115. data/doc/ex/images/No.wmf +0 -0
  116. data/doc/ex/images/Polynesia.jpg +0 -0
  117. data/doc/ex/images/Red_Rocks.jpg +0 -0
  118. data/doc/ex/images/Shorts.jpg +0 -0
  119. data/doc/ex/images/Snake.wmf +0 -0
  120. data/doc/ex/images/Violin.jpg +0 -0
  121. data/doc/ex/images/graydient230x6.gif +0 -0
  122. data/doc/ex/images/logo400x83.gif +0 -0
  123. data/doc/ex/images/model.miff +0 -0
  124. data/doc/ex/images/notimplemented.gif +0 -0
  125. data/doc/ex/images/smile.miff +0 -0
  126. data/doc/ex/images/spin.gif +0 -0
  127. data/doc/ex/implode.rb +32 -0
  128. data/doc/ex/level.rb +12 -0
  129. data/doc/ex/level_channel.rb +33 -0
  130. data/doc/ex/line.rb +40 -0
  131. data/doc/ex/map.rb +28 -0
  132. data/doc/ex/map_f.rb +15 -0
  133. data/doc/ex/matte_fill_to_border.rb +42 -0
  134. data/doc/ex/matte_floodfill.rb +35 -0
  135. data/doc/ex/matte_replace.rb +42 -0
  136. data/doc/ex/median_filter.rb +28 -0
  137. data/doc/ex/modulate.rb +11 -0
  138. data/doc/ex/mono.rb +23 -0
  139. data/doc/ex/morph.rb +26 -0
  140. data/doc/ex/mosaic.rb +35 -0
  141. data/doc/ex/motion_blur.rb +11 -0
  142. data/doc/ex/negate.rb +11 -0
  143. data/doc/ex/negate_channel.rb +19 -0
  144. data/doc/ex/normalize.rb +11 -0
  145. data/doc/ex/oil_paint.rb +11 -0
  146. data/doc/ex/opacity.rb +38 -0
  147. data/doc/ex/opaque.rb +14 -0
  148. data/doc/ex/ordered_dither.rb +11 -0
  149. data/doc/ex/path.rb +62 -0
  150. data/doc/ex/pattern1.rb +25 -0
  151. data/doc/ex/pattern2.rb +26 -0
  152. data/doc/ex/polygon.rb +24 -0
  153. data/doc/ex/polyline.rb +23 -0
  154. data/doc/ex/posterize.rb +19 -0
  155. data/doc/ex/preview.rb +16 -0
  156. data/doc/ex/qbezierpath.rb +49 -0
  157. data/doc/ex/quantize-m.rb +25 -0
  158. data/doc/ex/radial_blur.rb +19 -0
  159. data/doc/ex/raise.rb +11 -0
  160. data/doc/ex/random_channel_threshold.rb +17 -0
  161. data/doc/ex/random_threshold_channel.rb +18 -0
  162. data/doc/ex/rectangle.rb +33 -0
  163. data/doc/ex/reduce_noise.rb +28 -0
  164. data/doc/ex/roll.rb +9 -0
  165. data/doc/ex/rotate.rb +43 -0
  166. data/doc/ex/rotate_f.rb +14 -0
  167. data/doc/ex/roundrect.rb +32 -0
  168. data/doc/ex/rubyname.rb +31 -0
  169. data/doc/ex/segment.rb +11 -0
  170. data/doc/ex/shade.rb +11 -0
  171. data/doc/ex/shave.rb +15 -0
  172. data/doc/ex/shear.rb +10 -0
  173. data/doc/ex/skewx.rb +50 -0
  174. data/doc/ex/skewy.rb +45 -0
  175. data/doc/ex/smile.rb +124 -0
  176. data/doc/ex/solarize.rb +11 -0
  177. data/doc/ex/splice.rb +16 -0
  178. data/doc/ex/spread.rb +11 -0
  179. data/doc/ex/stegano.rb +50 -0
  180. data/doc/ex/stroke_dasharray.rb +41 -0
  181. data/doc/ex/stroke_linecap.rb +44 -0
  182. data/doc/ex/stroke_linejoin.rb +48 -0
  183. data/doc/ex/stroke_width.rb +47 -0
  184. data/doc/ex/swirl.rb +17 -0
  185. data/doc/ex/text.rb +32 -0
  186. data/doc/ex/text_align.rb +36 -0
  187. data/doc/ex/text_antialias.rb +33 -0
  188. data/doc/ex/text_undercolor.rb +26 -0
  189. data/doc/ex/texture_fill_to_border.rb +34 -0
  190. data/doc/ex/texture_floodfill.rb +31 -0
  191. data/doc/ex/texturefill.rb +25 -0
  192. data/doc/ex/threshold.rb +13 -0
  193. data/doc/ex/to_blob.rb +14 -0
  194. data/doc/ex/translate.rb +37 -0
  195. data/doc/ex/transparent.rb +38 -0
  196. data/doc/ex/trim.rb +25 -0
  197. data/doc/ex/unsharp_mask.rb +28 -0
  198. data/doc/ex/viewex.rb +36 -0
  199. data/doc/ex/wave.rb +9 -0
  200. data/doc/ilist.html +1592 -0
  201. data/doc/image1.html +3009 -0
  202. data/doc/image2.html +2169 -0
  203. data/doc/image3.html +2815 -0
  204. data/doc/imageattrs.html +1319 -0
  205. data/doc/imusage.html +403 -0
  206. data/doc/index.html +418 -0
  207. data/doc/info.html +949 -0
  208. data/doc/magick.html +439 -0
  209. data/doc/scripts/doc.js +9 -0
  210. data/doc/struct.html +1334 -0
  211. data/doc/usage.html +1318 -0
  212. data/examples/describe.rb +44 -0
  213. data/examples/histogram.rb +289 -0
  214. data/examples/image_opacity.rb +29 -0
  215. data/examples/import_export.rb +31 -0
  216. data/examples/pattern_fill.rb +38 -0
  217. data/examples/rotating_text.rb +47 -0
  218. data/examples/thumbnail.rb +65 -0
  219. data/examples/vignette.rb +79 -0
  220. data/ext/RMagick/MANIFEST +239 -0
  221. data/ext/RMagick/extconf.rb.in +21 -0
  222. data/ext/RMagick/rmagick.h +938 -0
  223. data/ext/RMagick/rmagick_config.h.in +170 -0
  224. data/ext/RMagick/rmdraw.c +1308 -0
  225. data/ext/RMagick/rmfill.c +609 -0
  226. data/ext/RMagick/rmilist.c +685 -0
  227. data/ext/RMagick/rmimage.c +7980 -0
  228. data/ext/RMagick/rminfo.c +982 -0
  229. data/ext/RMagick/rmmain.c +1497 -0
  230. data/ext/RMagick/rmutil.c +2685 -0
  231. data/install.rb +1015 -0
  232. data/lib/RMagick.rb +1486 -0
  233. data/metaconfig.in +6 -0
  234. data/post-clean.rb +12 -0
  235. data/post-install.rb +36 -0
  236. data/post-setup.rb +245 -0
  237. data/rmagick.gemspec +22 -0
  238. data/uninstall.rb +71 -0
  239. metadata +286 -0
data/doc/image1.html ADDED
@@ -0,0 +1,3009 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml">
5
+ <head>
6
+ <meta name="generator" content=
7
+ "HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" />
8
+
9
+ <title>RMagick: class Image (class and instance methods, part
10
+ 1)</title>
11
+ <meta http-equiv="Content-Type" content=
12
+ "text/html; charset=us-ascii" />
13
+ <meta name="GENERATOR" content="Quanta Plus" />
14
+ <meta name="Copyright" content=
15
+ "Copyright (C) 2004 by Timothy P. Hunter" />
16
+ <link rel="stylesheet" type="text/css" href="css/doc.css" />
17
+ <script type="text/javascript" src="scripts/doc.js">
18
+ </script>
19
+ <script type="text/javascript">
20
+ //<![CDATA[
21
+ <!-- Pre-load this image so that the browser knows how big it is. -->
22
+ flower_hat = new Image();
23
+ flower_hat.src = "ex/images/Flower_Hat.jpg";
24
+
25
+ function show_noise(type)
26
+ {
27
+ if (type == null)
28
+ {
29
+ document.getElementById("add_noise_example").src = "ex/images/Flower_Hat.jpg";
30
+ }
31
+ else
32
+ {
33
+ document.getElementById("add_noise_example").src = "ex/add_noise_" + type + ".jpg";
34
+ }
35
+ }
36
+ //]]>
37
+ </script>
38
+ <style type="text/css">
39
+ /*<![CDATA[*/
40
+ .noise_example_wrapper img {
41
+ float: left;
42
+ }
43
+ .noise_example_wrapper p, .noise_example_wrapper ul {
44
+ margin-left: 4px;
45
+ float: left;
46
+ }
47
+ /*]]>*/
48
+ </style>
49
+ </head>
50
+
51
+ <body>
52
+ <h6 id="header">RMagick User's Guide and Reference</h6>
53
+
54
+ <div class="nav">
55
+ &laquo;&nbsp;<a href="imageattrs.html">Prev</a> | <a href=
56
+ "index.html">Contents</a> | <a href=
57
+ "image2.html">Next</a>&nbsp;&raquo;
58
+ </div>
59
+
60
+ <h1>class Image <span class="superclass">&lt; Object</span>
61
+ (class and instance methods, part 1)<br />
62
+ <span class="mixin">mixes in Comparable</span></h1>
63
+
64
+ <div id="toc">
65
+ <h2>Table of Contents</h2>
66
+
67
+ <h3>class methods</h3>
68
+
69
+ <ul>
70
+ <li><a href="#capture">capture</a></li>
71
+
72
+ <li><a href="#constitute">constitute</a></li>
73
+
74
+ <li><a href="#from_blob">from_blob</a></li>
75
+
76
+ <li><a href="#new">new</a></li>
77
+
78
+ <li><a href="#ping">ping</a></li>
79
+
80
+ <li><a href="#read">read</a></li>
81
+
82
+ <li><a href="#read_inline">read_inline</a></li>
83
+ </ul>
84
+
85
+ <h3>instance methods</h3>
86
+
87
+ <div>
88
+ <div class="toccol">
89
+ <ul>
90
+ <li><a href="#aref">[&nbsp;]</a></li>
91
+
92
+ <li><a href="#aset">[&nbsp;]=</a></li>
93
+
94
+ <li><a href="#spaceship">&lt;=&gt;</a></li>
95
+
96
+ <li><a href=
97
+ "#adaptive_threshold">adaptive_threshold</a></li>
98
+
99
+ <li><a href="#add_noise">add_noise</a></li>
100
+
101
+ <li><a href="#affine_transform">affine_transform</a></li>
102
+
103
+ <li><a href="#annotate">annotate</a></li>
104
+
105
+ <li><a href="#bilevel_channel">bilevel_channel</a></li>
106
+
107
+ <li><a href="#black_threshold">black_threshold</a></li>
108
+
109
+ <li><a href="#blur_channel">blur_channel</a></li>
110
+
111
+ <li><a href="#blur_image">blur_image</a></li>
112
+
113
+ <li><a href="#border">border</a></li>
114
+
115
+ <li><a href="#border_bang">border!</a></li>
116
+
117
+ <li><a href="#change_geometry">change_geometry</a></li>
118
+
119
+ <li><a href="#changed_q">changed?</a></li>
120
+
121
+ <li><a href="#channel">channel</a></li>
122
+ </ul>
123
+ </div>
124
+
125
+ <div class="toccol">
126
+ <ul>
127
+ <li><a href="#channel_depth">channel_depth</a></li>
128
+
129
+ <li><a href="#channel_extrema">channel_extrema</a></li>
130
+
131
+ <li><a href="#channel_mean">channel_mean</a></li>
132
+
133
+ <li><a href=
134
+ "#channel_threshold">channel_threshold</a></li>
135
+
136
+ <li><a href="#charcoal">charcoal</a></li>
137
+
138
+ <li><a href="#chop">chop</a></li>
139
+
140
+ <li><a href="#clone">clone</a></li>
141
+
142
+ <li><a href=
143
+ "#color_fill_to_border">color_fill_to_border</a></li>
144
+
145
+ <li><a href="#color_floodfill">color_floodfill</a></li>
146
+
147
+ <li><a href="#color_histogram">color_histogram</a></li>
148
+
149
+ <li><a href="#colorize">colorize</a></li>
150
+
151
+ <li><a href="#colormap">colormap</a></li>
152
+
153
+ <li><a href="#color_point">color_point</a></li>
154
+
155
+ <li><a href="#color_reset_bang">color_reset!</a></li>
156
+
157
+ <li><a href="#compare_channel">compare_channel</a></li>
158
+
159
+ <li><a href="#composite">composite</a></li>
160
+
161
+ <li><a href="#composite_bang">composite!</a></li>
162
+ </ul>
163
+ </div>
164
+
165
+ <div class="toccol">
166
+ <ul>
167
+ <li><a href="#composite_affine">composite_affine</a></li>
168
+
169
+ <li><a href=
170
+ "#compress_colormap_bang">compress_colormap!</a></li>
171
+
172
+ <li><a href="#contrast">contrast</a></li>
173
+
174
+ <li><a href="#convolve">convolve</a></li>
175
+
176
+ <li><a href="#convolve_channel">convolve_channel</a></li>
177
+
178
+ <li><a href="#copy">copy</a></li>
179
+
180
+ <li><a href="#crop">crop</a></li>
181
+
182
+ <li><a href="#crop_bang">crop!</a></li>
183
+
184
+ <li><a href="#cycle_colormap">cycle_colormap</a></li>
185
+
186
+ <li><a href="#despeckle">despeckle</a></li>
187
+
188
+ <li><a href="#difference">difference</a></li>
189
+
190
+ <li><a href="#dispatch">dispatch</a></li>
191
+
192
+ <li><a href="#display">display</a></li>
193
+
194
+ <li><a href="#dup">dup</a></li>
195
+
196
+ <li><a href="#each_profile">each_profile</a></li>
197
+
198
+ <li><a href="#edge">edge</a></li>
199
+
200
+ <li><a href="#emboss">emboss</a></li>
201
+ </ul>
202
+ </div>
203
+ </div>
204
+ </div>
205
+
206
+ <h2 class="methods">class methods</h2>
207
+
208
+ <div class="sig">
209
+ <h3 id="capture">capture</h3>
210
+
211
+ <p>Image.capture(<span class=
212
+ "arg">silent=</span><code>false</code>, <span class=
213
+ "arg">frame=</span><code>false</code>, <span class=
214
+ "arg">descend=</span><code>false</code>, <span class=
215
+ "arg">screen=</span><code>false</code>, <span class=
216
+ "arg">borders=</span><code>false</code>) [ <span class=
217
+ "arg">{&nbsp;optional arguments&nbsp;}</span> ] -&gt;
218
+ <em>anImage</em></p>
219
+ </div>
220
+
221
+ <div class="desc">
222
+ <h4>Description</h4>
223
+
224
+ <p>Reads an image from an X window. Unless you identify a
225
+ window to capture via the <em>optional arguments</em> block,
226
+ when <code>capture</code> is invoked the cursor will turn into
227
+ a cross. Click the cursor on the window to be captured.</p>
228
+
229
+ <p>Within the optional arguments block, specify
230
+ <code>self.filename = "root"</code> to capture the entire
231
+ desktop. To programatically specify the window to be captured,
232
+ use <code>self.filename = window_id</code>, where window_id is
233
+ the id displayed by xwininfo(1).</p>
234
+
235
+ <h4>Arguments</h4>
236
+
237
+ <dl>
238
+ <dt>silent</dt>
239
+
240
+ <dd>If <code>true</code>, suppress the beeps that signal the
241
+ start and finish of the capture process. The bell rings once
242
+ to signal the start of the capture and twice to signal the
243
+ finish.</dd>
244
+
245
+ <dt>frame</dt>
246
+
247
+ <dd>If <code>true</code>, include the window frame.</dd>
248
+
249
+ <dt>descend</dt>
250
+
251
+ <dd>If <code>true</code>, <span class="imquote">obtain image
252
+ by descending window hierarchy.</span></dd>
253
+
254
+ <dt>screen</dt>
255
+
256
+ <dd>If <code>true</code>, specifies that <span class=
257
+ "imquote">the GetImage request used to obtain the image
258
+ should be done on the root window, rather than directly on
259
+ the specified window. In this way, you can obtain pieces of
260
+ other windows that overlap the specified window, and more
261
+ importantly, you can capture menus or other popups that are
262
+ independent windows but appear over the specified
263
+ window.</span></dd>
264
+
265
+ <dt>borders</dt>
266
+
267
+ <dd>If <code>true</code>, include the border in the
268
+ image.</dd>
269
+
270
+ <dt>optional arguments</dt>
271
+
272
+ <dd>You can specify any of these Image::Info attributes in
273
+ the <em>optional arguments</em> block: <a href=
274
+ "info.html#colorspace">colorspace</a>, <a href=
275
+ "info.html#depth">depth</a>, <a href=
276
+ "info.html#dither">dither</a>, <a href=
277
+ "info.html#interlace">interlace</a>, and <a href=
278
+ "info.html#type">type</a>.</dd>
279
+ </dl>
280
+
281
+ <h4>Returns</h4>
282
+
283
+ <p>A new image.</p>
284
+
285
+ <h4>Example</h4>
286
+ <pre>
287
+ img = Magick::Image.capture {
288
+ self.filename = "root"
289
+ }
290
+ </pre>
291
+ </div>
292
+
293
+ <div class="sig">
294
+ <h3 id="constitute">constitute</h3>
295
+
296
+ <p>Image.constitute(<span class="arg">width</span>,
297
+ <span class="arg">height</span>, <span class="arg">map</span>,
298
+ <span class="arg">pixels</span>) -&gt; <em>anImage</em></p>
299
+ </div>
300
+
301
+ <div class="desc">
302
+ <h4>Description</h4>
303
+
304
+ <p>Creates an image from an array of pixels. This method is the
305
+ reverse of <a href="#dispatch"><code>dispatch</code></a>.</p>
306
+
307
+ <h4>Arguments</h4>
308
+
309
+ <dl>
310
+ <dt>width</dt>
311
+
312
+ <dd>The number of columns in the image</dd>
313
+
314
+ <dt>height</dt>
315
+
316
+ <dd>The number of rows in the image</dd>
317
+
318
+ <dt>map</dt>
319
+
320
+ <dd>A string describing <span class="imquote">the expected
321
+ ordering of the pixel array. It can be any combination or
322
+ order of R = red, G = green, B = blue, A = alpha, C = cyan, Y
323
+ = yellow, M = magenta, K = black, or I = intensity (for
324
+ grayscale).</span></dd>
325
+
326
+ <dt>pixels</dt>
327
+
328
+ <dd>The pixel data. The pixel data in the array must be
329
+ stored in scanline order, left-to-right and top-to-bottom.
330
+ The elements in the array must be either all
331
+ <code>Integers</code> or all <code>Floats</code>. If the
332
+ elements are <code>Integers</code>, the <code>Integers</code>
333
+ must be in the range [0..MaxRGB]. If the elements are
334
+ <code>Floats</code>, they must be in the range [0..1].</dd>
335
+ </dl>
336
+
337
+ <h4>Returns</h4>
338
+
339
+ <p>An image constructed from the pixel data.</p>
340
+
341
+ <h4>Example</h4><a href=
342
+ "javascript:popup('Zconstitute.rb.html')"><img src=
343
+ "ex/constitute.jpg" title="Click to see the example script"
344
+ alt="constitute example" /></a>
345
+
346
+ <h4>See also</h4>
347
+
348
+ <p><a href=
349
+ "image2.html#import_pixels"><code>import_pixels</code></a>,
350
+ <a href=
351
+ "image3.html#store_pixels"><code>store_pixels</code></a></p>
352
+
353
+ <h4>Magick API</h4>
354
+
355
+ <p>ConstituteImage</p>
356
+ </div>
357
+
358
+ <div class="sig">
359
+ <h3 id="from_blob">from_blob</h3>
360
+
361
+ <p>Image.from_blob(<span class="arg">aString</span>) [
362
+ <span class="arg">{ optional arguments }</span> ] -&gt;
363
+ <em>anArray</em></p>
364
+ </div>
365
+
366
+ <div class="desc">
367
+ <h4>Description</h4>
368
+
369
+ <p>Creates an array of images from a BLOB, that is, a
370
+ <em>B</em>inary <em>L</em>arge <em>OB</em>ject. In RMagick, a
371
+ BLOB is a string.</p>
372
+
373
+ <h4>Arguments</h4>
374
+
375
+ <p>A string produced by the <a href="#to_blob">to_blob</a>
376
+ method. Control the format of the created image(s) by setting
377
+ additional <a href="info.html">Image::Info</a> attributes in
378
+ the optional block argument.</p>
379
+
380
+ <h4>Returns</h4>
381
+
382
+ <p>An array of one or more images constructed from the
383
+ BLOB.</p>
384
+
385
+ <h4>Example</h4>
386
+
387
+ <p>See <a href=
388
+ "image3.html#to_blob"><code>to_blob</code></a>.</p>
389
+
390
+ <h4>Magick API</h4>
391
+
392
+ <p>BlobToImage</p>
393
+ </div>
394
+
395
+ <div class="sig">
396
+ <h3 id="new">new</h3>
397
+
398
+ <p>Image.new(<span class="arg">columns</span>, <span class=
399
+ "arg">rows</span> [, <span class="arg">fill</span>]) [
400
+ <span class="arg">{ optional arguments }</span> ] -&gt;
401
+ <em>anImage</em></p>
402
+ </div>
403
+
404
+ <div class="desc">
405
+ <h4>Description</h4>Creates a new instance with the specified
406
+ number of columns and rows. You can specify other arguments by
407
+ setting <a href="info.html">Image::Info</a> attributes in the
408
+ optional block. If the optional <span class="arg">fill</span>
409
+ argument is not specified, the image is set to the background
410
+ color.
411
+
412
+ <h4>Arguments</h4>
413
+
414
+ <dl>
415
+ <dt>columns</dt>
416
+
417
+ <dd>The number of columns</dd>
418
+
419
+ <dt>rows</dt>
420
+
421
+ <dd>The number of rows</dd>
422
+
423
+ <dt>fill</dt>
424
+
425
+ <dd>A <a href="struct.html#fill"><code>Fill</code></a>
426
+ object</dd>
427
+ </dl>
428
+
429
+ <h4>Returns</h4>
430
+
431
+ <p>A new image.</p>
432
+
433
+ <h4>Example</h4>
434
+ <pre>
435
+ img = Magick::Image.new(256, 64) {
436
+ self.background_color = 'red'
437
+ }
438
+ </pre>
439
+
440
+ <h4>See also</h4><p><a href=
441
+ "ilist.html#new_image"><code>ImageList.new_image</code></a></p>
442
+
443
+ <h4>Magick API</h4>
444
+
445
+ <p>AllocateImage</p>
446
+ </div>
447
+
448
+ <div class="sig">
449
+ <h3 id="ping">ping</h3>
450
+
451
+ <p>Image.ping(<span class="arg">filename</span>) [ <span class=
452
+ "arg">{ optional arguments }</span> ] -&gt;
453
+ <em>anArray</em><br />
454
+ Image.ping(<span class="arg">file</span>) [ <span class="arg">{
455
+ optional arguments }</span> ] -&gt; <em>anArray</em></p>
456
+ </div>
457
+
458
+ <div class="desc">
459
+ <h4>Description</h4>
460
+
461
+ <p>Creates one or more images from the image file, omitting the
462
+ pixel data. Only the attributes are stored in the images. This
463
+ method is faster than <code><a href="#read">read</a></code> and
464
+ uses less memory.</p>
465
+
466
+ <h4>Arguments</h4>
467
+
468
+ <p>An image file name or open file object. You can specify
469
+ other arguments by setting <a href="info.html">Image::Info</a>
470
+ attributes in the optional block.</p>
471
+
472
+ <h4>Returns</h4>
473
+
474
+ <p>An array containing 0 or more images.</p>
475
+
476
+ <h4>Example</h4>
477
+ <pre>
478
+ cheetah = Magick::Image.ping("Cheetah.jpg") &raquo;
479
+ [Cheetah.jpg JPEG 1024x768 DirectClass 8-bit 101684b]
480
+ p cheetah[0].rows &raquo; 768
481
+ p cheetah[0].columns &raquo; 1024
482
+ </pre>
483
+
484
+ <h4>See also</h4>
485
+
486
+ <p><a href="#read"><code>read</code></a></p>
487
+
488
+ <h4>Magick API</h4>
489
+
490
+ <p>PingImage</p>
491
+ </div>
492
+
493
+ <div class="sig">
494
+ <h3 id="read">read</h3>
495
+
496
+ <p>Image.read(<span class="arg">filename</span>) [ <span class=
497
+ "arg">{ optional arguments }</span> ] -&gt;
498
+ <em>anArray</em><br />
499
+ Image.read(<span class="arg">file</span>) [ <span class="arg">{
500
+ optional arguments }</span> ] -&gt; <em>anArray</em></p>
501
+ </div>
502
+
503
+ <div class="desc">
504
+ <h4>Description</h4>
505
+
506
+ <p>Creates one or more images from the image file.</p>
507
+
508
+ <h4>Arguments</h4>
509
+
510
+ <p>An image file name or open file object. You can specify
511
+ other arguments by setting <a href="info.html">Image::Info</a>
512
+ attributes in the optional block.</p>
513
+
514
+ <h4>Returns</h4>
515
+
516
+ <p>An array containing 0 or more Image objects. If the file is
517
+ a multi-image file such as an animated GIF or a Photoshop PSD
518
+ file with multiple layers, the array contains an Image object
519
+ for each image or layer in the file.</p>
520
+
521
+ <h4>Example</h4>
522
+ <pre>
523
+ animated = Magick::Image.read("animated.gif") &raquo;
524
+ [animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
525
+ animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
526
+ animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
527
+ </pre>
528
+
529
+ <h4>See also</h4>
530
+
531
+ <p><a href="#ping"><code>ping</code></a></p>
532
+
533
+ <h4>Magick API</h4>
534
+
535
+ <p>ReadImage</p>
536
+ </div>
537
+
538
+ <div class="sig">
539
+ <h3 id="read_inline">read_inline</h3>
540
+
541
+ <p>Image.read_inline(<span class="arg">content</span>) [
542
+ <span class="arg">{ optional arguments }</span> ] -&gt;
543
+ <em>anArray</em></p>
544
+ </div>
545
+
546
+ <div class="desc">
547
+ <h4>Description</h4>
548
+
549
+ <p>Converts a Base64-encoded image or multi-image sequence to
550
+ an array of Image objects.</p>
551
+
552
+ <h4>Arguments</h4>
553
+
554
+ <p>A Base64-encoded string. Generally no optional arguments are
555
+ required. If the image format cannot be deduced from the image
556
+ data, you can use the <a href="info.html#format">format</a>
557
+ attribute. If you want to extract a subset of an image
558
+ sequence, you can use the <a href="info.html#scene">scene</a>
559
+ and <a href="info.html#number_scenes">number_scenes</a>
560
+ attributes.</p>
561
+
562
+ <h4>Returns</h4>
563
+
564
+ <p>An array containing 0 or more Image objects. If the content
565
+ is a multi-image sequence such as an animated GIF or a
566
+ Photoshop PSD file with multiple layers, the array contains an
567
+ Image object for each image or layer in the file.</p>
568
+
569
+ <h4>Example</h4>
570
+ <pre>
571
+ content = "R0lGODlhnAEuAferAAAAAAcIBggJBgw..."
572
+ img = Magick::Image.read_inline(content)
573
+ </pre>
574
+
575
+ <h4>See also</h4>
576
+
577
+ <p><a href="#read"><code>read</code></a></p>
578
+ </div>
579
+
580
+ <h2 class="methods">instance methods</h2>
581
+
582
+ <div class="sig">
583
+ <h3 id="aref">[&nbsp;]</h3>
584
+
585
+ <p>image[<span class="arg">key</span>] -&gt;
586
+ <em>aString</em></p>
587
+ </div>
588
+
589
+ <div class="desc">
590
+ <h4>Description</h4>
591
+
592
+ <p>Returns the value of the image property identified by
593
+ <span class="arg">key</span>. An image may have any number of
594
+ properties. Each property is identified by a string (or symbol)
595
+ key. The property value is a string. &times;Magick predefines
596
+ some properties, including <code>Label</code>,
597
+ <code>Comment</code>, <code>Signature</code>, and in some cases
598
+ <code>EXIF</code>.</p>
599
+
600
+ <h4>Arguments</h4>The key may be a <code>String</code> or a
601
+ <code>Symbol</code>.
602
+
603
+ <h4>Returns</h4>
604
+
605
+ <p>The value of the property.</p>
606
+
607
+ <h4>Example</h4>
608
+ <pre>
609
+ mom['Label'] = 'My Mother'
610
+ </pre>
611
+
612
+ <h4>See also</h4><p><a href="#aset"><code>[ ]=</code></a>,
613
+ <a href="image2.html#properties"><code>properties</code></a></p>
614
+
615
+ <h4>Magick API</h4>
616
+
617
+ <p>GetImageAttribute</p>
618
+
619
+ <h4>Note</h4>
620
+
621
+ <p>&times;Magick calls properties "attributes." I use the word
622
+ "properties" to reduce the confusion with image object
623
+ attributes such as <code>rows</code> and
624
+ <code>columns</code>.</p>
625
+ </div>
626
+
627
+ <div class="sig">
628
+ <h3 id="aset">[&nbsp;]=</h3>
629
+
630
+ <p>image[<span class="arg">key</span>] = <span class=
631
+ "arg">aString</span> -&gt; <em>image</em></p>
632
+ </div>
633
+
634
+ <div class="desc">
635
+ <h4>Description</h4>
636
+
637
+ <p>Sets the value of an image property. An image may have any
638
+ number of properties.</p>
639
+
640
+ <h4>Arguments</h4>The <span class="arg">key</span> may be a
641
+ string or a symbol. The value can be any string.
642
+
643
+ <h4>Returns</h4><code>self</code>
644
+
645
+ <h4>Example</h4>See <a href=
646
+ "javascript:popup('demo.rb.html')">demo.rb</a> for an example
647
+ of the use of the Label property.
648
+
649
+ <h4>See also</h4>
650
+
651
+ <p><a href="#aref">[<code>&nbsp;]</code></a>, <a href=
652
+ "image2.html#properties"><code>properties</code></a></p>
653
+
654
+ <h4>Magick API</h4>
655
+
656
+ <p>SetImageAttribute</p>
657
+ </div>
658
+
659
+ <div class="sig">
660
+ <h3 id="spaceship">&lt;=&gt;</h3>
661
+
662
+ <p><span class="arg">image</span> &lt;=&gt; <span class=
663
+ "arg">anOtherImage</span> -&gt; -1, 0, 1</p>
664
+ </div>
665
+
666
+ <div class="desc">
667
+ <h4>Description</h4>
668
+
669
+ <p>Compares two images and returns -1, 0, or 1 if <span class=
670
+ "arg">image</span> is less than, equal to, or greater than
671
+ <span class="arg">anOtherImage</span> as determined by
672
+ comparing the signatures of the images. If one of the arguments
673
+ is not an image, this method raises a TypeError exception (in
674
+ Ruby 1.6) or returns <code>nil</code> (in Ruby 1.8)</p>
675
+
676
+ <p>In addition to &lt;=&gt;, <code>Image</code> mixes in the
677
+ <code>Comparable</code> module, which defines the &lt;, &lt;=,
678
+ == &gt;=, &gt;, and <code>between?</code> methods.</p>
679
+
680
+ <p>The <code>difference</code> method compares images (for
681
+ equality only) but also returns information about the amount
682
+ two images differ, which may be more useful.</p>
683
+
684
+ <h4>Returns</h4>
685
+
686
+ <p>The value of <span class=
687
+ "arg">image</span>.<code>signature</code> &lt;=&gt;
688
+ <span class="arg">anOtherImage</span>.<code>signature</code>.</p>
689
+
690
+ <h4>See also</h4>
691
+
692
+ <p><a href="image3.html#signature">signature</a>, <a href=
693
+ "#difference">difference</a>, <a href=
694
+ "#compare_channel">compare_channel</a></p>
695
+
696
+ <h4>Magick API</h4>
697
+
698
+ <p>SignatureImage</p>
699
+ </div>
700
+
701
+ <div class="sig">
702
+ <h3 id="adaptive_threshold">adaptive_threshold</h3>
703
+
704
+ <p><span class=
705
+ "arg">image</span>.adaptive_threshold(<span class=
706
+ "arg">width</span>=3, <span class="arg">height</span>=3,
707
+ <span class="arg">offset</span>=0) -&gt; <em>anImage</em></p>
708
+ </div>
709
+
710
+ <div class="desc">
711
+ <h4>Description</h4>
712
+
713
+ <p class="imquote">Selects an individual threshold for each
714
+ pixel based on the range of intensity values in its local
715
+ neighborhood. This allows for thresholding of an image whose
716
+ global intensity histogram doesn't contain distinctive
717
+ peaks.</p>
718
+
719
+ <h4>Arguments</h4>
720
+
721
+ <dl>
722
+ <dt>width, height</dt>
723
+
724
+ <dd>define the width and height of the local
725
+ neighborhood</dd>
726
+
727
+ <dt>offset</dt>
728
+
729
+ <dd>constant to subtract from pixel neighborhood mean</dd>
730
+ </dl>
731
+
732
+ <h4>Returns</h4>
733
+
734
+ <p>A new image</p>
735
+
736
+ <h4>Example</h4>
737
+
738
+ <p class="rollover"><a href=
739
+ "javascript:popup('adaptive_threshold.rb.html')"><img src=
740
+ "ex/adaptive_threshold.jpg" onmouseover=
741
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
742
+ "this.src='ex/adaptive_threshold.jpg'" alt=
743
+ "adaptive_threshold example" title=
744
+ "Click to see the example script" /></a> <img src=
745
+ "ex/images/spin.gif" alt="" class="spin" title=
746
+ "Mouse over the example to see the original image" /></p>
747
+
748
+ <h4>See also</h4>
749
+
750
+ <p><a href="#channel_threshold">channel_threshold</a>, <a href=
751
+ "image3.html#random_channel_threshold">random_channel_threshold</a>,
752
+ <a href="image3.html#threshold">threshold</a></p>
753
+
754
+ <h4>Magick API</h4>
755
+
756
+ <p>AdaptiveThresholdImage (available in ImageMagick 5.5.2 and
757
+ later)</p>
758
+ </div>
759
+
760
+ <div class="sig">
761
+ <h3 id="add_noise">add_noise</h3>
762
+
763
+ <p><span class="arg">image</span>.add_noise(<span class=
764
+ "arg">aNoiseType</span>) -&gt; <em>anImage</em></p>
765
+ </div>
766
+
767
+ <div class="desc">
768
+ <h4>Description</h4>
769
+
770
+ <p>Adds random noise to the image. The amount of time
771
+ <code>add_noise</code> requires depends on the NoiseType
772
+ argument.</p>
773
+
774
+ <h4>Arguments</h4>
775
+
776
+ <p>A <a href="constants.html#NoiseType">NoiseType</a>
777
+ constant.</p>
778
+
779
+ <h4>Returns</h4>
780
+
781
+ <p>A new image</p>
782
+
783
+ <h4>Example</h4>
784
+
785
+ <div class="noise_example_wrapper">
786
+ <a href="javascript:popup('add_noise.rb.html')"><img src=
787
+ "ex/images/Flower_Hat.jpg" alt="add_noise example" id=
788
+ "add_noise_example" title="Click to see the example script"
789
+ name="add_noise_example" /></a>
790
+
791
+ <p>Click the NoiseType to see the effect.</p>
792
+
793
+ <ul>
794
+ <li><a href="javascript:show_noise(null)">No noise</a></li>
795
+
796
+ <li><a href=
797
+ "javascript:show_noise('UniformNoise');">UniformNoise</a></li>
798
+
799
+ <li><a href=
800
+ "javascript:show_noise('GaussianNoise');">GaussianNoise</a></li>
801
+
802
+ <li><a href=
803
+ "javascript:show_noise('MultiplicativeGaussianNoise');">MultiplicativeGaussianNoise</a></li>
804
+
805
+ <li><a href=
806
+ "javascript:show_noise('ImpulseNoise');">ImpulseNoise</a></li>
807
+
808
+ <li><a href=
809
+ "javascript:show_noise('LaplacianNoise');">LaplacianNoise</a></li>
810
+
811
+ <li><a href=
812
+ "javascript:show_noise('PoissonNoise');">PoissonNoise</a></li>
813
+ </ul>
814
+ </div>
815
+
816
+ <div style="clear:both"></div>
817
+
818
+ <h4>Magick API</h4>
819
+
820
+ <p>AddNoiseImage</p>
821
+ </div>
822
+
823
+ <div class="sig">
824
+ <h3 id="affine_transform">affine_transform</h3>
825
+
826
+ <p><span class="arg">image</span>.affine_transform(<span class=
827
+ "arg">anAffineMatrix</span>) -&gt; <em>anImage</em></p>
828
+ </div>
829
+
830
+ <div class="desc">
831
+ <h4>Description</h4>
832
+
833
+ <p>Transforms the image as specified by the affine matrix.</p>
834
+
835
+ <p>See <a href=
836
+ "http://www.w3.org/TR/SVG/coords.html#EstablishingANewUserSpace">
837
+ <b>Coordinate system transformations</b></a> in the
838
+ <cite>Scalable Vector Graphics (SVG) 1.0 Specification</cite>
839
+ for more information about transformation matrices.</p>
840
+
841
+ <h4>Arguments</h4>
842
+
843
+ <p>An <a href=
844
+ "struct.html#AffineMatrix"><code>AffineMatrix</code></a>
845
+ object.</p>
846
+
847
+ <h4>Returns</h4>
848
+
849
+ <p>A new image</p>
850
+
851
+ <h4>Example</h4>
852
+
853
+ <p>The affine matrix in this example scales the receiver by -1
854
+ in both the x- and y-direction, and skews it by &pi;/6 radians
855
+ along both axes.</p>
856
+
857
+ <p class="rollover"><a href=
858
+ "javascript:popup('affine_transform.rb.html')"><img onmouseover="this.src='ex/images/Flower_Hat.jpg'"
859
+ onmouseout="this.src='ex/affine_transform.jpg'" src=
860
+ "ex/affine_transform.jpg" alt="affine_transform example" title=
861
+ "Click to see the example script" /></a> <img src=
862
+ "ex/images/spin.gif" alt="" class="spin" style="left:237px;"
863
+ title="Mouse over the example to see the original image" /></p>
864
+
865
+ <h4>See also</h4><p><a href="image3.html#rotate">rotate</a>,
866
+ <a href="#shear">shear</a></p>
867
+
868
+ <h4>Magick API</h4>
869
+
870
+ <p>AffineTransformImage</p>
871
+ </div>
872
+
873
+ <div class="sig">
874
+ <h3 id="annotate">annotate</h3>
875
+
876
+ <p><span class="arg">image.</span>annotate(<span class=
877
+ "arg">draw, width, height, x, y, text</span>) <span class=
878
+ "arg">[&nbsp;{ additional parameters }&nbsp;]</span> -&gt;
879
+ <em>image</em></p>
880
+ </div>
881
+
882
+ <div class="desc">
883
+ <h4>Description</h4>
884
+
885
+ <p>This is the same method as the <code>annotate</code> method
886
+ in the Draw class, except that the first argument is a Draw
887
+ object. Refer to the documentation for <a href=
888
+ "draw.html#annotate">Draw#annotate</a> for more information.
889
+ Some users feel like <code>annotate</code> is better placed in
890
+ Image than in Draw. Okay, here it is!</p>
891
+
892
+ <h4>Returns</h4>
893
+
894
+ <p>self</p>
895
+ </div>
896
+
897
+ <div class="sig">
898
+ <h3 id="bilevel_channel">bilevel_channel</h3>
899
+
900
+ <p><span class="arg">image</span>.bilevel_channel(<span class=
901
+ "arg">threshold</span>, [<span class="arg">channel</span>[,
902
+ <span class="arg">channel</span>...]] = <em>aNewImage</em></p>
903
+ </div>
904
+
905
+ <div class="desc">
906
+ <h4>Description</h4>
907
+
908
+ <p class="imquote">Changes the value of individual pixels based
909
+ on the intensity of each pixel channel. The result is a
910
+ high-contrast image.</p>
911
+
912
+ <h4>Arguments</h4>
913
+
914
+ <dl>
915
+ <dt>threshold</dt>
916
+
917
+ <dd>The threshold value, a number between 0 and
918
+ <code>MaxRGB</code>.</dd>
919
+
920
+ <dt>channel...</dt>
921
+
922
+ <dd>0 or more <a href=
923
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
924
+ channels are specified, all the channels are
925
+ thresholded.</dd>
926
+ </dl>
927
+
928
+ <h4>Returns</h4>
929
+
930
+ <p>A new image</p>
931
+
932
+ <h4>Example</h4>
933
+
934
+ <p><code>bilevel_channel(2*MaxRGB/3, RedChannel)</code></p>
935
+
936
+ <p class="rollover"><a href=
937
+ "javascript:popup('bilevel_channel.rb.html')"><img onmouseover=
938
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
939
+ "this.src='ex/bilevel_channel.jpg'" src=
940
+ "ex/bilevel_channel.jpg" alt="bilevel_channel example" title=
941
+ "Click to see the example script" /></a> <img src=
942
+ "ex/images/spin.gif" alt="" class="spin" title=
943
+ "Mouse over the example to see the original image" /></p>
944
+
945
+ <h4>Magick API</h4>
946
+
947
+ <p>BilevelImageChannel (available in ImageMagick 6.0.0)</p>
948
+ </div>
949
+
950
+ <div class="sig">
951
+ <h3 id="blur_channel">blur_channel</h3>
952
+
953
+ <p><span class="arg">image</span>.blur_channel(<span class=
954
+ "arg">radius=0.0</span>, <span class=
955
+ "arg">sigma=1.0</span><span class="arg">[, channel[,
956
+ channel...]]</span>) -&gt; <em>anImage</em></p>
957
+ </div>
958
+
959
+ <div class="desc">
960
+ <h4>Description</h4>
961
+
962
+ <p>Blurs the specified channel. <span class="imquote">We
963
+ convolve the image with a Gaussian operator of the given radius
964
+ and standard deviation (sigma) . The <code>blur_channel</code>
965
+ method differs from <a href=
966
+ "image2.html#gaussian_blur_channel">gaussian_blur_channel</a>
967
+ in that it uses a separable kernel which is faster but
968
+ mathematically equivalent to the non-separable
969
+ kernel.</span></p>
970
+
971
+ <h4>Arguments</h4>
972
+
973
+ <p class="imquote">For reasonable results, the <span class=
974
+ "arg">radius</span> should be larger than <span class=
975
+ "arg">sigma</span>. Use a radius of 0 and
976
+ <code>blur_channel</code> selects a suitable radius for
977
+ you.</p>
978
+
979
+ <dl>
980
+ <dt>channel...</dt>
981
+
982
+ <dd>One or more <a href=
983
+ "constants.html#ChannelType">ChannelType</a> values. If none
984
+ are specified, all channels are blurred. This is the
985
+ equivalent of <a href="#blur_image">blur_image</a>.</dd>
986
+ </dl>
987
+
988
+ <h4>Returns</h4>
989
+
990
+ <p>A new image</p>
991
+
992
+ <h4>See also</h4>
993
+
994
+ <p><a href="#blur_image">blur_image</a>, <a href=
995
+ "image2.html#gaussian_blur_channel">gaussian_blur_channel</a>,
996
+ <a href="image3.html#radial_blur">radial_blur</a></p>
997
+
998
+ <h4>Magick API</h4>
999
+
1000
+ <p>BlurImageChannel (available in ImageMagick 6.0.1)</p>
1001
+ </div>
1002
+
1003
+ <div class="sig">
1004
+ <h3 id="blur_image">blur_image</h3>
1005
+
1006
+ <p><span class="arg">image</span>.blur_image(<span class=
1007
+ "arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
1008
+ -&gt; <em>anImage</em></p>
1009
+ </div>
1010
+
1011
+ <div class="desc">
1012
+ <h4>Description</h4>
1013
+
1014
+ <p>Blurs the image. <span class="imquote">We convolve the image
1015
+ with a Gaussian operator of the given radius and standard
1016
+ deviation (sigma).</span></p>
1017
+
1018
+ <h4>Arguments</h4>
1019
+
1020
+ <p class="imquote">For reasonable results, the <span class=
1021
+ "arg">radius</span> should be larger than <span class=
1022
+ "arg">sigma</span>. Use a <span class="arg">radius</span> of 0
1023
+ and <code>blur_image</code> selects a suitable <span class=
1024
+ "arg">radius</span> for you.</p>
1025
+
1026
+ <h4>Returns</h4>
1027
+
1028
+ <p>A new image.</p>
1029
+
1030
+ <h4>Example</h4>
1031
+
1032
+ <p class="rollover"><a href=
1033
+ "javascript:popup('blur_image.rb.html')"><img onmouseover=
1034
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
1035
+ "this.src='ex/blur_image.jpg'" src="ex/blur_image.jpg" alt=
1036
+ "blur_image example" title=
1037
+ "Click to see the example script" /></a> <img src=
1038
+ "ex/images/spin.gif" alt="" class="spin" title=
1039
+ "Mouse over the example to see the original image" /></p>
1040
+
1041
+ <h4>See also</h4>
1042
+
1043
+ <p><a href="image2.html#gaussian_blur">gaussian_blur</a>,
1044
+ <a href="image2.html#motion_blur">motion_blur</a></p>
1045
+
1046
+ <h4>Magick API</h4>
1047
+
1048
+ <p>BlurImage</p>
1049
+ </div>
1050
+
1051
+ <div class="sig">
1052
+ <h3 id="black_threshold">black_threshold</h3>
1053
+
1054
+ <p><span class="arg">image</span>.black_threshold(<span class=
1055
+ "arg">red_channel</span> [, <span class=
1056
+ "arg">green_channel</span> [, <span class=
1057
+ "arg">blue_channel</span> [, <span class=
1058
+ "arg">opacity_channel</span>]]]) -&gt; <em>anImage</em></p>
1059
+ </div><!-- this example is larger than normal -->
1060
+
1061
+ <div class="desc">
1062
+ <h4>Description</h4>
1063
+
1064
+ <p class="imquote">Forces all pixels below the threshold into
1065
+ black while leaving all pixels above the threshold
1066
+ unchanged.</p>
1067
+
1068
+ <h4>Arguments</h4>
1069
+
1070
+ <p>Each channel argument is a number between 0 and MaxRGB. All
1071
+ arguments except the first may be omitted. If the <span class=
1072
+ "arg">green_channel</span> or <span class=
1073
+ "arg">blue_channel</span> argument is omitted, the default
1074
+ value is the <span class="arg">red_channel</span> value. If the
1075
+ <span class="arg">opacity_channel</span> argument is omitted,
1076
+ the default value is <a href=
1077
+ "constants.html#Opacity">OpaqueOpacity</a>.</p>
1078
+
1079
+ <h4>Returns</h4>
1080
+
1081
+ <p>A new image</p>
1082
+
1083
+ <h4>See also</h4><p><a href=
1084
+ "image3.html#white_threshold">white_threshold</a>, <a href=
1085
+ "#channel_threshold">channel_threshold</a></p>
1086
+
1087
+ <h4>Magick API</h4>
1088
+
1089
+ <p>BlackThresholdImage (available in ImageMagick 5.5.7 and
1090
+ GraphicsMagick 1.1)</p>
1091
+ </div>
1092
+
1093
+ <div class="sig">
1094
+ <h3 id="border">border</h3>
1095
+
1096
+ <p><span class="arg">image</span>.border(<span class=
1097
+ "arg">width</span>, <span class="arg">height</span>,
1098
+ <span class="arg">color</span>) -&gt; <em>anImage</em></p>
1099
+ </div>
1100
+
1101
+ <div class="desc">
1102
+ <h4>Description</h4>
1103
+
1104
+ <p>Add a border around the image.</p>
1105
+
1106
+ <h4>Arguments</h4>
1107
+
1108
+ <dl>
1109
+ <dt>width</dt>
1110
+
1111
+ <dd>Border width in pixels</dd>
1112
+
1113
+ <dt>height</dt>
1114
+
1115
+ <dd>Border height in pixels</dd>
1116
+
1117
+ <dt>color</dt>
1118
+
1119
+ <dd>Border color. Use a <a href=
1120
+ "imusage.html#color_names">named color</a> or a <a href=
1121
+ "struct.html#Pixel">Pixel</a> object.</dd>
1122
+ </dl>
1123
+
1124
+ <h4>Returns</h4>
1125
+
1126
+ <p>A new image</p>
1127
+
1128
+ <h4>Example</h4>
1129
+
1130
+ <p class="rollover"><a href=
1131
+ "javascript:popup('border.rb.html')"><img style=
1132
+ "padding:10px; display:none" id="borderless" onmouseout=
1133
+ "this.style.display='none'; bordered.style.display='';" src=
1134
+ "ex/images/Flower_Hat.jpg" alt="border example" title=
1135
+ "Click to see the example script" name="borderless" /> <img id=
1136
+ "bordered" onmouseover=
1137
+ "this.style.display='none'; borderless.style.display='';" src=
1138
+ "ex/border.jpg" alt="border example" name="bordered" /></a>
1139
+ <img src="ex/images/spin.gif" alt="" class="spin" style=
1140
+ "left: 224px;" title=
1141
+ "Mouse over the example to see the original image" /></p>
1142
+
1143
+ <h4>See also</h4><p><a href="#border_bang">border!</a>, <a href=
1144
+ "image2.html#frame">frame</a></p>
1145
+
1146
+ <h4>Magick API</h4>
1147
+
1148
+ <p>BorderImage</p>
1149
+ </div>
1150
+
1151
+ <div class="sig">
1152
+ <h3 id="border_bang">border!</h3>
1153
+
1154
+ <p><span class="arg">image</span>.border!(<span class=
1155
+ "arg">width</span>, <span class="arg">height</span>,
1156
+ <span class="arg">color</span>) -&gt; <em>self</em></p>
1157
+ </div>
1158
+
1159
+ <div class="desc">
1160
+ <h4>Description</h4>
1161
+
1162
+ <p>In-place form of <a href="#border">border</a></p>
1163
+
1164
+ <h4>Returns</h4>
1165
+
1166
+ <p>self</p>
1167
+ </div>
1168
+
1169
+ <div class="sig">
1170
+ <h3 id="change_geometry">change_geometry</h3>
1171
+
1172
+ <p><span class="arg">image</span>.change_geometry(<span class=
1173
+ "arg">aString</span>) {|cols,rows,image| <span class=
1174
+ "arg">block</span>} -&gt; <em>??? (see Returns)</em><br />
1175
+ <span class="arg">image.change_geometry</span>(<span class=
1176
+ "arg">aGeometry</span>) {|cols,rows,image| <span class=
1177
+ "arg">block</span>} -&gt; <em>??? (see Returns)</em></p>
1178
+ </div>
1179
+
1180
+ <div class="desc">
1181
+ <h4>Description</h4>
1182
+
1183
+ <p>The <code>change_geometry</code> method supports resizing a
1184
+ method by specifying constraints. For example, you can specify
1185
+ that the image should be resized such that the aspect ratio
1186
+ should be retained but the resulting image should be no larger
1187
+ than 640 pixels wide and 480 pixels tall.</p>
1188
+
1189
+ <p>The argument may be either a <a href=
1190
+ "imusage.html#geometry">geometry string</a> or a <a href=
1191
+ "struct.html#Geometry">Geometry</a> object.
1192
+ <code>Change_geometry</code> yields to the block, passing new
1193
+ width and height values based on the argument with respect to
1194
+ <code>self</code>. The return value is the return value of the
1195
+ block.</p>
1196
+
1197
+ <h4>Arguments</h4>An <a href="imusage.html#geometry">geometry
1198
+ string</a> or a <code>Geometry</code> object
1199
+
1200
+ <h4>Returns</h4>
1201
+
1202
+ <p>The value returned by the block</p>
1203
+
1204
+ <h4>Example</h4>
1205
+ <pre>
1206
+ mona = Magick::Image.read('MonaLisa.jpg').first
1207
+ mona.change_geometry!('320x240') { |cols, rows, img|
1208
+ img.resize!(cols, rows)
1209
+ }
1210
+ </pre>
1211
+
1212
+ <h4>Magick API</h4>
1213
+
1214
+ <p>ParseSizeString</p>
1215
+
1216
+ <h4>Note</h4>
1217
+
1218
+ <p><code>change_geometry!</code> is an alias for
1219
+ <code>change_geometry</code>.</p>
1220
+ </div>
1221
+
1222
+ <div class="sig">
1223
+ <h3 id="changed_q">changed?</h3>
1224
+
1225
+ <p><span class="arg">image</span>.changed? -&gt;
1226
+ <code>true</code> or <code>false</code></p>
1227
+ </div>
1228
+
1229
+ <div class="desc">
1230
+ <h4>Description</h4>Returns <code>true</code> if any pixel has
1231
+ been altered since the image was constituted.
1232
+
1233
+ <h4>Magick API</h4>
1234
+
1235
+ <p>IsTaintImage</p>
1236
+ </div>
1237
+
1238
+ <div class="sig">
1239
+ <h3 id="channel">channel</h3>
1240
+
1241
+ <p><span class="arg">image</span>.channel(<span class=
1242
+ "arg">aChannelType</span>) -&gt; <em>anImage</em></p>
1243
+ </div>
1244
+
1245
+ <div class="desc">
1246
+ <h4>Description</h4>
1247
+
1248
+ <p>Extracts a channel from the image. <span class="imquote">A
1249
+ channel is a particular color component of each pixel in the
1250
+ [image].</span></p>
1251
+
1252
+ <h4>Arguments</h4>
1253
+
1254
+ <p>A <a href="constants.html#ChannelType">ChannelType</a>
1255
+ constant.</p>
1256
+
1257
+ <h4>Returns</h4>
1258
+
1259
+ <p>An image in which the RGB values of all the pixels have been
1260
+ set to a gray corresponding to the specified channel value. For
1261
+ example, given a pixel in the original image with the value
1262
+ R=255, G=128, B=0 and the RedChannel argument, the equivalent
1263
+ pixel in the result image will have the value R=255, G=255, and
1264
+ B=255. For the BlueChannel argument, the pixel would have the
1265
+ value R=0, G=0, B=0.</p>
1266
+
1267
+ <h4>Example</h4>
1268
+
1269
+ <p>The channel image preserves the tone of the selected RGB
1270
+ component.</p>
1271
+
1272
+ <p><a href="javascript:popup('channel.rb.html')"><img src=
1273
+ "ex/channel.jpg" alt="channel example" /></a></p>
1274
+
1275
+ <h4>Magick API</h4>
1276
+
1277
+ <p>ChannelImage</p>
1278
+ </div>
1279
+
1280
+ <div class="sig">
1281
+ <h3 id="channel_depth">channel_depth</h3>
1282
+
1283
+ <p><span class="arg">image</span>.channel_depth([<span class=
1284
+ "arg">channel</span> [, <span class="arg">channel</span>]...])
1285
+ -&gt; <em>aNumeric</em></p>
1286
+ </div>
1287
+
1288
+ <div class="desc">
1289
+ <h4>Description</h4>
1290
+
1291
+ <p>Returns the maximum depth for the specified channel or
1292
+ channels.</p>
1293
+
1294
+ <h4>Arguments</h4>
1295
+
1296
+ <dl>
1297
+ <dt>[channel [, channel...]]</dt>
1298
+
1299
+ <dd>Zero or more <a href=
1300
+ "constants.html#ChannelType">ChannelType</a> constants. If no
1301
+ arguments are specified, the default is all channels.</dd>
1302
+ </dl>
1303
+
1304
+ <h4>Returns</h4>
1305
+
1306
+ <p>The maximum depth</p>
1307
+
1308
+ <h4>See also</h4><p><a href=
1309
+ "image3.html#set_channel_depth">set_channel_depth</a></p>
1310
+
1311
+ <h4>Magick API</h4>
1312
+
1313
+ <p>GetImageChannelDepth (available in ImageMagick 6.0.0)</p>
1314
+ </div>
1315
+
1316
+ <div class="sig">
1317
+ <h3 id="channel_extrema">channel_extrema</h3>
1318
+
1319
+ <p><span class="arg">image</span>.channel_extrema([<span class=
1320
+ "arg">channel</span> [, <span class="arg">channel</span>]...])
1321
+ -&gt; <em>[aNumeric, aNumeric]</em></p>
1322
+ </div>
1323
+
1324
+ <div class="desc">
1325
+ <h4>Description</h4>
1326
+
1327
+ <p>Returns the minimum and maximum intensity values for the
1328
+ specified channel or channels.</p>
1329
+
1330
+ <h4>Arguments</h4>
1331
+
1332
+ <dl>
1333
+ <dt>[channel [, channel...]]</dt>
1334
+
1335
+ <dd>Zero or more <a href=
1336
+ "constants.html#ChannelType">ChannelType</a> values. If no
1337
+ arguments are specified, the default is all channels.
1338
+ <em>GraphicsMagick users note:</em> Specify exactly one
1339
+ channel. The <code>AllChannels</code> value is not
1340
+ supported.</dd>
1341
+ </dl>
1342
+
1343
+ <h4>Returns</h4>
1344
+
1345
+ <p>An array. The first element in the array is the minimum
1346
+ value. The second element is the maximum value.</p>
1347
+
1348
+ <h4>See also</h4>
1349
+
1350
+ <p>GraphicsMagick users see <a href=
1351
+ "image3.html#statistics">statistics</a></p>
1352
+
1353
+ <h4>Magick API</h4>
1354
+
1355
+ <p>GetImageChannelExtrema (available in ImageMagick 6.0.0),
1356
+ GetImageStatistics (available in GraphicsMagick 1.1)</p>
1357
+ </div>
1358
+
1359
+ <div class="sig">
1360
+ <h3 id="channel_mean">channel_mean</h3>
1361
+
1362
+ <p><span class="arg">image</span>.channel_mean([<span class=
1363
+ "arg">channel</span> [, <span class="arg">channel</span>]...])
1364
+ -&gt; <em>[aNumeric, aNumeric]</em></p>
1365
+ </div>
1366
+
1367
+ <div class="desc">
1368
+ <h4>Description</h4>
1369
+
1370
+ <p>Returns the mean and standard deviation values for the
1371
+ specified channel or channels.</p>
1372
+
1373
+ <h4>Arguments</h4>
1374
+
1375
+ <dl>
1376
+ <dt>[channel [, channel...]]</dt>
1377
+
1378
+ <dd>Zero or more <a href=
1379
+ "constants.html#ChannelType">ChannelType</a> values. If no
1380
+ arguments are specified, the default is all channels.
1381
+ <em>GraphicsMagick users note:</em> Specify exactly one
1382
+ channel. The <code>AllChannels</code> value is not
1383
+ supported.</dd>
1384
+ </dl>
1385
+
1386
+ <h4>Returns</h4>
1387
+
1388
+ <p>An array. The first element in the array is the mean value.
1389
+ The second element is the standard deviation.</p>
1390
+
1391
+ <h4>See also</h4>
1392
+
1393
+ <p>GraphicsMagick users see <a href=
1394
+ "image3.html#statistics">statistics</a></p>
1395
+
1396
+ <h4>Magick API</h4>
1397
+
1398
+ <p>GetImageChannelMean (available in ImageMagick 6.0.0),
1399
+ GetImageStatistics (available in GraphicsMagick 1.1)</p>
1400
+ </div>
1401
+
1402
+ <div class="sig">
1403
+ <h3 id="channel_threshold">channel_threshold</h3>
1404
+
1405
+ <p><span class=
1406
+ "arg">image</span>.channel_threshold(<span class="arg">red_channel</span>,
1407
+ [<span class="arg">green_channel</span>[, <span class=
1408
+ "arg">blue_channel</span>[, <span class=
1409
+ "arg">opacity_channel</span>]]]) -&gt; <em>anImage</em></p>
1410
+ </div>
1411
+
1412
+ <div class="desc">
1413
+ <h4>Description</h4>
1414
+
1415
+ <p>Creates a high-contrast image by changing the pixels based
1416
+ on the intensity of each pixel channel.</p>
1417
+
1418
+ <h4>Arguments</h4>Each channel argument is a number between 0
1419
+ and MaxRGB. All arguments except the first may be omitted. If
1420
+ the <span class="arg">green_channel</span> or <span class=
1421
+ "arg">blue_channel</span> argument is omitted, the default
1422
+ value is the <span class="arg">red_channel</span> value. If the
1423
+ <span class="arg">opacity_channel</span> argument is omitted,
1424
+ the default value is <a href=
1425
+ "constants.html#Opacity">OpaqueOpacity</a>.
1426
+
1427
+ <h4>Returns</h4>
1428
+
1429
+ <p>A new image</p>
1430
+
1431
+ <h4>Example</h4>
1432
+
1433
+ <p class="rollover"><a href=
1434
+ "javascript:popup('channel_threshold.rb.html')"><img onmouseover="this.src='ex/channel_threshold_before.jpg'"
1435
+ onmouseout="this.src='ex/channel_threshold_after.jpg'" src=
1436
+ "ex/channel_threshold_after.jpg" alt=
1437
+ "channel_threshold example" title=
1438
+ "Click the image to see the example script" /></a> <img src=
1439
+ "ex/images/spin.gif" alt="" class="spin" style="left: 446px"
1440
+ title="Mouse over the example to see the original image" /></p>
1441
+
1442
+ <h4>See also</h4><p><a href=
1443
+ "#adaptive_threshold">adaptive_threshold</a>, <a href=
1444
+ "#black_threshold">black_threshold</a>, <a href=
1445
+ "image3.html#random_channel_threshold">random_channel_threshold</a>,
1446
+ <a href="image3.html#threshold">threshold</a>, <a href=
1447
+ "image3.html#white_threshold">white_threshold</a></p>
1448
+
1449
+ <h4>Magick API</h4>
1450
+
1451
+ <p>ThresholdImageChannel</p>
1452
+ </div>
1453
+
1454
+ <div class="sig">
1455
+ <h3 id="charcoal">charcoal</h3>
1456
+
1457
+ <p><span class="arg">image</span>.charcoal(<span class=
1458
+ "arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
1459
+ -&gt; <em>anImage</em></p>
1460
+ </div>
1461
+
1462
+ <div class="desc">
1463
+ <h4>Description</h4>
1464
+
1465
+ <p>Adds a "charcoal" effect to the image. You can alter the
1466
+ intensity of the effect by changing the <span class=
1467
+ "arg">radius</span> and <span class="arg">sigma</span>
1468
+ arguments.</p>
1469
+
1470
+ <h4>Arguments</h4>
1471
+
1472
+ <dl>
1473
+ <dt>radius</dt>
1474
+
1475
+ <dd class="imquote">The radius of the pixel
1476
+ neighborhood.</dd>
1477
+
1478
+ <dt>sigma</dt>
1479
+
1480
+ <dd class="imquote">The standard deviation of the Gaussian,
1481
+ in pixels.</dd>
1482
+ </dl>
1483
+
1484
+ <h4>Returns</h4>
1485
+
1486
+ <p>A new image</p>
1487
+
1488
+ <h4>Example</h4>
1489
+
1490
+ <p class="rollover"><a href=
1491
+ "javascript:popup('charcoal.rb.html')"><img onmouseover=
1492
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
1493
+ "this.src='ex/charcoal.jpg'" src="ex/charcoal.jpg" alt=
1494
+ "charcoal example" title=
1495
+ "Click the image to see the example script" /></a> <img src=
1496
+ "ex/images/spin.gif" alt="" class="spin" title=
1497
+ "Mouse over the example to see the original image" /></p>
1498
+
1499
+ <h4>Magick API</h4>
1500
+
1501
+ <p>CharcoalImage</p>
1502
+ </div>
1503
+
1504
+ <div class="sig">
1505
+ <h3 id="chop">chop</h3>
1506
+
1507
+ <p><span class="arg">image</span>.chop(<span class=
1508
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1509
+ "arg">width</span>, <span class="arg">height</span>) -&gt;
1510
+ <em>anImage</em></p>
1511
+ </div>
1512
+
1513
+ <div class="desc">
1514
+ <h4>Description</h4>
1515
+
1516
+ <p>Removes the specified rectangle and collapses the rest of
1517
+ the image to fill the removed portion.</p>
1518
+
1519
+ <h4>Arguments</h4>
1520
+
1521
+ <dl>
1522
+ <dt>x</dt>
1523
+
1524
+ <dd>The x offset of the rectangle from the upper-left corner
1525
+ of the image.</dd>
1526
+
1527
+ <dt>y</dt>
1528
+
1529
+ <dd>The y offset of the rectangle from the upper-left corner
1530
+ of the image.</dd>
1531
+
1532
+ <dt>width</dt>
1533
+
1534
+ <dd>The width of the rectangle.</dd>
1535
+
1536
+ <dt>height</dt>
1537
+
1538
+ <dd>The height of the rectangle.</dd>
1539
+ </dl>
1540
+
1541
+ <h4>Returns</h4>
1542
+
1543
+ <p>A new image</p>
1544
+
1545
+ <h4>Example</h4>
1546
+
1547
+ <p>The chop rectangle is highlighted in the "before" image. The
1548
+ result may seem counter-intuitive!</p>
1549
+
1550
+ <p class="rollover"><a href=
1551
+ "javascript:popup('chop.rb.html')"><img onmouseover=
1552
+ "this.src='ex/chop_before.jpg'" onmouseout=
1553
+ "this.src='ex/chop_after.jpg'" src="ex/chop_after.jpg" alt=
1554
+ "chop example" title=
1555
+ "Click the image to see the example script" /></a> <img src=
1556
+ "ex/images/spin.gif" alt="" class="spin" title=
1557
+ "Mouse over the example to see the original image" /></p>
1558
+
1559
+ <h4>See also</h4>
1560
+
1561
+ <p><a href="#crop">crop</a></p>
1562
+
1563
+ <h4>Magick API</h4>
1564
+
1565
+ <p>ChopImage</p>
1566
+ </div>
1567
+
1568
+ <div class="sig">
1569
+ <h3 id="clone">clone</h3>
1570
+
1571
+ <p><span class="arg">image</span>.clone -&gt;
1572
+ <em>anImage</em></p>
1573
+ </div>
1574
+
1575
+ <div class="desc">
1576
+ <h4>Description</h4>
1577
+
1578
+ <p>Same as <a href="#dup">dup</a> except the frozen state of
1579
+ the original is propogated to the new copy.</p>
1580
+
1581
+ <h4>Returns</h4>
1582
+
1583
+ <p>A new image</p>
1584
+
1585
+ <h4>See also</h4>
1586
+
1587
+ <p><a href="#dup">dup</a></p>
1588
+ </div>
1589
+
1590
+ <div class="sig">
1591
+ <h3 id="color_fill_to_border">color_fill_to_border</h3>
1592
+
1593
+ <p><span class=
1594
+ "arg">image</span>.color_fill_to_border(<span class=
1595
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1596
+ "arg">fill_color</span>) -&gt; <em>anImage</em></p>
1597
+ </div>
1598
+
1599
+ <div class="desc">
1600
+ <h4>Description</h4>
1601
+
1602
+ <p>Changes any pixel that is a neighbor of the target pixel and
1603
+ is not the border color to the fill color.</p>
1604
+
1605
+ <h4>Arguments</h4>
1606
+
1607
+ <dl>
1608
+ <dt>x, y</dt>
1609
+
1610
+ <dd>The target pixel's location.</dd>
1611
+
1612
+ <dt>fill_color</dt>
1613
+
1614
+ <dd>The fill color. The fill color can be either color name
1615
+ or a <a href="struct.html#Pixel">Pixel</a> object.</dd>
1616
+ </dl>
1617
+
1618
+ <h4>Returns</h4>
1619
+
1620
+ <p>A new image</p>
1621
+
1622
+ <h4>Example</h4>
1623
+
1624
+ <p>In this example, the aquamarine fill starts at the center of
1625
+ the circle and fills to the black border. All non-black pixels
1626
+ are replaced by the fill color. Contrast the result of
1627
+ <code>color_fill_to_border</code> with that of
1628
+ <code>color_floodfill</code> example, below.</p>
1629
+
1630
+ <p class="rollover"><a href=
1631
+ "javascript:popup('color_fill_to_border.rb.html')"><img onmouseover="this.src='ex/color_fill_to_border_before.gif'"
1632
+ onmouseout="this.src='ex/color_fill_to_border_after.gif'" src=
1633
+ "ex/color_fill_to_border_after.gif" alt=
1634
+ "color_fill_to_border example" title=
1635
+ "Click the image to see the example script" /></a><img src=
1636
+ "ex/images/spin.gif" alt="" class="spin" style=
1637
+ "margin-bottom: 182px; margin-left: 4px;" title=
1638
+ "Mouse over the example to see the original image" /></p>
1639
+
1640
+ <h4>See also</h4><p><a href="#color_floodfill">color_floodfill</a></p>
1641
+
1642
+ <h4>Magick API</h4>
1643
+
1644
+ <p>ColorFloodfillImage</p>
1645
+ </div>
1646
+
1647
+ <div class="sig">
1648
+ <h3 id="color_floodfill">color_floodfill</h3>
1649
+
1650
+ <p><span class="arg">image</span>.color_floodfill(<span class=
1651
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1652
+ "arg">fill_color</span>) -&gt; <em>anImage</em></p>
1653
+ </div>
1654
+
1655
+ <div class="desc">
1656
+ <h4>Description</h4>
1657
+
1658
+ <p>Changes any pixel that is the same color and is a neighbor
1659
+ of the target pixel to the fill color.</p>
1660
+
1661
+ <h4>Arguments</h4>
1662
+
1663
+ <dl>
1664
+ <dt>x, y</dt>
1665
+
1666
+ <dd>The target pixel's location.</dd>
1667
+
1668
+ <dt>fill_color</dt>
1669
+
1670
+ <dd>The fill color, either color name or a <a href=
1671
+ "struct.html#Pixel">Pixel</a> object.</dd>
1672
+ </dl>
1673
+
1674
+ <h4>Returns</h4>
1675
+
1676
+ <p>A new image</p>
1677
+
1678
+ <h4>Example</h4>
1679
+
1680
+ <p>In this example, the aquamarine fill starts at the center of
1681
+ the circle and replaces all neighboring white pixels. Contrast
1682
+ the result of <code>color_floodfill</code> with that of
1683
+ <code>color_fill_to_border</code>, above.</p>
1684
+
1685
+ <p class="rollover"><a href=
1686
+ "javascript:popup('color_floodfill.rb.html')"><img onmouseover=
1687
+ "this.src='ex/color_floodfill_before.gif'" onmouseout=
1688
+ "this.src='ex/color_floodfill_after.gif'" src=
1689
+ "ex/color_floodfill_after.gif" alt="color_floodfill example"
1690
+ title="Click the image to see the example script" /></a>
1691
+ <img src="ex/images/spin.gif" alt="" class="spin" style=
1692
+ "margin-bottom: 182px;" title=
1693
+ "Mouse over the example to see the original image" /></p>
1694
+
1695
+ <h4>See also</h4><p><a href=
1696
+ "#color_fill_to_border">color_fill_to_border</a>, <a href=
1697
+ "image2.html#opaque">opaque</a></p>
1698
+
1699
+ <h4>Magick API</h4>
1700
+
1701
+ <p>ColorFloodfillImage</p>
1702
+ </div>
1703
+
1704
+ <div class="sig">
1705
+ <h3 id="color_histogram">color_histogram</h3>
1706
+
1707
+ <p><span class="arg">image</span>.color_histogram() -&gt;
1708
+ <em>aHash</em></p>
1709
+ </div>
1710
+
1711
+ <div class="desc">
1712
+ <h4>Description</h4>
1713
+
1714
+ <p>Computes the number of times each unique color appears in
1715
+ the image.</p>
1716
+
1717
+ <h4>Returns</h4>
1718
+
1719
+ <p>A hash. Each key in the hash is a <a href=
1720
+ "struct.html#Pixel">Pixel</a> representing a color that appears
1721
+ in the image. The value associated with the key is the number
1722
+ of times that color appears in the image. <em>Caution:</em> if
1723
+ the image contains many colors the hash will be very large. You
1724
+ may want to use the <a href="image3.html#quantize">quantize</a>
1725
+ method to reduce the number of colors before using
1726
+ <code>color_histogram</code>.</p>
1727
+
1728
+ <h4>Example</h4>
1729
+
1730
+ <p>This histogram was produced by sorting the hash returned by
1731
+ <code>color_histogram</code> by increasing frequency.</p>
1732
+
1733
+ <p><a href=
1734
+ "javascript:popup('color_histogram.rb.html')"><img src=
1735
+ "ex/color_histogram.gif" alt="color_histogram example" title=
1736
+ "Click the image to see the example script" /></a></p>
1737
+
1738
+ <h4>Magick API</h4>GetColorHistogram (available in
1739
+ GraphicsMagick 1.1), GetImageHistogram (available in
1740
+ ImageMagick 6.0.0)
1741
+ </div>
1742
+
1743
+ <div class="sig">
1744
+ <h3 id="colorize">colorize</h3>
1745
+
1746
+ <p><span class="arg">image</span>.colorize(<span class=
1747
+ "arg">red_pct</span>, <span class="arg">green_pct</span>,
1748
+ <span class="arg">blue_pct</span>, [<span class=
1749
+ "arg">matte_pct</span>, ] <span class="arg">fill</span>) -&gt;
1750
+ <em>anImage</em></p>
1751
+ </div>
1752
+
1753
+ <div class="desc">
1754
+ <h4>Description</h4>
1755
+
1756
+ <p>Blend the fill color with the image pixels. The red_pct,
1757
+ green_pct, blue_pct and matte_pct arguments are the percentage
1758
+ to blend with the red, green, blue and matte channels.</p>
1759
+
1760
+ <h4>Arguments</h4>
1761
+
1762
+ <dl>
1763
+ <dt>red_pct, green_pct, blue_pct, matte_pct</dt>
1764
+
1765
+ <dd>The percentage of the fill color red, green, blue and
1766
+ matte (tranparency) components to blend with the image pixel.
1767
+ For example, <code>.25</code> is 25%. The matte_pct argument
1768
+ is optional.</dd>
1769
+
1770
+ <dt>fill</dt>
1771
+
1772
+ <dd>A color name or a <a href="struct.html#Pixel">Pixel</a>
1773
+ structure</dd>
1774
+ </dl>
1775
+
1776
+ <h4>Returns</h4>
1777
+
1778
+ <p>A new image</p>
1779
+
1780
+ <h4>Example</h4>
1781
+
1782
+ <p>This example converts a color image to sepia-tone using the
1783
+ <a href="image3.htlm#quantize">quantize</a> and
1784
+ <code>colorize</code> methods.</p>
1785
+
1786
+ <p class="rollover"><a href=
1787
+ "javascript:popup('colorize.rb.html')"><img onmouseover=
1788
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
1789
+ "this.src='ex/colorize.jpg'" src="ex/colorize.jpg" alt=
1790
+ "colorize example" title=
1791
+ "Click the image to see the example script" /></a> <img src=
1792
+ "ex/images/spin.gif" alt="" class="spin" title=
1793
+ "Mouse over the example to see the original image" /></p>
1794
+
1795
+ <h4>Magick API</h4>
1796
+
1797
+ <p>ColorizeImage</p>
1798
+ </div>
1799
+
1800
+ <div class="sig">
1801
+ <h3 id="colormap">colormap</h3>
1802
+
1803
+ <p><span class="arg">image</span>.colormap(<span class=
1804
+ "arg">index</span>[, <span class="arg">new_color</span>]) -&gt;
1805
+ <em>aString</em></p>
1806
+ </div>
1807
+
1808
+ <div class="desc">
1809
+ <h4>Description</h4>
1810
+
1811
+ <p>Returns the color in the color map at the specified index.
1812
+ If the <span class="arg">new_color</span> argument is
1813
+ specified, replaces the color at that index with the new
1814
+ color.</p>
1815
+
1816
+ <p>Raises IndexError if the image does not contain a color map.
1817
+ Only <a href="constants.html#ClassType">PseudoClass</a> images
1818
+ have a color map.</p>
1819
+
1820
+ <h4>Arguments</h4>
1821
+
1822
+ <dl>
1823
+ <dt>index</dt>
1824
+
1825
+ <dd>A number between 0 and the number of colors in the color
1826
+ map. If the value is out of range, <code>colormap</code>
1827
+ raises an IndexError. You can get the number of colors in the
1828
+ color map from the <a href=
1829
+ "imageattrs.html#colors">colors</a> attribute.</dd>
1830
+
1831
+ <dt>new_color</dt>
1832
+
1833
+ <dd>Optional. If specified, may be either a <a href=
1834
+ "imusage.html#color_names">color name</a> or a <a href=
1835
+ "struct.html#Pixel">Pixel</a>.</dd>
1836
+ </dl>
1837
+
1838
+ <h4>Returns</h4>
1839
+
1840
+ <p>The name of the color at the specified location in the color
1841
+ map</p>
1842
+ </div>
1843
+
1844
+ <div class="sig">
1845
+ <h3 id="color_point">color_point</h3>
1846
+
1847
+ <p><span class="arg">image</span>.color_point(<span class=
1848
+ "arg">x</span>, <span class="arg">y</span>, <span class=
1849
+ "arg">fill</span>) -&gt; <em>anImage</em></p>
1850
+ </div>
1851
+
1852
+ <div class="desc">
1853
+ <h4>Description</h4>Set the color of the pixel at <span class=
1854
+ "arg">x</span>,<span class="arg">y</span> to the fill color.
1855
+ This method creates a new image object. If you want to set a
1856
+ single pixel in the image without creating a new image, use
1857
+ <a href="image3.html#pixel_color">pixel_color</a> or the
1858
+ <a href="draw.html#point">Draw#point</a> method.
1859
+
1860
+ <h4>Arguments</h4>
1861
+
1862
+ <dl>
1863
+ <dt>x, y</dt>
1864
+
1865
+ <dd>The location of the pixel.</dd>
1866
+
1867
+ <dt>fill</dt>
1868
+
1869
+ <dd>The fill color, either color name or a <a href=
1870
+ "struct.html#Pixel">Pixel</a> object.</dd>
1871
+ </dl>
1872
+
1873
+ <h4>Returns</h4>
1874
+
1875
+ <p>A new image</p>
1876
+
1877
+ <h4>Example</h4>
1878
+ <pre>
1879
+ f.color_point(50,50, 'red')
1880
+ </pre>
1881
+
1882
+ <h4>See also</h4><p><a href=
1883
+ "image3.html#pixel_color">pixel_color</a>, <a href=
1884
+ "draw.html#point">Draw#point</a></p>
1885
+
1886
+ <h4>Magick API</h4>
1887
+
1888
+ <p>GetImagePixels, SyncImagePixels</p>
1889
+ </div>
1890
+
1891
+ <div class="sig">
1892
+ <h3 id="color_reset_bang">color_reset!</h3>
1893
+
1894
+ <p><span class="arg">image</span>.color_reset!(<span class=
1895
+ "arg">fill</span>) -&gt; <em>image</em></p>
1896
+ </div>
1897
+
1898
+ <div class="desc">
1899
+ <h4>Description</h4>
1900
+
1901
+ <p>Sets all the pixels in the image to the specified fill
1902
+ color.</p>
1903
+
1904
+ <h4>Arguments</h4>The fill color, either color name or a
1905
+ <a href="struct.html#Pixel">Pixel</a> object.
1906
+
1907
+ <h4>Returns</h4>self
1908
+
1909
+ <h4>Example</h4>
1910
+ <pre>
1911
+ f.color_reset!(red)
1912
+ </pre>
1913
+
1914
+ <h4>See also</h4><p><a href="image2.html#erase_bang">erase!</a></p>
1915
+
1916
+ <h4>Magick API</h4>SetImage
1917
+ </div>
1918
+
1919
+ <div class="sig">
1920
+ <h3 id="compare_channel">compare_channel</h3>
1921
+
1922
+ <p><span class="arg">image</span>.compare_channel(<span class=
1923
+ "arg">img</span>, <span class="arg">metric</span> [,
1924
+ <span class="arg">channel...</span>]) -&gt; [<em>anImage</em>,
1925
+ <em>aFloat</em>]</p>
1926
+ </div>
1927
+
1928
+ <div class="desc">
1929
+ <h4>Description</h4>
1930
+
1931
+ <p>Compares <span class="arg">img</span> with the receiver.</p>
1932
+
1933
+ <h4>Arguments</h4>
1934
+
1935
+ <dl>
1936
+ <dt>image</dt>
1937
+
1938
+ <dd>Either an imagelist or an image. If an imagelist, uses
1939
+ the current image.</dd>
1940
+
1941
+ <dt>metric</dt>
1942
+
1943
+ <dd>
1944
+ The desired distortion metric. One of the following
1945
+ constants:
1946
+
1947
+ <ul style="list-style: none">
1948
+ <li>MeanAbsoluteErrorMetric</li>
1949
+
1950
+ <li>MeanSquaredErrorMetric</li>
1951
+
1952
+ <li>PeakAbsoluteErrorMetric</li>
1953
+
1954
+ <li>PeakSignalToNoiseRatioMetric</li>
1955
+
1956
+ <li>RootMeanSquaredErrorMetric</li>
1957
+ </ul>
1958
+ </dd>
1959
+
1960
+ <dt>[channel [, channel...]]</dt>
1961
+
1962
+ <dd>Zero or more <a href=
1963
+ "constants.html##ChannelType">ChannelType</a> values. All the
1964
+ specified channels contribute to the comparison and the
1965
+ distortion value. If no channels are specified, compares all
1966
+ channels.</dd>
1967
+ </dl>
1968
+
1969
+ <h4>Returns</h4>
1970
+
1971
+ <p>An array. The first element is a difference image, the
1972
+ second is a the value of the computed distortion represented as
1973
+ a <code>Float</code>.</p>
1974
+
1975
+ <h4>See also</h4><p><a href="#difference">difference</a>, <a href=
1976
+ "#spaceship">&lt;=&gt;</a></p>
1977
+
1978
+ <h4>Magick API</h4>
1979
+
1980
+ <p>ImageCompareChannels (available in ImageMagick 6.0.0)</p>
1981
+
1982
+ <h4>Notes</h4>
1983
+
1984
+ <p>This method was named <code>channel_compare</code> in
1985
+ earlier releases of RMagick. That name remains an alias for
1986
+ <code>compare_channel</code>.</p>
1987
+ </div>
1988
+
1989
+ <div class="sig">
1990
+ <h3 id="composite">composite</h3>
1991
+
1992
+ <p><span class="arg">image</span>.composite(<span class=
1993
+ "arg">img</span>, <span class="arg">x</span>, <span class=
1994
+ "arg">y</span>, <span class="arg">composite_op</span>) -&gt;
1995
+ <em>anImage</em><br />
1996
+ <span class="arg">image</span>.composite(<span class=
1997
+ "arg">img</span>, <span class="arg">gravity</span>,
1998
+ <span class="arg">composite_op</span>) -&gt;
1999
+ <em>anImage</em><br />
2000
+ <span class="arg">image</span>.composite(<span class=
2001
+ "arg">img</span>, <span class="arg">gravity</span>,
2002
+ <span class="arg">x</span>, <span class="arg">y</span>,
2003
+ <span class="arg">composite_op</span>) -&gt;
2004
+ <em>anImage</em></p>
2005
+ </div>
2006
+
2007
+ <div class="desc">
2008
+ <h4>Description</h4>Composites <span class="arg">img</span>
2009
+ onto <span class="arg">image</span> using the specified
2010
+ composite operator.
2011
+
2012
+ <h4>Arguments</h4>
2013
+
2014
+ <p>The composite method can be called three different ways:</p>
2015
+
2016
+ <dl>
2017
+ <dt style="font-style:normal">1.&nbsp;Without a gravity
2018
+ argument:</dt>
2019
+
2020
+ <dd>
2021
+ <dl>
2022
+ <dt>img</dt>
2023
+
2024
+ <dd>Either an imagelist or an image. If an imagelist,
2025
+ uses the current image.</dd>
2026
+
2027
+ <dt>x, y</dt>
2028
+
2029
+ <dd>The x- and y-offset of the composited image, measured
2030
+ from the upper-left corner of the image.</dd>
2031
+
2032
+ <dt>composite_op</dt>
2033
+
2034
+ <dd>A <a href=
2035
+ "constants.html#CompositeOperator">CompositeOperator</a>
2036
+ constant.</dd>
2037
+ </dl>
2038
+ </dd>
2039
+
2040
+ <dt style="font-style:normal">2.&nbsp;With a gravity
2041
+ argument, without x and y arguments:</dt>
2042
+
2043
+ <dd>
2044
+ <dl>
2045
+ <dt>img</dt>
2046
+
2047
+ <dd>Either an imagelist or an image. If an imagelist,
2048
+ uses the current image.</dd>
2049
+
2050
+ <dt>gravity</dt>
2051
+
2052
+ <dd>
2053
+ A <a href="constants.html#GravityType">GravityType</a>
2054
+ constant that specifies the location of <em>img</em> on
2055
+ <em>image</em>:
2056
+
2057
+ <dl>
2058
+ <dt>NorthWestGravity</dt>
2059
+
2060
+ <dd>The composited image abuts the top and left sides
2061
+ of the image.</dd>
2062
+
2063
+ <dt>NorthGravity</dt>
2064
+
2065
+ <dd>The composited image is centered left-to-right
2066
+ and abuts the top of the image.</dd>
2067
+
2068
+ <dt>NorthEastGravity</dt>
2069
+
2070
+ <dd>The composited image abuts the top and right
2071
+ sides of the image.</dd>
2072
+
2073
+ <dt>EastGravity</dt>
2074
+
2075
+ <dd>The composited image is centered top-to-bottom
2076
+ and abuts the right side of the image.</dd>
2077
+
2078
+ <dt>SouthEastGravity</dt>
2079
+
2080
+ <dd>The composited image abuts the bottom and right
2081
+ sides of the image.</dd>
2082
+
2083
+ <dt>SouthGravity</dt>
2084
+
2085
+ <dd>The composited image is centered left-to-right
2086
+ and abuts the bottom of the image.</dd>
2087
+
2088
+ <dt>SouthWestGravity</dt>
2089
+
2090
+ <dd>The composited image abuts the bottom and left
2091
+ sides of the image.</dd>
2092
+
2093
+ <dt>WestGravity</dt>
2094
+
2095
+ <dd>The composited image is centered top-to-bottom
2096
+ and abuts the left side of the image.</dd>
2097
+
2098
+ <dt>CenterGravity</dt>
2099
+
2100
+ <dd>The composited image is centered left-to-right
2101
+ and top-to-bottom.</dd>
2102
+ </dl>
2103
+ </dd>
2104
+
2105
+ <dt>composite_op</dt>
2106
+
2107
+ <dd>A <a href=
2108
+ "constants.html#CompositeOperator">CompositeOperator</a>
2109
+ constant.</dd>
2110
+ </dl>
2111
+ </dd>
2112
+
2113
+ <dt style="font-style:normal">3.&nbsp;With gravity, x, and y
2114
+ arguments:</dt>
2115
+
2116
+ <dd>
2117
+ <dl>
2118
+ <dt>img</dt>
2119
+
2120
+ <dd>Either an imagelist or an image. If an imagelist,
2121
+ uses the current image.</dd>
2122
+
2123
+ <dt>gravity</dt>
2124
+
2125
+ <dd>A <a href=
2126
+ "constants.html#GravityType">GravityType</a> constant. If
2127
+ the argument is NorthEastGravity, EastGravity, or
2128
+ SouthEastGravity, the x-offset is measured from the right
2129
+ side of the image. If the argument is SouthEastGravity,
2130
+ SouthGravity, or SouthWestGravity, the y-offset is
2131
+ measured from the bottom of the image. All other values
2132
+ are ignored and the x- and y-offsets are measured from
2133
+ the upper-left corner of the image.</dd>
2134
+
2135
+ <dt>x, y</dt>
2136
+
2137
+ <dd>The x- and y-offset of the composited image, measured
2138
+ as specified by the <em>gravity</em> argument.</dd>
2139
+
2140
+ <dt>composite_op</dt>
2141
+
2142
+ <dd>A <a href=
2143
+ "constants.html#CompositeOperator">CompositeOperator</a>
2144
+ constant.</dd>
2145
+ </dl>
2146
+ </dd>
2147
+ </dl>
2148
+
2149
+ <h4>Returns</h4>
2150
+
2151
+ <p>A new image</p>
2152
+
2153
+ <h4>Example</h4>
2154
+
2155
+ <p>This example shows the effect of some of the composite
2156
+ operators.</p>
2157
+
2158
+ <p><a href="javascript:popup('composite.rb.html')"><img src=
2159
+ "ex/composite.gif" alt="composite example" title=
2160
+ "Click the image to see the example script" /></a></p>
2161
+
2162
+ <h4>See also</h4>
2163
+
2164
+ <p><a href="#composite_bang">composite!</a></p>
2165
+
2166
+ <h4>Magick API</h4>
2167
+
2168
+ <p>CompositeImage</p>
2169
+ </div>
2170
+
2171
+ <div class="sig">
2172
+ <h3 id="composite_bang">composite!</h3>
2173
+
2174
+ <p><span class="arg">image</span>.composite!(<span class=
2175
+ "arg">img</span>, <span class="arg">x</span>, <span class=
2176
+ "arg">y</span>, <span class="arg">composite_op</span>) -&gt;
2177
+ <em>self</em><br />
2178
+ <span class="arg">image</span>.composite!(<span class=
2179
+ "arg">img</span>, <span class="arg">gravity</span>,
2180
+ <span class="arg">composite_op</span>) -&gt;
2181
+ <em>self</em><br />
2182
+ <span class="arg">image</span>.composite!(<span class=
2183
+ "arg">img</span>, <span class="arg">gravity</span>,
2184
+ <span class="arg">x</span>, <span class="arg">y</span>,
2185
+ <span class="arg">composite_op</span>) -&gt; <em>self</em></p>
2186
+ </div>
2187
+
2188
+ <div class="desc">
2189
+ <h4>Description</h4>
2190
+
2191
+ <p>In-place form of <a href="#composite">composite</a>.</p>
2192
+
2193
+ <h4>Returns</h4>
2194
+
2195
+ <p>self</p>
2196
+ </div>
2197
+
2198
+ <div class="sig">
2199
+ <h3 id="composite_affine">composite_affine</h3>
2200
+
2201
+ <p><span class="arg">image</span>.composite_affine(<span class=
2202
+ "arg">img</span>, <span class="arg">affine</span>) -&gt;
2203
+ <em>anImage</em></p>
2204
+ </div>
2205
+
2206
+ <div class="desc">
2207
+ <h4>Description</h4>Composite <span class="arg">img</span> over
2208
+ the receiver image as dictated by the <span class=
2209
+ "arg">affine</span> argument.
2210
+
2211
+ <h4>Arguments</h4>
2212
+
2213
+ <dl>
2214
+ <dt>img</dt>
2215
+
2216
+ <dd>An image or imagelist</dd>
2217
+
2218
+ <dt>affine</dt>
2219
+
2220
+ <dd>An <code>AffineMatrix</code></dd>
2221
+ </dl>
2222
+
2223
+ <h4>Returns</h4>
2224
+
2225
+ <p>A new image</p>
2226
+
2227
+ <h4>See also</h4><p><a href="#composite">composite</a>, <a href=
2228
+ "#affine_transform">affine_transform</a></p>
2229
+
2230
+ <h4>Magick API</h4>
2231
+
2232
+ <p>DrawAffineImage</p>
2233
+ </div>
2234
+
2235
+ <div class="sig">
2236
+ <h3 id="compress_colormap">compress_colormap</h3>
2237
+
2238
+ <p><span class="arg">image</span>.compress_colormap! -&gt;
2239
+ <em>image</em></p>
2240
+ </div>
2241
+
2242
+ <div class="desc">
2243
+ <h4>Description</h4>
2244
+
2245
+ <p>Removes duplicate or unused entries in the colormap. Only
2246
+ <a href="constants.html#ClassType">PseudoClass</a> images have
2247
+ a colormap.</p>
2248
+
2249
+ <h4>Returns</h4>self
2250
+
2251
+ <h4>Example</h4>
2252
+ <pre>
2253
+ f = Magick::Image.read('cbezier1.gif').first &raquo;
2254
+ cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
2255
+ f.colors &raquo; 128
2256
+ f.compress_colormap! &raquo;
2257
+ cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
2258
+ f.colors &raquo; 108
2259
+ </pre>
2260
+
2261
+ <h4>Magick API</h4>
2262
+
2263
+ <p>CompressColormap</p>
2264
+ </div>
2265
+
2266
+ <div class="sig">
2267
+ <h3 id="contrast">contrast</h3>
2268
+
2269
+ <p><span class="arg">image</span>.contrast(<span class=
2270
+ "arg">sharpen</span>=<code>false</code>) -&gt;
2271
+ <em>anImage</em></p>
2272
+ </div>
2273
+
2274
+ <div class="desc">
2275
+ <h4>Description</h4>
2276
+
2277
+ <p class="imquote">Enhances or reduces the intensity
2278
+ differences between the lighter and darker elements of the
2279
+ image.</p>
2280
+
2281
+ <h4>Arguments</h4>If <span class="arg">sharpen</span> is
2282
+ <code>true</code>, the contrast is increased, otherwise it is
2283
+ reduced.
2284
+
2285
+ <h4>Returns</h4>
2286
+
2287
+ <p>A new image</p>
2288
+
2289
+ <h4>Example</h4>
2290
+
2291
+ <p>In this example the contrast is <em>reduced</em> in each
2292
+ successive image.</p><a href=
2293
+ "javascript:popup('contrast.rb.html')"><img src=
2294
+ "ex/contrast.jpg" alt="contrast example" title=
2295
+ "Click the image to see the example script" /></a>
2296
+
2297
+ <h4>Magick API</h4>
2298
+
2299
+ <p>ContrastImage</p>
2300
+ </div>
2301
+
2302
+ <div class="sig">
2303
+ <h3 id="convolve">convolve</h3>
2304
+
2305
+ <p>&gt;<span class="arg">image</span>.convolve(<span class=
2306
+ "arg">order</span>, <span class="arg">kernel</span>) -&gt;
2307
+ <em>anImage</em></p>
2308
+ </div>
2309
+
2310
+ <div class="desc">
2311
+ <h4>Description</h4>
2312
+
2313
+ <p class="imquote">Applies a custom convolution kernel to the
2314
+ image.</p>
2315
+
2316
+ <h4>Arguments</h4>
2317
+
2318
+ <dl>
2319
+ <dt>order</dt>
2320
+
2321
+ <dd>The number of columns and rows in the kernel.</dd>
2322
+
2323
+ <dt>kernel</dt>
2324
+
2325
+ <dd>An <span class="arg">order</span>*<span class=
2326
+ "arg">order</span> matrix of <code>Float</code> values.</dd>
2327
+ </dl>
2328
+
2329
+ <h4>Returns</h4>
2330
+
2331
+ <p>A new image</p>
2332
+
2333
+ <h4>See also</h4>
2334
+
2335
+ <p><a href="#convolve_channel">convolve_channel</a>. The
2336
+ <a href="#edge">edge</a>, <a href=
2337
+ "image2.html#emboss">emboss</a>, <a href=
2338
+ "image2.html#gaussian_blur">gaussian_blur</a>, <a href=
2339
+ "image2.html#motion_blur">motion_blur</a> and <a href=
2340
+ "image2.html#sharpen">sharpen</a> methods use convolution to do
2341
+ their work.</p>
2342
+
2343
+ <h4>Magick API</h4>
2344
+
2345
+ <p>ConvolveImage</p>
2346
+
2347
+ <h4>Note</h4>
2348
+
2349
+ <p>See <a href=
2350
+ "http://www.dai.ed.ac.uk/HIPR2/convolve.htm">Convolution</a> in
2351
+ the <a href=
2352
+ "http://www.dai.ed.ac.uk/HIPR2/copyrght.htm"><cite>Hypermedia
2353
+ Image Processing Reference</cite></a></p>
2354
+ </div>
2355
+
2356
+ <div class="sig">
2357
+ <h3 id="convolve_channel">convolve_channel</h3>
2358
+
2359
+ <p><span class="arg">image</span>.convolve_channel(<span class=
2360
+ "arg">order</span>, <span class="arg">kernel</span>[,
2361
+ <span class="arg">channel</span>[, <span class=
2362
+ "arg">channel</span>...]]) -&gt; <em>anImage</em></p>
2363
+ </div>
2364
+
2365
+ <div class="desc">
2366
+ <h4>Description</h4>
2367
+
2368
+ <p>Applies a custom convolution kernel to the specified channel
2369
+ or channels in the image.</p>
2370
+
2371
+ <h4>Arguments</h4>
2372
+
2373
+ <dl>
2374
+ <dt>order</dt>
2375
+
2376
+ <dd>The number of columns and rows in the kernel.</dd>
2377
+
2378
+ <dt>kernel</dt>
2379
+
2380
+ <dd>An <span class="arg">order</span>*<span class=
2381
+ "arg">order</span> matrix of <code>Float</code> values.</dd>
2382
+
2383
+ <dt>channel...</dt>
2384
+
2385
+ <dd>0 or more <a href=
2386
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
2387
+ channels are specified the effect is the same as calling
2388
+ <a href="#convolve">convolve</a>.</dd>
2389
+ </dl>
2390
+
2391
+ <h4>Returns</h4>
2392
+
2393
+ <p>A new image</p>
2394
+
2395
+ <h4>Magick API</h4>
2396
+
2397
+ <p>ConvolveImageChannel (available in ImageMagick 6.0.0)</p>
2398
+
2399
+ <h4>See also</h4>
2400
+
2401
+ <p><a href="#convolve">convolve</a></p>
2402
+ </div>
2403
+
2404
+ <div class="sig">
2405
+ <h3 id="copy">copy</h3>
2406
+
2407
+ <p><span class="arg">image</span>.copy -&gt;
2408
+ <em>anImage</em></p>
2409
+ </div>
2410
+
2411
+ <div class="desc">
2412
+ <h4>Description</h4>Returns a copy of the image. The tainted
2413
+ state of the original is propogated to the copy.
2414
+
2415
+ <h4>Example</h4>
2416
+ <pre>
2417
+ f2 = f.copy
2418
+ </pre>
2419
+
2420
+ <h4>See also</h4>
2421
+
2422
+ <p><a href="#clone">clone</a>, <a href="#dup">dup</a>, <a href=
2423
+ "ilist.html#copy">ImageList#copy</a></p>
2424
+
2425
+ <h4>Magick API</h4>
2426
+
2427
+ <p>CloneImage</p>
2428
+ </div>
2429
+
2430
+ <div class="sig">
2431
+ <h3 id="crop">crop</h3>
2432
+
2433
+ <p><span class="arg">image</span>.crop(<span class=
2434
+ "arg">x</span>, <span class="arg">y</span>, <span class=
2435
+ "arg">width</span>, <span class="arg">height</span>) -&gt;
2436
+ <em>anImage</em><br />
2437
+ <span class="arg">image</span>.crop(<span class=
2438
+ "arg">gravity</span>, <span class="arg">x</span>, <span class=
2439
+ "arg">y</span>, <span class="arg">width</span>, <span class=
2440
+ "arg">height</span>) -&gt; <em>anImage</em><br />
2441
+ <span class="arg">image</span>.crop(<span class=
2442
+ "arg">gravity</span>, <span class="arg">width</span>,
2443
+ <span class="arg">height</span>) -&gt; <em>anImage</em></p>
2444
+ </div>
2445
+
2446
+ <div class="desc">
2447
+ <h4>Description</h4>Extracts the specified rectangle from the
2448
+ image.
2449
+
2450
+ <h4>Arguments</h4>
2451
+
2452
+ <p>The crop method can be called three different ways:</p>
2453
+
2454
+ <dl>
2455
+ <dt style="font-style:normal">1.&nbsp;Without a
2456
+ <em>gravity</em> argument:</dt>
2457
+
2458
+ <dd>
2459
+ <dl>
2460
+ <dt>x, y</dt>
2461
+
2462
+ <dd>The <em>x-</em> and <em>y-</em>offset of the
2463
+ rectangle relative to the upper-left corner of the
2464
+ image</dd>
2465
+
2466
+ <dt>width, height</dt>
2467
+
2468
+ <dd>The width and height of the rectangle.</dd>
2469
+ </dl>
2470
+ </dd>
2471
+
2472
+ <dt style="font-style:normal">2.&nbsp;With a <em>gravity</em>
2473
+ argument, but without <em>x</em> and <em>y</em>
2474
+ arguments:</dt>
2475
+
2476
+ <dd>
2477
+ <dl>
2478
+ <dt>gravity</dt>
2479
+
2480
+ <dd>
2481
+ A <a href="constants.html#GravityType">GravityType</a>
2482
+ constant specifying the position of the rectangle.
2483
+
2484
+ <dl>
2485
+ <dt>NorthWestGravity</dt>
2486
+
2487
+ <dd>The rectangle abuts the top and left sides of the
2488
+ image.</dd>
2489
+
2490
+ <dt>NorthGravity</dt>
2491
+
2492
+ <dd>The rectangle is centered left-to-right and abuts
2493
+ the top of the image.</dd>
2494
+
2495
+ <dt>NorthEastGravity</dt>
2496
+
2497
+ <dd>The rectangle abuts the top and right sides of
2498
+ the image.</dd>
2499
+
2500
+ <dt>EastGravity</dt>
2501
+
2502
+ <dd>The rectangle is centered top-to-bottom and abuts
2503
+ the right side of the image.</dd>
2504
+
2505
+ <dt>SouthEastGravity</dt>
2506
+
2507
+ <dd>The rectangle abuts the bottom and right sides of
2508
+ the image.</dd>
2509
+
2510
+ <dt>SouthGravity</dt>
2511
+
2512
+ <dd>The rectangle is centered left-to-right and abuts
2513
+ the bottom of the image.</dd>
2514
+
2515
+ <dt>SouthWestGravity</dt>
2516
+
2517
+ <dd>The rectangle abuts the bottom and left sides of
2518
+ the image.</dd>
2519
+
2520
+ <dt>WestGravity</dt>
2521
+
2522
+ <dd>The rectangle is centered top-to-bottom and abuts
2523
+ the left side of the image.</dd>
2524
+
2525
+ <dt>CenterGravity</dt>
2526
+
2527
+ <dd>The rectangle is centered left-to-right and
2528
+ top-to-bottom.</dd>
2529
+ </dl>
2530
+ </dd>
2531
+
2532
+ <dt>width, height</dt>
2533
+
2534
+ <dd>The width and height of the rectangle.</dd>
2535
+ </dl>
2536
+ </dd>
2537
+
2538
+ <dt style="font-style:normal">3.&nbsp;With <em>gravity</em>,
2539
+ <em>x</em>, and <em>y</em> arguments:</dt>
2540
+
2541
+ <dd>
2542
+ <dl>
2543
+ <dt>gravity</dt>
2544
+
2545
+ <dd>A <a href=
2546
+ "constants.html#GravityType">GravityType</a> constant. If
2547
+ the argument is NorthEastGravity, EastGravity, or
2548
+ SouthEastGravity, the <em>x-</em>offset is measured from
2549
+ the right side of the image. If the argument is
2550
+ SouthEastGravity, SouthGravity, or SouthWestGravity, the
2551
+ <em>y-</em>offset is measured from the bottom of the
2552
+ image. All other values are ignored and the <em>x-</em>
2553
+ and <em>y-</em>offsets are measured from the upper-left
2554
+ corner of the image.</dd>
2555
+
2556
+ <dt>x, y</dt>
2557
+
2558
+ <dd>The <em>x-</em> and <em>y-</em>offset of the
2559
+ rectangle from the sides specified by the
2560
+ <em>gravity</em> argument.</dd>
2561
+
2562
+ <dt>width, height</dt>
2563
+
2564
+ <dd>The width and height of the rectangle.</dd>
2565
+ </dl>
2566
+ </dd>
2567
+ </dl>
2568
+
2569
+ <h4>Returns</h4>
2570
+
2571
+ <p>A new image</p>
2572
+
2573
+ <h4>Example</h4>
2574
+
2575
+ <p>The crop rectangle is highlighted in the "before" image.</p>
2576
+
2577
+ <p class="rollover"><a href=
2578
+ "javascript:popup('crop.rb.html')"><img onmouseover=
2579
+ "this.src='ex/crop_before.jpg'" onmouseout=
2580
+ "this.src='ex/crop_after.jpg'" src="ex/crop_after.jpg" alt=
2581
+ "crop example" title=
2582
+ "Click the image to see the example script" /></a><img src=
2583
+ "ex/images/spin.gif" alt="" class="spin" title=
2584
+ "Mouse over the example to see the original image" /></p>
2585
+
2586
+ <h4>Example 2</h4>
2587
+
2588
+ <p><a href=
2589
+ "javascript:popup('crop_with_gravity.rb.html')">crop_with_gravity.rb</a></p>
2590
+
2591
+ <h4>See also</h4><p><a href="#crop_bang">crop!</a>, <a href=
2592
+ "#chop">chop</a></p>
2593
+
2594
+ <h4>Notes</h4>
2595
+
2596
+ <p>In very recent versions of ImageMagick (6.1.x and later) the
2597
+ image retains the <em>x-</em> and <em>y-</em>offsets in its
2598
+ <a href="imageattrs.html#page">page</a> attribute after
2599
+ cropping. This may cause the cropped image to be displayed by
2600
+ external viewers (the GIMP, for example) with invisible left
2601
+ and top borders. You can set the <em>x-</em> and
2602
+ <em>y-</em>offsets to 0 by changing the <code>page</code>
2603
+ attribute to a new <a href=
2604
+ "struct.html#Rectangle">rectangle</a>. For example:</p>
2605
+ <pre>
2606
+ img.crop!(x, y, width, height)
2607
+ img.page = Rectangle.new(width, height, 0, 0)
2608
+
2609
+ </pre>
2610
+
2611
+ <h4>Magick API</h4>
2612
+
2613
+ <p>CropImage</p>
2614
+ </div>
2615
+
2616
+ <div class="sig">
2617
+ <h3 id="crop_bang">crop!</h3>
2618
+
2619
+ <p><span class="arg">image</span>.crop!(<span class=
2620
+ "arg">x</span>, <span class="arg">y</span>, <span class=
2621
+ "arg">width</span>, <span class="arg">height</span>) -&gt;
2622
+ <em>image</em><br />
2623
+ <span class="arg">image</span>.crop!(<span class=
2624
+ "arg">gravity</span>, <span class="arg">x</span>, <span class=
2625
+ "arg">y</span>, <span class="arg">width</span>, <span class=
2626
+ "arg">height</span>) -&gt; <em>image</em><br />
2627
+ <span class="arg">image</span>.crop!(<span class=
2628
+ "arg">gravity</span>, <span class="arg">width</span>,
2629
+ <span class="arg">height</span>) -&gt; <em>image</em></p>
2630
+ </div>
2631
+
2632
+ <div class="desc">
2633
+ <h4>Description</h4>The in-place form of <a href=
2634
+ "#crop">crop</a>.
2635
+
2636
+ <h4>Returns</h4>
2637
+
2638
+ <p>self</p>
2639
+ </div>
2640
+
2641
+ <div class="sig">
2642
+ <h3 id="cycle_colormap">cycle_colormap</h3>
2643
+
2644
+ <p><span class="arg">image</span>.cycle_colormap(<span class=
2645
+ "arg">amount</span>) -&gt; <em>anImage</em></p>
2646
+ </div>
2647
+
2648
+ <div class="desc">
2649
+ <h4>Description</h4>
2650
+
2651
+ <p class="imquote">Displaces the colormap by a given number of
2652
+ positions. If you cycle the colormap a number of times you can
2653
+ produce a psychedelic effect.</p>
2654
+
2655
+ <h4>Arguments</h4>
2656
+
2657
+ <p>The number of positions to cycle.</p>
2658
+
2659
+ <h4>Returns</h4>
2660
+
2661
+ <p>A new image</p>
2662
+
2663
+ <h4>Example</h4>
2664
+
2665
+ <p>Mouse over the image to see an animation made by cycling the
2666
+ colormap between each copy.</p>
2667
+
2668
+ <p class="rollover"><a href=
2669
+ "javascript:popup('cycle_colormap.rb.html')"><img onmouseover=
2670
+ "this.src='ex/cycle_colormap.gif'" onmouseout=
2671
+ "this.src='ex/images/Hot_Air_Balloons.jpg'" src=
2672
+ "ex/images/Hot_Air_Balloons.jpg" alt="cycle_colormap example"
2673
+ title=
2674
+ "Click the image to see the example script" /></a><img src=
2675
+ "ex/images/spin.gif" alt="" class="spin" style="left: 191px"
2676
+ title="Mouse over the example to see the animation" /></p>
2677
+
2678
+ <h4>Magick API</h4>
2679
+
2680
+ <p>CycleColormapImage</p>
2681
+ </div>
2682
+
2683
+ <div class="sig">
2684
+ <h3 id="despeckle">despeckle</h3>
2685
+
2686
+ <p><span class="arg">image</span>.despeckle -&gt;
2687
+ <em>anImage</em></p>
2688
+ </div>
2689
+
2690
+ <div class="desc">
2691
+ <h4>Description</h4>
2692
+
2693
+ <p class="imquote">Reduces the speckle noise while preserving
2694
+ the edges.</p>
2695
+
2696
+ <h4>Returns</h4>
2697
+
2698
+ <p>A new image</p>
2699
+
2700
+ <h4>Magick API</h4>
2701
+
2702
+ <p>DespeckleImage</p>
2703
+ </div>
2704
+
2705
+ <div class="sig">
2706
+ <h3 id="difference">difference</h3>
2707
+
2708
+ <p><span class="arg">image</span>.difference(<span class=
2709
+ "arg">other</span>) -&gt; <em>anArray</em></p>
2710
+ </div>
2711
+
2712
+ <div class="desc">
2713
+ <h4>Description</h4>
2714
+
2715
+ <p class="imquote">Compares two images and computes statistics
2716
+ about their difference.</p>
2717
+
2718
+ <p class="imquote">A small normalized mean square
2719
+ error...suggests the images are very similiar in spatial layout
2720
+ and color.</p>
2721
+
2722
+ <h4>Returns</h4>
2723
+
2724
+ <p>An array of three <code>Float</code> values:</p>
2725
+
2726
+ <dl class="imquote">
2727
+ <dt>mean error per pixel</dt>
2728
+
2729
+ <dd>The mean error for any single pixel in the image.</dd>
2730
+
2731
+ <dt>normalized mean error</dt>
2732
+
2733
+ <dd>The normalized mean quantization error for any single
2734
+ pixel in the image. This distance measure is normalized to a
2735
+ range between 0 and 1. It is independent of the range of red,
2736
+ green, and blue values in the image.</dd>
2737
+
2738
+ <dt>normalized maximum error</dt>
2739
+
2740
+ <dd>The normalized maximum quantization error for any single
2741
+ pixel in the image. This distance measure is normalized to a
2742
+ range between 0 and 1. It is independent of the range of red,
2743
+ green, and blue values in your image.</dd>
2744
+ </dl>
2745
+
2746
+ <p>After <code>difference</code> returns, these values are also
2747
+ available from the <a href=
2748
+ "imageattrs.html#mean_error_per_pixel">mean_error_per_pixel</a>,
2749
+ <a href=
2750
+ "imageattrs.html#normalized_mean_error">normalized_mean_error</a>,
2751
+ and <a href=
2752
+ "imageattrs.html#normalized_maximum_error">normalized_maximum_error</a>
2753
+ attributes.</p>
2754
+
2755
+ <h4>See also</h4><p><a href="#spaceship">&lt;=&gt;</a></p>
2756
+
2757
+ <h4>Magick API</h4>IsImagesEqual
2758
+ </div>
2759
+
2760
+ <div class="sig">
2761
+ <h3 id="dispatch">dispatch</h3>
2762
+
2763
+ <p><span class="arg">image</span>.dispatch(<span class=
2764
+ "arg">x</span>, <span class="arg">y</span>, <span class=
2765
+ "arg">columns</span>, <span class="arg">rows</span>,
2766
+ <span class="arg">map</span>, <span class=
2767
+ "arg">float</span>=<code>false</code>) -&gt;
2768
+ <em>anArray</em></p>
2769
+ </div>
2770
+
2771
+ <div class="desc">
2772
+ <h4>Description</h4>
2773
+
2774
+ <p>Extracts the pixel data from the specified rectangle and
2775
+ returns it as an array of either <code>Integer</code> or
2776
+ <code>Float</code> values.</p>
2777
+
2778
+ <p>The array returned by <code>dispatch</code> is suitable for
2779
+ use as an argument to <code>constitute</code>.</p>
2780
+
2781
+ <h4>Arguments</h4>
2782
+
2783
+ <dl>
2784
+ <dt>x, y</dt>
2785
+
2786
+ <dd>The offset of the rectangle from the upper-left corner of
2787
+ the image.</dd>
2788
+
2789
+ <dt>columns, rows</dt>
2790
+
2791
+ <dd>The width and height of the rectangle.</dd>
2792
+
2793
+ <dt>map</dt>
2794
+
2795
+ <dd>A <code>String</code> reflecting the order of the pixel
2796
+ data. <span class="imquote">It can be any combination or
2797
+ order of R = red, G = green, B = blue, A = alpha, C = cyan, Y
2798
+ = yellow, M = magenta, K = black, or I = intensity (for
2799
+ grayscale).</span></dd>
2800
+
2801
+ <dt>float</dt>
2802
+
2803
+ <dd>If <code>true</code>, the returned array elements will be
2804
+ <code>Float</code> values in the range 0..1. If
2805
+ <code>false</code>, the returned array elements will be
2806
+ <code>Integer</code> values in the range 0..MaxRGB.</dd>
2807
+ </dl>
2808
+
2809
+ <h4>Returns</h4>An array
2810
+
2811
+ <h4>Example</h4>
2812
+ <pre>
2813
+ #! /usr/local/bin/ruby -w
2814
+ require 'RMagick'
2815
+
2816
+ f = Magick::Image.read("images/Flower_Hat.jpg").first
2817
+
2818
+ pixels = f.dispatch(0,0,f.columns,f.rows,"RGB")
2819
+
2820
+ # Write the pixels to a file, to be included
2821
+ # in the constitute.rb example.
2822
+ File.open('pixels-array', 'w') { |txt|
2823
+ txt.puts("Width = #{f.columns}")
2824
+ txt.puts("Height = #{f.rows}")
2825
+ txt.print('Pixels = [')
2826
+ pixels = pixels.join(',')
2827
+ pixels.gsub!(/(\d+,){1,25}/) { "#{$&amp;}\n" }
2828
+ txt.print(pixels)
2829
+ txt.puts(']')
2830
+ }
2831
+ exit
2832
+ </pre>
2833
+
2834
+ <h4>See also</h4>
2835
+
2836
+ <p><a href="#constitute">constitute</a>, <a href=
2837
+ "image2.html#export_pixels">export_pixels</a>, <a href=
2838
+ "image2.html#get_pixels">get_pixels</a></p>
2839
+
2840
+ <h4>Magick API</h4>
2841
+
2842
+ <p>DispatchImage, or ExportImagePixels in ImageMagick 5.5.7</p>
2843
+
2844
+ <h4>Note</h4>
2845
+
2846
+ <p>This method is deprecated in ImageMagick 5.5.7 and later.
2847
+ Use the <code>export_pixels</code> method instead.</p>
2848
+ </div>
2849
+
2850
+ <div class="sig">
2851
+ <h3 id="display">display</h3>
2852
+
2853
+ <p><span class="arg">image</span>.display [ <span class="arg">{
2854
+ optional arguments }</span> ] -&gt; <em>image</em></p>
2855
+ </div>
2856
+
2857
+ <div class="desc">
2858
+ <h4>Description</h4>
2859
+
2860
+ <p>Display the image on an X Window screen. By default, the
2861
+ screen is the local monitor. Right-click the window to display
2862
+ a context menu.</p>
2863
+
2864
+ <h4>Arguments</h4>
2865
+
2866
+ <p>You can specify additional arguments by setting Info
2867
+ attributes in a block associated with the method call.
2868
+ Specifically, you can set the name of a non-default X Window
2869
+ screen with the <code><a href=
2870
+ "info.html#Info.server_name_eq">server_name</a></code>
2871
+ attribute.</p>
2872
+
2873
+ <h4>Returns</h4>
2874
+
2875
+ <p>self</p>
2876
+
2877
+ <h4>Note</h4>
2878
+ <p>The display method is not supported on native MS Windows.</p>
2879
+
2880
+ <h4>Magick API</h4>
2881
+
2882
+ <p>DisplayImages</p>
2883
+ </div>
2884
+
2885
+ <div class="sig">
2886
+ <h3 id="dup">dup</h3>
2887
+
2888
+ <p><span class="arg">image</span>.dup -&gt;
2889
+ <em>anImage</em></p>
2890
+ </div>
2891
+
2892
+ <div class="desc">
2893
+ <h4>Description</h4>
2894
+
2895
+ <p>Same as <a href="#copy">copy</a>.</p>
2896
+
2897
+ <h4>Returns</h4>
2898
+
2899
+ <p>A new image</p>
2900
+
2901
+ <h4>See also</h4>
2902
+
2903
+ <p><a href="#clone">clone</a></p>
2904
+ </div>
2905
+
2906
+ <div class="sig">
2907
+ <h3 id="each_profile">each_profile</h3>
2908
+
2909
+ <p><span class="arg">image</span>.each_profile {|<span class=
2910
+ "arg">name</span>, <span class="arg">value</span>| <span class=
2911
+ "arg">block</span>} -&gt; <em>???</em> (see Returns)</p>
2912
+ </div>
2913
+
2914
+ <div class="desc">
2915
+ <h4>Description</h4>Calls <span class="arg">block</span> once
2916
+ for each profile in the image, passing the profile name and
2917
+ value as parameters.
2918
+
2919
+ <h4>Returns</h4>the last value returned by the block
2920
+
2921
+ <h4>Magick API</h4>GetNextImageProfile (available in
2922
+ ImageMagick 6.0.0)
2923
+ </div>
2924
+
2925
+ <div class="sig">
2926
+ <h3 id="edge">edge</h3>
2927
+
2928
+ <p><span class="arg">image</span>.edge(<span class=
2929
+ "arg">radius</span>=0.0) -&gt; <em>anImage</em></p>
2930
+ </div>
2931
+
2932
+ <div class="desc">
2933
+ <h4>Description</h4>Finds edges in the image.
2934
+
2935
+ <h4>Arguments</h4>The radius of the convolution filter. If the
2936
+ radius is 0, <code>edge</code> selects a suitable default.
2937
+
2938
+ <h4>Returns</h4>
2939
+
2940
+ <p>A new image</p>
2941
+
2942
+ <h4>Example</h4>
2943
+
2944
+ <p class="rollover"><a href=
2945
+ "javascript:popup('edge.rb.html')"><img onmouseover=
2946
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
2947
+ "this.src='ex/edge.jpg'" src="ex/edge.jpg" alt="edge example"
2948
+ title="Click the image to see the example script" /></a>
2949
+ <img src="ex/images/spin.gif" alt="" class="spin" title=
2950
+ "Mouse over the example to see the original image" /></p>
2951
+
2952
+ <h4>Magick API</h4>
2953
+
2954
+ <p>EdgeImage</p>
2955
+ </div>
2956
+
2957
+ <div class="sig">
2958
+ <h3 id="emboss">emboss</h3>
2959
+
2960
+ <p><span class="arg">image</span>.emboss(<span class=
2961
+ "arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
2962
+ -&gt; <em>anImage</em></p>
2963
+ </div>
2964
+
2965
+ <div class="desc">
2966
+ <h4>Description</h4>Adds a 3-dimensional effect.
2967
+
2968
+ <h4>Arguments</h4>
2969
+
2970
+ <dl>
2971
+ <dt>radius</dt>
2972
+
2973
+ <dd>The radius of the Gaussian operator.</dd>
2974
+
2975
+ <dt>sigma</dt>
2976
+
2977
+ <dd>The sigma (standard deviation) of the Gaussian operator.
2978
+ This value must be greater than 0.0.</dd>
2979
+ </dl>
2980
+
2981
+ <h4>Returns</h4>
2982
+
2983
+ <p>A new image</p>
2984
+
2985
+ <h4>Example</h4>
2986
+
2987
+ <p class="rollover"><a href=
2988
+ "javascript:popup('emboss.rb.html')"><img onmouseover=
2989
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
2990
+ "this.src='ex/emboss.jpg'" src="ex/emboss.jpg" alt=
2991
+ "emboss example" title=
2992
+ "Click the image to see the example script" /></a><img src=
2993
+ "ex/images/spin.gif" alt="" class="spin" title=
2994
+ "Mouse over the example to see the original image" /></p>
2995
+
2996
+ <h4>Magick API</h4>
2997
+
2998
+ <p>EmbossImage</p>
2999
+ </div>
3000
+
3001
+ <p class="spacer">&nbsp;</p>
3002
+
3003
+ <div class="nav">
3004
+ &laquo;&nbsp;<a href="imageattrs.html">Prev</a> | <a href=
3005
+ "index.html">Contents</a> | <a href=
3006
+ "image2.html">Next</a>&nbsp;&raquo;
3007
+ </div>
3008
+ </body>
3009
+ </html>