rmagick 1.15.17 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +78 -25
- data/README.html +117 -188
- data/README.txt +116 -181
- data/build_tarball.rake +205 -0
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +118 -44
- data/doc/draw.html +57 -99
- data/doc/ex/adaptive_threshold.rb +1 -10
- data/doc/ex/add_noise.rb +4 -5
- data/doc/ex/axes.rb +1 -1
- data/doc/ex/bilevel_channel.rb +2 -13
- data/doc/ex/bounding_box.rb +3 -4
- data/doc/ex/channel.rb +6 -7
- data/doc/ex/clip_path.rb +11 -5
- data/doc/ex/color_histogram.rb +8 -20
- data/doc/ex/composite_layers.rb +53 -0
- data/doc/ex/fill_pattern.rb +26 -0
- data/doc/ex/get_multiline_type_metrics.rb +26 -37
- data/doc/ex/get_type_metrics.rb +25 -25
- data/doc/ex/images/notimplemented.gif +0 -0
- data/doc/ex/level.rb +1 -1
- data/doc/ex/matte_floodfill.rb +5 -6
- data/doc/ex/matte_replace.rb +5 -6
- data/doc/ex/negate_channel.rb +0 -10
- data/doc/ex/opacity.rb +3 -5
- data/doc/ex/polaroid.rb +4 -1
- data/doc/ex/posterize.rb +1 -12
- data/doc/ex/preview.rb +1 -8
- data/doc/ex/radial_blur.rb +1 -11
- data/doc/ex/raise.rb +1 -4
- data/doc/ex/random_threshold_channel.rb +4 -9
- data/doc/ex/sepiatone.rb +2 -9
- data/doc/ex/shadow.rb +12 -18
- data/doc/ex/sketch.rb +2 -9
- data/doc/ex/smile.rb +7 -7
- data/doc/ex/splice.rb +3 -10
- data/doc/ex/stegano.rb +5 -0
- data/doc/ex/threshold.rb +2 -2
- data/doc/ex/transpose.rb +1 -8
- data/doc/ex/transverse.rb +1 -8
- data/doc/ex/trim.rb +1 -2
- data/doc/ex/viewex.rb +4 -5
- data/doc/ex/vignette.rb +1 -8
- data/doc/ex/watermark.rb +1 -0
- data/doc/ex/wet_floor.rb +8 -14
- data/doc/ilist.html +301 -110
- data/doc/image1.html +362 -258
- data/doc/image2.html +429 -286
- data/doc/image3.html +418 -192
- data/doc/imageattrs.html +100 -39
- data/doc/imusage.html +26 -21
- data/doc/index.html +52 -93
- data/doc/info.html +160 -64
- data/doc/magick.html +37 -71
- data/doc/optequiv.html +155 -61
- data/doc/rvg.html +3 -3
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +3 -3
- data/doc/rvgpattern.html +3 -3
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +4 -4
- data/doc/rvgtut.html +4 -4
- data/doc/rvguse.html +3 -3
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +26 -29
- data/doc/usage.html +99 -48
- data/examples/crop_with_gravity.rb +46 -0
- data/examples/demo.rb +2 -2
- data/examples/histogram.rb +11 -11
- data/examples/identify.rb +45 -45
- data/examples/spinner.rb +3 -2
- data/ext/RMagick/MANIFEST +7 -8
- data/ext/RMagick/extconf.rb +242 -0
- data/ext/RMagick/rmagick.h +136 -222
- data/ext/RMagick/rmdraw.c +226 -229
- data/ext/RMagick/rmfill.c +69 -118
- data/ext/RMagick/rmilist.c +234 -94
- data/ext/RMagick/rmimage.c +1719 -2564
- data/ext/RMagick/rminfo.c +433 -619
- data/ext/RMagick/rmmain.c +249 -487
- data/ext/RMagick/rmutil.c +344 -563
- data/lib/RMagick.rb +414 -358
- data/lib/rvg/clippath.rb +2 -2
- data/lib/rvg/container.rb +2 -2
- data/lib/rvg/describable.rb +2 -2
- data/lib/rvg/embellishable.rb +2 -2
- data/lib/rvg/misc.rb +3 -3
- data/lib/rvg/paint.rb +2 -7
- data/lib/rvg/pathdata.rb +2 -2
- data/lib/rvg/rvg.rb +2 -2
- data/lib/rvg/stretchable.rb +2 -14
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/text.rb +2 -2
- data/lib/rvg/transformable.rb +2 -2
- data/lib/rvg/units.rb +2 -2
- data/{metaconfig.in → metaconfig} +0 -1
- data/post-setup.rb +1 -1
- data/rmagick.gemspec +6 -9
- metadata +41 -49
- data/Makefile.in +0 -42
- data/configure +0 -12358
- data/configure.ac +0 -791
- data/ext/RMagick/extconf.rb.in +0 -25
- data/ext/RMagick/rmagick_config.h.in +0 -285
- data/gem_extconf.rb +0 -42
data/doc/image2.html
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for Linux/x86 (vers
|
7
|
+
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick
|
9
|
+
<title>RMagick 2.0.0: class Image (instance methods e-o)</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -47,7 +47,7 @@ td.ds {
|
|
47
47
|
</head>
|
48
48
|
|
49
49
|
<body>
|
50
|
-
<h6 id="header">RMagick
|
50
|
+
<h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6>
|
51
51
|
|
52
52
|
<div class="nav">
|
53
53
|
« <a href="image1.html">Prev</a> | <a href=
|
@@ -56,7 +56,7 @@ td.ds {
|
|
56
56
|
</div>
|
57
57
|
|
58
58
|
<h1>class Image <span class="superclass">< Object</span>
|
59
|
-
(
|
59
|
+
(instance methods e-o)<br />
|
60
60
|
<span class="mixin">mixes in Comparable</span></h1>
|
61
61
|
|
62
62
|
<div id="toc">
|
@@ -67,17 +67,36 @@ td.ds {
|
|
67
67
|
<div>
|
68
68
|
<div class="toccol">
|
69
69
|
<ul>
|
70
|
+
<li><a href=
|
71
|
+
"#each_iptc_dataset">each_iptc_dataset</a></li>
|
72
|
+
|
73
|
+
<li><a href="#each_pixel">each_pixel</a></li>
|
74
|
+
|
75
|
+
<li><a href="#each_profile">each_profile</a></li>
|
76
|
+
|
77
|
+
<li><a href="#edge">edge</a></li>
|
78
|
+
|
79
|
+
<li><a href="#emboss">emboss</a></li>
|
80
|
+
|
70
81
|
<li><a href="#enhance">enhance</a></li>
|
71
82
|
|
72
83
|
<li><a href="#equalize">equalize</a></li>
|
73
84
|
|
85
|
+
<li><a href="#equalize_channel">equalize_channel</a></li>
|
86
|
+
|
74
87
|
<li><a href="#erase_bang">erase!</a></li>
|
75
88
|
|
89
|
+
<li><a href="#excerpt">excerpt</a></li>
|
90
|
+
|
91
|
+
<li><a href="#excerpt_bang">excerpt!</a></li>
|
92
|
+
|
76
93
|
<li><a href="#export_pixels">export_pixels</a></li>
|
77
94
|
|
78
95
|
<li><a href=
|
79
96
|
"#export_pixels_to_str">export_pixels_to_str</a></li>
|
80
97
|
|
98
|
+
<li><a href="#extent">extent</a></li>
|
99
|
+
|
81
100
|
<li><a href=
|
82
101
|
"#find_similar_region">find_similar_region</a></li>
|
83
102
|
|
@@ -90,7 +109,11 @@ td.ds {
|
|
90
109
|
<li><a href="#flop_bang">flop!</a></li>
|
91
110
|
|
92
111
|
<li><a href="#frame">frame</a></li>
|
112
|
+
</ul>
|
113
|
+
</div>
|
93
114
|
|
115
|
+
<div class="toccol">
|
116
|
+
<ul>
|
94
117
|
<li><a href="#freeze">freeze</a></li>
|
95
118
|
|
96
119
|
<li><a href="#gamma_channel">gamma_channel</a></li>
|
@@ -107,22 +130,17 @@ td.ds {
|
|
107
130
|
|
108
131
|
<li><a href=
|
109
132
|
"#get_exif_by_number">get_exif_by_number</a></li>
|
110
|
-
</ul>
|
111
|
-
</div>
|
112
133
|
|
113
|
-
<div class="toccol">
|
114
|
-
<ul>
|
115
134
|
<li><a href="#get_iptc_dataset">get_iptc_dataset</a></li>
|
116
135
|
|
117
136
|
<li><a href="#get_pixels">get_pixels</a></li>
|
118
137
|
|
119
138
|
<li><a href="#gray_q">gray?</a></li>
|
120
139
|
|
121
|
-
<li><a href=
|
122
|
-
"#grayscale_pseudo_class">grayscale_pseudo_class</a></li>
|
123
|
-
|
124
140
|
<li><a href="#grey_q">grey?</a></li>
|
125
141
|
|
142
|
+
<li><a href="#histogram_q">histogram?</a></li>
|
143
|
+
|
126
144
|
<li><a href="#implode">implode</a></li>
|
127
145
|
|
128
146
|
<li><a href="#import_pixels">import_pixels</a></li>
|
@@ -138,7 +156,11 @@ td.ds {
|
|
138
156
|
<li><a href="#magnify">magnify</a></li>
|
139
157
|
|
140
158
|
<li><a href="#magnify_bang">magnify!</a></li>
|
159
|
+
</ul>
|
160
|
+
</div>
|
141
161
|
|
162
|
+
<div class="toccol">
|
163
|
+
<ul>
|
142
164
|
<li><a href="#map">map</a></li>
|
143
165
|
|
144
166
|
<li><a href=
|
@@ -149,11 +171,7 @@ td.ds {
|
|
149
171
|
<li><a href="#matte_point">matte_point</a></li>
|
150
172
|
|
151
173
|
<li><a href="#matte_replace">matte_replace</a></li>
|
152
|
-
</ul>
|
153
|
-
</div>
|
154
174
|
|
155
|
-
<div class="toccol">
|
156
|
-
<ul>
|
157
175
|
<li><a href="#matte_reset_bang">matte_reset!</a></li>
|
158
176
|
|
159
177
|
<li><a href="#median_filter">median_filter</a></li>
|
@@ -184,14 +202,6 @@ td.ds {
|
|
184
202
|
<li><a href="#opaque_q">opaque?</a></li>
|
185
203
|
|
186
204
|
<li><a href="#ordered_dither">ordered_dither</a></li>
|
187
|
-
|
188
|
-
<li><a href="#palette_q">palette?</a></li>
|
189
|
-
|
190
|
-
<li><a href="#pixel_color">pixel_color</a></li>
|
191
|
-
|
192
|
-
<li><a href="#polaroid">polaroid</a></li>
|
193
|
-
|
194
|
-
<li><a href="#posterize">posterize</a></li>
|
195
205
|
</ul>
|
196
206
|
</div>
|
197
207
|
</div>
|
@@ -199,6 +209,175 @@ td.ds {
|
|
199
209
|
|
200
210
|
<h2 class="methods">instance methods</h2>
|
201
211
|
|
212
|
+
<div class="sig">
|
213
|
+
<h3 id="each_iptc_dataset">each_iptc_dataset</h3>
|
214
|
+
|
215
|
+
<p>image.each_iptc_dataset { |<span class="arg">dataset</span>,
|
216
|
+
<span class="arg">data_field</span>| <span class=
|
217
|
+
"arg">block</span>} -> <code>nil</code></p>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
<div class="desc">
|
221
|
+
<h4>Description</h4>
|
222
|
+
|
223
|
+
<p>Iterates over the IPTC DataSet constants in Magick::IPTC. If
|
224
|
+
the image's IPTC profile has the DataSet and the data field has
|
225
|
+
non-0 length, yields to the block. The IPTC DataSet constants
|
226
|
+
are listed <a href="image2.html#get_iptc_dataset">here</a>.</p>
|
227
|
+
|
228
|
+
<h4>Arguments</h4>
|
229
|
+
|
230
|
+
<p>The block arguments are:</p>
|
231
|
+
|
232
|
+
<dl>
|
233
|
+
<dt>dataset</dt>
|
234
|
+
|
235
|
+
<dd>The DataSet name</dd>
|
236
|
+
|
237
|
+
<dt>data_field</dt>
|
238
|
+
|
239
|
+
<dd>The data field</dd>
|
240
|
+
</dl>
|
241
|
+
|
242
|
+
<h4>See also</h4>
|
243
|
+
|
244
|
+
<p><a href=
|
245
|
+
"image2.html#get_iptc_dataset">get_iptc_dataset</a></p>
|
246
|
+
</div>
|
247
|
+
|
248
|
+
<div class="sig">
|
249
|
+
<h3 id="each_pixel">each_pixel</h3>
|
250
|
+
|
251
|
+
<p><span class="arg">image</span>.each_pixel {|<span class=
|
252
|
+
"arg">pixel</span>, <span class="arg">c</span>, <span class=
|
253
|
+
"arg">r</span>| <span class="arg">block</span> } ->
|
254
|
+
<em>image</em></p>
|
255
|
+
</div>
|
256
|
+
|
257
|
+
<div class="desc">
|
258
|
+
<h4>Description</h4>
|
259
|
+
|
260
|
+
<p>Calls <span class="arg">block</span> with 3 arguments, a
|
261
|
+
<span class="arg">pixel</span> from <span class=
|
262
|
+
"arg">image</span>, its column number <span class=
|
263
|
+
"arg">c</span>, and its row number <span class="arg">r</span>,
|
264
|
+
for all the pixels in the image. The pixels are enumerated from
|
265
|
+
top-to-bottom and left-to-right.</p>
|
266
|
+
|
267
|
+
<h4>Returns</h4>
|
268
|
+
|
269
|
+
<p>self</p>
|
270
|
+
|
271
|
+
<h4>See also</h4>
|
272
|
+
|
273
|
+
<p><a href="image2.html#get_pixels">get_pixels</a></p>
|
274
|
+
</div>
|
275
|
+
|
276
|
+
<div class="sig">
|
277
|
+
<h3 id="each_profile">each_profile</h3>
|
278
|
+
|
279
|
+
<p><span class="arg">image</span>.each_profile {|<span class=
|
280
|
+
"arg">name</span>, <span class="arg">value</span>| <span class=
|
281
|
+
"arg">block</span>} -> <em>???</em> (see Returns)</p>
|
282
|
+
</div>
|
283
|
+
|
284
|
+
<div class="desc">
|
285
|
+
<h4>Description</h4>Calls <span class="arg">block</span> once
|
286
|
+
for each profile in the image, passing the profile name and
|
287
|
+
value as parameters.
|
288
|
+
|
289
|
+
<h4>Returns</h4>
|
290
|
+
|
291
|
+
<p>the last value returned by the block</p>
|
292
|
+
|
293
|
+
<h4>See also</h4>
|
294
|
+
|
295
|
+
<p>The <a href=
|
296
|
+
"imageattrs.html#color_profile">color_profile</a> and <a href=
|
297
|
+
"imageattrs.html#iptc_profile">iptc_profile</a> attributes
|
298
|
+
return the ICC and IPTC profiles, respectively.</p>
|
299
|
+
|
300
|
+
<h4>Magick API</h4>
|
301
|
+
|
302
|
+
<p>GetNextImageProfile</p>
|
303
|
+
</div>
|
304
|
+
|
305
|
+
<div class="sig">
|
306
|
+
<h3 id="edge">edge</h3>
|
307
|
+
|
308
|
+
<p><span class="arg">image</span>.edge(<span class=
|
309
|
+
"arg">radius</span>=0.0) -> <em>anImage</em></p>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div class="desc">
|
313
|
+
<h4>Description</h4>Finds edges in the image.
|
314
|
+
|
315
|
+
<h4>Arguments</h4>The radius of the convolution filter. If the
|
316
|
+
radius is 0, <code>edge</code> selects a suitable default.
|
317
|
+
|
318
|
+
<h4>Returns</h4>
|
319
|
+
|
320
|
+
<p>A new image</p>
|
321
|
+
|
322
|
+
<h4>Example</h4>
|
323
|
+
|
324
|
+
<p class="rollover"><a href=
|
325
|
+
"javascript:popup('edge.rb.html')"><img onmouseover=
|
326
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
327
|
+
"this.src='ex/edge.jpg'" src="ex/edge.jpg" alt="edge example"
|
328
|
+
title="Click the image to see the example script" /></a>
|
329
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
330
|
+
"Mouse over the example to see the original image" /></p>
|
331
|
+
|
332
|
+
<h4>Magick API</h4>
|
333
|
+
|
334
|
+
<p>EdgeImage</p>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
<div class="sig">
|
338
|
+
<h3 id="emboss">emboss</h3>
|
339
|
+
|
340
|
+
<p><span class="arg">image</span>.emboss(<span class=
|
341
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
|
342
|
+
-> <em>anImage</em></p>
|
343
|
+
</div>
|
344
|
+
|
345
|
+
<div class="desc">
|
346
|
+
<h4>Description</h4>Adds a 3-dimensional effect.
|
347
|
+
|
348
|
+
<h4>Arguments</h4>
|
349
|
+
|
350
|
+
<dl>
|
351
|
+
<dt>radius</dt>
|
352
|
+
|
353
|
+
<dd>The radius of the Gaussian operator.</dd>
|
354
|
+
|
355
|
+
<dt>sigma</dt>
|
356
|
+
|
357
|
+
<dd>The sigma (standard deviation) of the Gaussian operator.
|
358
|
+
This value cannot be 0.0.</dd>
|
359
|
+
</dl>
|
360
|
+
|
361
|
+
<h4>Returns</h4>
|
362
|
+
|
363
|
+
<p>A new image</p>
|
364
|
+
|
365
|
+
<h4>Example</h4>
|
366
|
+
|
367
|
+
<p class="rollover"><a href=
|
368
|
+
"javascript:popup('emboss.rb.html')"><img onmouseover=
|
369
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
370
|
+
"this.src='ex/emboss.jpg'" src="ex/emboss.jpg" alt=
|
371
|
+
"emboss example" title=
|
372
|
+
"Click the image to see the example script" /></a><img src=
|
373
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
374
|
+
"Mouse over the example to see the original image" /></p>
|
375
|
+
|
376
|
+
<h4>Magick API</h4>
|
377
|
+
|
378
|
+
<p>EmbossImage</p>
|
379
|
+
</div>
|
380
|
+
|
202
381
|
<div class="sig">
|
203
382
|
<h3 id="enhance">enhance</h3>
|
204
383
|
|
@@ -228,7 +407,7 @@ td.ds {
|
|
228
407
|
|
229
408
|
<h4>See also</h4>
|
230
409
|
|
231
|
-
<p><a href="#median_filter">median_filter</a>,
|
410
|
+
<p><a href="image2.html#median_filter">median_filter</a>,
|
232
411
|
<a href="image3.html#reduce_noise">reduce_noise</a>, <a href=
|
233
412
|
"image3.html#unsharp_mask">unsharp_mask</a></p>
|
234
413
|
|
@@ -268,6 +447,49 @@ td.ds {
|
|
268
447
|
<h4>Magick API</h4>
|
269
448
|
|
270
449
|
<p>EqualizeImage</p>
|
450
|
+
|
451
|
+
<h4>See also</h4>
|
452
|
+
|
453
|
+
<p><a href="#equalize_channel">equalize_channel</a></p>
|
454
|
+
</div>
|
455
|
+
|
456
|
+
<div class="sig">
|
457
|
+
<h3 id="equalize_channel">equalize_chanel</h3>
|
458
|
+
|
459
|
+
<p><span class="arg">image</span>.equalize_channel(<span class=
|
460
|
+
"arg">[channel...]</span>) -> <em>anImage</em></p>
|
461
|
+
</div>
|
462
|
+
|
463
|
+
<div class="desc">
|
464
|
+
<h4>Description</h4>
|
465
|
+
|
466
|
+
<p><span class="imquote">Applies a histogram equalization to
|
467
|
+
the image.</span> Only the specified channels are
|
468
|
+
equalized.</p>
|
469
|
+
|
470
|
+
<h4>Arguments</h4>
|
471
|
+
|
472
|
+
<dl>
|
473
|
+
<dt>channel...</dt>
|
474
|
+
|
475
|
+
<dd>0 or more <a href=
|
476
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
477
|
+
channels are specified, all the channels are normalized.
|
478
|
+
Specifying no channel arguments has the same effect as the
|
479
|
+
equalize method, above.</dd>
|
480
|
+
</dl>
|
481
|
+
|
482
|
+
<h4>Returns</h4>
|
483
|
+
|
484
|
+
<p>A new image</p>
|
485
|
+
|
486
|
+
<h4>Magick API</h4>
|
487
|
+
|
488
|
+
<p>EqualizeImageChannel</p>
|
489
|
+
|
490
|
+
<h4>See also</h4>
|
491
|
+
|
492
|
+
<p><a href="#equalize">equalize</a></p>
|
271
493
|
</div>
|
272
494
|
|
273
495
|
<div class="sig">
|
@@ -294,6 +516,73 @@ td.ds {
|
|
294
516
|
<p>SetImage</p>
|
295
517
|
</div>
|
296
518
|
|
519
|
+
<div class="sig">
|
520
|
+
<h3 id="excerpt">excerpt</h3>
|
521
|
+
|
522
|
+
<p><span class="arg">image</span>.excerpt(<span class=
|
523
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
524
|
+
"arg">width</span>, <span class="arg">height</span>) ->
|
525
|
+
anImage</p>
|
526
|
+
</div>
|
527
|
+
|
528
|
+
<div class="desc">
|
529
|
+
<h4>Description</h4>
|
530
|
+
|
531
|
+
<p>This method is very similar to <a href=
|
532
|
+
"image1.html#crop">crop</a>. It extracts the rectangle
|
533
|
+
specified by its arguments from the image and returns it as a
|
534
|
+
new image. However, excerpt <span class="imquote">does not
|
535
|
+
respect the virtual page offset and does not update the page
|
536
|
+
offset and is more efficient than cropping.</span></p>
|
537
|
+
|
538
|
+
<p>It is the caller's responsibility to ensure that the
|
539
|
+
rectangle lies entirely within the original image.</p>
|
540
|
+
|
541
|
+
<h4>Arguments</h4>
|
542
|
+
|
543
|
+
<dl>
|
544
|
+
<dt>x, y</dt>
|
545
|
+
|
546
|
+
<dd>The position of the upper-left corner of the excerpted
|
547
|
+
rectangle.</dd>
|
548
|
+
|
549
|
+
<dt>width, height</dt>
|
550
|
+
|
551
|
+
<dd>The width and height of the excerpted rectangle. The
|
552
|
+
resulting image will always be <span class=
|
553
|
+
"arg">width</span>x<span class="arg">height</span> in
|
554
|
+
size.</dd>
|
555
|
+
</dl>
|
556
|
+
|
557
|
+
<h4>Returns</h4>
|
558
|
+
|
559
|
+
<p>A new image</p>
|
560
|
+
|
561
|
+
<h4>See Also</h4>
|
562
|
+
|
563
|
+
<p><a href="image1.html#crop">crop</a>, <a href=
|
564
|
+
"#excerpt_bang">excerpt!</a></p>
|
565
|
+
|
566
|
+
<h4>Magick API</h4>
|
567
|
+
|
568
|
+
<p>ExcerptImage</p>
|
569
|
+
</div>
|
570
|
+
|
571
|
+
<div class="sig">
|
572
|
+
<h3 id="excerpt_bang">excerpt!</h3>
|
573
|
+
|
574
|
+
<p><span class="arg">image</span>.excerpt!(<span class=
|
575
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
576
|
+
"arg">width</span>, <span class="arg">height</span>) ->
|
577
|
+
<span class="arg">image</span></p>
|
578
|
+
</div>
|
579
|
+
|
580
|
+
<div class="desc">
|
581
|
+
<h4>Description</h4>
|
582
|
+
|
583
|
+
<p>In-place form of <a href="#excerpt">excerpt</a>.</p>
|
584
|
+
</div>
|
585
|
+
|
297
586
|
<div class="sig">
|
298
587
|
<h3 id="export_pixels">export_pixels</h3>
|
299
588
|
|
@@ -421,7 +710,9 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
421
710
|
<code>unsigned char</code>s.</dd>
|
422
711
|
</dl>
|
423
712
|
|
424
|
-
<h4>Returns</h4>
|
713
|
+
<h4>Returns</h4>
|
714
|
+
|
715
|
+
<p>a string</p>
|
425
716
|
|
426
717
|
<h4>See also</h4>
|
427
718
|
|
@@ -435,6 +726,59 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
435
726
|
<p>ExportImagePixels</p>
|
436
727
|
</div>
|
437
728
|
|
729
|
+
<div class="sig">
|
730
|
+
<h3 id="extent">extent</h3>
|
731
|
+
|
732
|
+
<p><span class="arg">image</span>.extent(<span class=
|
733
|
+
"arg">width</span>, <span class="arg">height</span>,
|
734
|
+
<span class="arg">x</span>=0, <span class="arg">y</span>=0)
|
735
|
+
-> <em>anImage</em></p>
|
736
|
+
</div>
|
737
|
+
|
738
|
+
<div class="desc">
|
739
|
+
<h4>Description</h4>
|
740
|
+
|
741
|
+
<p>If <span class="arg">width</span> or <span class=
|
742
|
+
"arg">height</span> is greater than the target image's width or
|
743
|
+
height, extends the width and height of the target image to the
|
744
|
+
specified values. The new pixels are set to the background
|
745
|
+
color. If <span class="arg">width</span> or <span class=
|
746
|
+
"arg">height</span> is less than the target image's width or
|
747
|
+
height, crops the target image.</p>
|
748
|
+
|
749
|
+
<h4>Arguments</h4>
|
750
|
+
|
751
|
+
<dl>
|
752
|
+
<dt>width</dt>
|
753
|
+
|
754
|
+
<dd>The width of the new image</dd>
|
755
|
+
|
756
|
+
<dt>height</dt>
|
757
|
+
|
758
|
+
<dd>The heigth of the new image</dd>
|
759
|
+
|
760
|
+
<dt>x, y</dt>
|
761
|
+
|
762
|
+
<dd>The upper-left corner of the new image is positioned at
|
763
|
+
-<span class="arg">x</span>, -<span class=
|
764
|
+
"arg">y</span>.</dd>
|
765
|
+
</dl>
|
766
|
+
|
767
|
+
<h4>Returns</h4>
|
768
|
+
|
769
|
+
<p>A new image</p>
|
770
|
+
|
771
|
+
<h4>Notes</h4>
|
772
|
+
|
773
|
+
<p>The new image is composed over the background using the
|
774
|
+
composite operator specified by target image's <a href=
|
775
|
+
"imageattrs.html#compose">compose</a> attribute.</p>
|
776
|
+
|
777
|
+
<h4>Magick API</h4>
|
778
|
+
|
779
|
+
<p>ExtentImage</p>
|
780
|
+
</div>
|
781
|
+
|
438
782
|
<div class="sig">
|
439
783
|
<h3 id="find_similar_region">find_similar_region</h3>
|
440
784
|
|
@@ -478,7 +822,7 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
478
822
|
|
479
823
|
<h4>Magick API</h4>
|
480
824
|
|
481
|
-
<p>IsImageSimilar
|
825
|
+
<p>IsImageSimilar</p>
|
482
826
|
</div>
|
483
827
|
|
484
828
|
<div class="sig">
|
@@ -653,7 +997,7 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
653
997
|
<img style="padding:25px; display:none" id="frameless"
|
654
998
|
onmouseout="this.style.display='none';framed.style.display='';"
|
655
999
|
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
|
656
|
-
"Click to see the example script"
|
1000
|
+
"Click to see the example script" /><!--
|
657
1001
|
This img tag displays the framed image when the mouse is not over
|
658
1002
|
--><img onmouseover="this.style.display='none';frameless.style.display='';"
|
659
1003
|
src="ex/frame.jpg" alt="frame example" /></a> <img src=
|
@@ -876,8 +1220,9 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
876
1220
|
|
877
1221
|
<p><a href="image1.html#blur_channel">blur_channel</a></p>
|
878
1222
|
|
879
|
-
<h4>Magick API</h4>
|
880
|
-
|
1223
|
+
<h4>Magick API</h4>
|
1224
|
+
|
1225
|
+
<p>GaussianBlurImageChannel</p>
|
881
1226
|
</div>
|
882
1227
|
|
883
1228
|
<div class="sig">
|
@@ -1595,51 +1940,38 @@ img.get_iptc_dataset(Magick::IPTC::Application::Keywords)
|
|
1595
1940
|
</div>
|
1596
1941
|
|
1597
1942
|
<div class="sig">
|
1598
|
-
<h3 id="
|
1943
|
+
<h3 id="grey_q">grey?</h3>
|
1599
1944
|
|
1600
|
-
<p><span class=
|
1601
|
-
|
1602
|
-
"arg">optimize</span>=<code>true</code>) ->
|
1603
|
-
<em>anImage</em></p>
|
1945
|
+
<p><span class="arg">image</span>.grey? -> <code>true</code>
|
1946
|
+
or <code>false</code></p>
|
1604
1947
|
</div>
|
1605
1948
|
|
1606
1949
|
<div class="desc">
|
1607
1950
|
<h4>Description</h4>
|
1608
1951
|
|
1609
|
-
<p
|
1610
|
-
grayscale representation with an optionally compressed and
|
1611
|
-
sorted colormap..</span> This method is only available in
|
1612
|
-
GraphicsMagick 1.1 and later.</p>
|
1613
|
-
|
1614
|
-
<h4>Arguments</h4>
|
1615
|
-
|
1616
|
-
<dl>
|
1617
|
-
<dt>optimize</dt>
|
1618
|
-
|
1619
|
-
<dd>If true, compress and sort the colormap by increasing
|
1620
|
-
intensity.</dd>
|
1621
|
-
</dl>
|
1622
|
-
|
1623
|
-
<h4>Returns</h4>
|
1624
|
-
|
1625
|
-
<p>A new image</p>
|
1626
|
-
|
1627
|
-
<h4>Magick API</h4>
|
1628
|
-
|
1629
|
-
<p>GrayscalePseudoClass</p>
|
1952
|
+
<p>Synonym for <a href="#gray_q">gray?</a></p>
|
1630
1953
|
</div>
|
1631
1954
|
|
1632
1955
|
<div class="sig">
|
1633
|
-
<h3 id="
|
1956
|
+
<h3 id="histogram_q">histogram?</h3>
|
1634
1957
|
|
1635
|
-
<p><span class="arg">image</span>.
|
1636
|
-
or <code>false</code></p>
|
1958
|
+
<p><span class="arg">image</span>.histogram? ->
|
1959
|
+
<code>true</code> or <code>false</code></p>
|
1637
1960
|
</div>
|
1638
1961
|
|
1639
1962
|
<div class="desc">
|
1640
1963
|
<h4>Description</h4>
|
1641
1964
|
|
1642
|
-
<p>
|
1965
|
+
<p>Returns <code>true</code> if the image has 1024 unique
|
1966
|
+
colors or less.</p>
|
1967
|
+
|
1968
|
+
<h4>Returns</h4>
|
1969
|
+
|
1970
|
+
<p><code>true</code> or <code>false</code></p>
|
1971
|
+
|
1972
|
+
<h4>Magick API</h4>
|
1973
|
+
|
1974
|
+
<p>IsHistogramImage</p>
|
1643
1975
|
</div>
|
1644
1976
|
|
1645
1977
|
<div class="sig">
|
@@ -1751,9 +2083,10 @@ img.get_iptc_dataset(Magick::IPTC::Application::Keywords)
|
|
1751
2083
|
"arg">pixels</span> is an array or an object that can be
|
1752
2084
|
converted to an array by the <code>Kernel::Array</code>
|
1753
2085
|
method. The elements in the array must be
|
1754
|
-
<code>Numeric</code> values in the range
|
1755
|
-
either case, the pixel data must be
|
1756
|
-
order: left-to-right and
|
2086
|
+
<code>Numeric</code> values in the range
|
2087
|
+
[0..QuantumRange]. In either case, the pixel data must be
|
2088
|
+
stored in scanline order: left-to-right and
|
2089
|
+
top-to-bottom.</dd>
|
1757
2090
|
</dl>
|
1758
2091
|
</dd>
|
1759
2092
|
|
@@ -1794,7 +2127,7 @@ img.import_pixels(0, 0, hat.columns, hat.rows, "RGB", char_buffer, Magick::CharP
|
|
1794
2127
|
<h4>See also</h4>
|
1795
2128
|
|
1796
2129
|
<p><a href="image1.html#constitute">constitute</a>, <a href=
|
1797
|
-
"#export_pixels">export_pixels</a>, <a href=
|
2130
|
+
"image2.html#export_pixels">export_pixels</a>, <a href=
|
1798
2131
|
"image3.html#store_pixels">store_pixels</a></p>
|
1799
2132
|
|
1800
2133
|
<h4>Magick API</h4>
|
@@ -1878,8 +2211,9 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1878
2211
|
|
1879
2212
|
<p><span class="arg">image</span>.level(<span class=
|
1880
2213
|
"arg">black_point</span>=<code>0.0</code>, <span class=
|
1881
|
-
"arg">white_point</span>=<code>
|
1882
|
-
"arg">gamma</span>=<code>1.0</code>) ->
|
2214
|
+
"arg">white_point</span>=<code>QuantumRange</code>,
|
2215
|
+
<span class="arg">gamma</span>=<code>1.0</code>) ->
|
2216
|
+
<em>anImage</em></p>
|
1883
2217
|
</div>
|
1884
2218
|
|
1885
2219
|
<div class="desc">
|
@@ -1901,13 +2235,14 @@ f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
|
1901
2235
|
<dt>black_point</dt>
|
1902
2236
|
|
1903
2237
|
<dd>A black point level in the range 0-<a href=
|
1904
|
-
"constants.html#Miscellaneous_constants">
|
1905
|
-
default is 0.0.</dd>
|
2238
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>.
|
2239
|
+
The default is 0.0.</dd>
|
1906
2240
|
|
1907
2241
|
<dt>mid_point</dt>
|
1908
2242
|
|
1909
|
-
<dd>A white point level in the range 0
|
1910
|
-
<a href=
|
2243
|
+
<dd>A white point level in the range 0..QuantumRange. The
|
2244
|
+
default is <a href=
|
2245
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a> -
|
1911
2246
|
<span class="arg">black_point</span>.</dd>
|
1912
2247
|
|
1913
2248
|
<dt>gamma</dt>
|
@@ -1941,7 +2276,7 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
1941
2276
|
</pre>
|
1942
2277
|
|
1943
2278
|
<p>That is, the <code>gamma</code> and <code>white_point</code>
|
1944
|
-
arguments were swapped. In an effort to maintain
|
2279
|
+
arguments were swapped. In an effort to maintain compatiblity
|
1945
2280
|
with older scripts that expect that signature,
|
1946
2281
|
<code>level</code> inspects its arguments and will interchange
|
1947
2282
|
<code>white_point</code> and gamma if they "look" incorrect.
|
@@ -1969,8 +2304,9 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
1969
2304
|
|
1970
2305
|
<p><span class="arg">image</span>.level_channel(<span class=
|
1971
2306
|
"arg">channel</span>, <span class="arg">black_point</span>=0,
|
1972
|
-
<span class="arg">white_point</span>=
|
1973
|
-
<span class="arg">gamma</span>=1.0) ->
|
2307
|
+
<span class="arg">white_point</span>=QuantumRange -
|
2308
|
+
black_point, <span class="arg">gamma</span>=1.0) ->
|
2309
|
+
<em>anImage</em></p>
|
1974
2310
|
</div>
|
1975
2311
|
|
1976
2312
|
<div class="desc">
|
@@ -1988,13 +2324,14 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
1988
2324
|
<dt>black_point</dt>
|
1989
2325
|
|
1990
2326
|
<dd>A black point level in the range 0-<a href=
|
1991
|
-
"constants.html#Miscellaneous_constants">
|
1992
|
-
default is 0.0.</dd>
|
2327
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>.
|
2328
|
+
The default is 0.0.</dd>
|
1993
2329
|
|
1994
2330
|
<dt>mid_point</dt>
|
1995
2331
|
|
1996
|
-
<dd>A white point level in the range 0
|
1997
|
-
<a href=
|
2332
|
+
<dd>A white point level in the range 0..QuantumRange. The
|
2333
|
+
default is <a href=
|
2334
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a> -
|
1998
2335
|
<span class="arg">black_point</span>.</dd>
|
1999
2336
|
|
2000
2337
|
<dt>gamma</dt>
|
@@ -2077,7 +2414,7 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
2077
2414
|
|
2078
2415
|
<p><a href="#magnify_bang">magnify!</a>, <a href=
|
2079
2416
|
"#minify">minify</a>, <a href="image3.html#resize">resize</a>,
|
2080
|
-
<a href="image3.html#scale">
|
2417
|
+
<a href="image3.html#scale">scal</a></p>
|
2081
2418
|
|
2082
2419
|
<h4>Magick API</h4>
|
2083
2420
|
|
@@ -2502,8 +2839,8 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
2502
2839
|
<h4>Description</h4>
|
2503
2840
|
|
2504
2841
|
<p>Returns true if all the pixels have the same red, green, and
|
2505
|
-
blue values and the values are either 0 or
|
2506
|
-
image is black-and-white.</p>
|
2842
|
+
blue values and the values are either 0 or QuantumRange. That
|
2843
|
+
is, the image is black-and-white.</p>
|
2507
2844
|
|
2508
2845
|
<h4>See also</h4>
|
2509
2846
|
|
@@ -2741,7 +3078,7 @@ img.level(white_point, gamma, black_point) -> anImage # wrong!
|
|
2741
3078
|
|
2742
3079
|
<h4>Magick API</h4>
|
2743
3080
|
|
2744
|
-
<p>NormalizeImageChannel
|
3081
|
+
<p>NormalizeImageChannel</p>
|
2745
3082
|
|
2746
3083
|
<h4>See also</h4>
|
2747
3084
|
|
@@ -2822,7 +3159,8 @@ img = img.opaque('white', 'red')
|
|
2822
3159
|
|
2823
3160
|
<h4>See also</h4>
|
2824
3161
|
|
2825
|
-
<p><a href=
|
3162
|
+
<p><a href=
|
3163
|
+
"image1.html#color_floodfill">color_floodfill</a></p>
|
2826
3164
|
|
2827
3165
|
<h4>Magick API</h4>
|
2828
3166
|
|
@@ -2862,7 +3200,7 @@ img = img.opaque('white', 'red')
|
|
2862
3200
|
<div class="desc">
|
2863
3201
|
<h4>Description</h4>
|
2864
3202
|
|
2865
|
-
<p>
|
3203
|
+
<p>DIthers the image to a predefined pattern. The <span class=
|
2866
3204
|
"arg">threshold_map</span> argument defines the pattern to
|
2867
3205
|
use.</p>
|
2868
3206
|
|
@@ -2874,12 +3212,14 @@ img = img.opaque('white', 'red')
|
|
2874
3212
|
convert -list Thresholds
|
2875
3213
|
</pre>
|
2876
3214
|
|
2877
|
-
<p>
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
3215
|
+
<p>If you have a sufficiently new version of ImageMagick, you
|
3216
|
+
can add a <span class="imquote">a uniform color map with the
|
3217
|
+
number of levels per color channel</span> immediately following
|
3218
|
+
the <span class="arg">threshold_map</span>, separated by a
|
3219
|
+
comma. See the documentation for <a href=
|
3220
|
+
"http://redux.imagemagick.org/script/command-line-options.php#ordered-dither">
|
3221
|
+
ImageMagick's -ordered-dither option</a> for more
|
3222
|
+
information.</p>
|
2883
3223
|
|
2884
3224
|
<h4>Returns</h4>
|
2885
3225
|
|
@@ -2898,7 +3238,7 @@ convert -list Thresholds
|
|
2898
3238
|
|
2899
3239
|
<h4>See also</h4>
|
2900
3240
|
|
2901
|
-
<p><a href="#posterize">posterize</a>, <a href=
|
3241
|
+
<p><a href="image3.html#posterize">posterize</a>, <a href=
|
2902
3242
|
"image3.html#quantize">quantize</a></p>
|
2903
3243
|
|
2904
3244
|
<h4>Magick API</h4>
|
@@ -2906,203 +3246,6 @@ convert -list Thresholds
|
|
2906
3246
|
<p>OrderedPosterizeImage</p>
|
2907
3247
|
</div>
|
2908
3248
|
|
2909
|
-
<div class="sig">
|
2910
|
-
<h3 id="palette_q">palette?</h3>
|
2911
|
-
|
2912
|
-
<p><span class="arg">image</span>.palette? -> true or
|
2913
|
-
false</p>
|
2914
|
-
</div>
|
2915
|
-
|
2916
|
-
<div class="desc">
|
2917
|
-
<h4>Description</h4>
|
2918
|
-
|
2919
|
-
<p class="imquote">Returns true if the image is <a href=
|
2920
|
-
"constants.html#ClassType">PseudoClass</a> and has 256 unique
|
2921
|
-
colors or less.</p>
|
2922
|
-
|
2923
|
-
<h4>Returns</h4>
|
2924
|
-
|
2925
|
-
<p>true or false</p>
|
2926
|
-
|
2927
|
-
<h4>Magick API</h4>
|
2928
|
-
|
2929
|
-
<p>IsPaletteImage</p>
|
2930
|
-
</div>
|
2931
|
-
|
2932
|
-
<div class="sig">
|
2933
|
-
<h3 id="pixel_color">pixel_color</h3>
|
2934
|
-
|
2935
|
-
<p><span class="arg">image</span>.pixel_color(<span class=
|
2936
|
-
"arg">x</span>, <span class="arg">y</span>[, <span class=
|
2937
|
-
"arg">new_color</span>]) -> <em>aPixel</em></p>
|
2938
|
-
</div>
|
2939
|
-
|
2940
|
-
<div class="desc">
|
2941
|
-
<h4>Description</h4>
|
2942
|
-
|
2943
|
-
<p>Returns the color of the pixel at <span class=
|
2944
|
-
"arg">x</span>, <span class="arg">y</span>. Optionally, changes
|
2945
|
-
the color of the pixel to a new color.</p>
|
2946
|
-
|
2947
|
-
<p>If new_color is specified, pixel_color changes the image
|
2948
|
-
type to DirectClass if necessary.</p>
|
2949
|
-
|
2950
|
-
<h4>Arguments</h4>
|
2951
|
-
|
2952
|
-
<dl>
|
2953
|
-
<dt>x, y</dt>
|
2954
|
-
|
2955
|
-
<dd>The x- and y-coordinates of the pixel.</dd>
|
2956
|
-
|
2957
|
-
<dt>new_color</dt>
|
2958
|
-
|
2959
|
-
<dd>If specified, the pixel is set to this color. May be
|
2960
|
-
either a <a href="imusage.html#color_names">color name</a> or
|
2961
|
-
a <a href="struct.html#Pixel">Pixel</a>.</dd>
|
2962
|
-
</dl>
|
2963
|
-
|
2964
|
-
<h4>Returns</h4>A <a href="struct.html#Pixel">Pixel</a> having
|
2965
|
-
the RGB values of the specified pixel.
|
2966
|
-
|
2967
|
-
<h4>Example</h4>
|
2968
|
-
<pre>
|
2969
|
-
old = image.pixel_color(20,40,"white")
|
2970
|
-
</pre>
|
2971
|
-
|
2972
|
-
<h4>Magick API</h4>
|
2973
|
-
|
2974
|
-
<p>AcquireImagePixels</p>
|
2975
|
-
</div>
|
2976
|
-
|
2977
|
-
<div class="sig">
|
2978
|
-
<h3 id="polaroid">polaroid</h3>
|
2979
|
-
|
2980
|
-
<p>image.polaroid(angle=-5.0) [ <span class="arg">{ optional
|
2981
|
-
arguments }</span> ] -> anImage</p>
|
2982
|
-
</div>
|
2983
|
-
|
2984
|
-
<div class="desc">
|
2985
|
-
<h4>Description</h4>
|
2986
|
-
|
2987
|
-
<p>Produce an image that looks like a Polaroid® instant
|
2988
|
-
picture. If the image has a "Caption" <a href=
|
2989
|
-
"image1.html#aset">property</a>, the value is used as a
|
2990
|
-
caption.</p>
|
2991
|
-
|
2992
|
-
<p>Optional arguments may be specified in a block associated
|
2993
|
-
with the method. These arguments control the shadow color and
|
2994
|
-
how the label is rendered. By default the shadow color is
|
2995
|
-
gray75. To specify a different shadow color, use
|
2996
|
-
<code>self.shadow_color</code>. The argument can be either a
|
2997
|
-
<a href="imusage.html#color_names">color name</a> or a <a href=
|
2998
|
-
"struct.html#Pixel">Pixel</a>.</p>
|
2999
|
-
|
3000
|
-
<p>The following <a href="draw.html#annotate">annotate</a>
|
3001
|
-
attributes control the label rendering: <a href=
|
3002
|
-
"draw.html#align_eq">align</a>, <a href=
|
3003
|
-
"draw.html#decorate_eq">decorate</a>, <a href=
|
3004
|
-
"draw.html#density_eq">density</a>, <a href=
|
3005
|
-
"draw.html#encoding_eq">encoding</a>, <a href=
|
3006
|
-
"draw.html#fill_eq">fill</a>, <a href=
|
3007
|
-
"draw.html#font_eq">font</a>, <a href=
|
3008
|
-
"draw.html#font_family_eq">font_family</a>, <a href=
|
3009
|
-
"draw.html#font_stretch_eq">font_stretch</a>, <a href=
|
3010
|
-
"draw.html#font_style_eq">font_style</a>, <a href=
|
3011
|
-
"draw.html#font_weight_eq">font_weight</a>, <a href=
|
3012
|
-
"draw.html#gravity_eq">gravity</a>, <a href=
|
3013
|
-
"draw.html#pointsize_eq">pointsize</a>, <a href=
|
3014
|
-
"draw.html#stroke_eq">stroke</a>, <a href=
|
3015
|
-
"draw.html#stroke_width_eq">stroke_width</a>, <a href=
|
3016
|
-
"draw.html#text_antialias_eq">text_antialias</a>, <a href=
|
3017
|
-
"draw.html#undercolor_eq">undercolor</a>.</p>
|
3018
|
-
<pre>
|
3019
|
-
img.polaroid do
|
3020
|
-
self.shadow_color = "gray40"
|
3021
|
-
self.pointsize = 12
|
3022
|
-
end
|
3023
|
-
</pre>
|
3024
|
-
|
3025
|
-
<p>Polaroid is a registered trademark of the Polaroid
|
3026
|
-
Corporation.</p>
|
3027
|
-
|
3028
|
-
<h4>Arguments</h4>
|
3029
|
-
|
3030
|
-
<dl>
|
3031
|
-
<dt>angle</dt>
|
3032
|
-
|
3033
|
-
<dd>The resulting image is rotated by this amount, measured
|
3034
|
-
in degrees. The default is -5.0.</dd>
|
3035
|
-
</dl>
|
3036
|
-
|
3037
|
-
<h4>Example</h4>
|
3038
|
-
|
3039
|
-
<p><a href="javascript:popup('polaroid.rb.html')"><img src=
|
3040
|
-
"ex/polaroid.jpg" alt="polaroid example" /></a></p>
|
3041
|
-
|
3042
|
-
<h4>Magick API</h4>
|
3043
|
-
|
3044
|
-
<p>PolaroidImage (introduced in ImageMagick 6.3.1)</p>
|
3045
|
-
|
3046
|
-
<h4>See also</h4>
|
3047
|
-
|
3048
|
-
<p><a href=
|
3049
|
-
"http://rmagick.rubyforge.org/Polaroid/polaroid.html">The
|
3050
|
-
Polaroid Effect</a></p>
|
3051
|
-
</div>
|
3052
|
-
|
3053
|
-
<div class="sig">
|
3054
|
-
<h3 id="posterize">posterize</h3>
|
3055
|
-
|
3056
|
-
<p><span class="arg">image</span>.posterize(<span class=
|
3057
|
-
"arg">levels</span>=4, <span class="arg">dither</span>=false)
|
3058
|
-
-> <em>anImage</em></p>
|
3059
|
-
</div>
|
3060
|
-
|
3061
|
-
<div class="desc">
|
3062
|
-
<h4>Description</h4>
|
3063
|
-
|
3064
|
-
<p class="imquote">Reduces the image to a limited number of
|
3065
|
-
colors for a "poster" effect.</p>
|
3066
|
-
|
3067
|
-
<h4>Arguments</h4>
|
3068
|
-
|
3069
|
-
<dl>
|
3070
|
-
<dt>levels</dt>
|
3071
|
-
|
3072
|
-
<dd><span class="imquote">Number of color levels allowed in
|
3073
|
-
each channel. Very low values (2, 3, or 4) have the most
|
3074
|
-
visible effect.</span> The default is 4.</dd>
|
3075
|
-
|
3076
|
-
<dt>dither</dt>
|
3077
|
-
|
3078
|
-
<dd>If true, dither the image. The default is false.</dd>
|
3079
|
-
</dl>
|
3080
|
-
|
3081
|
-
<h4>Returns</h4>
|
3082
|
-
|
3083
|
-
<p>A new image</p>
|
3084
|
-
|
3085
|
-
<h4>Example</h4>
|
3086
|
-
|
3087
|
-
<p class="rollover"><a href=
|
3088
|
-
"javascript:popup('posterize.rb.html')"><img src=
|
3089
|
-
"ex/posterize.jpg" alt="posterize example" onmouseover=
|
3090
|
-
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3091
|
-
"this.src='ex/posterize.jpg'" title=
|
3092
|
-
"Click to see the example script" /></a> <img src=
|
3093
|
-
"ex/images/spin.gif" alt="" class="spin" title=
|
3094
|
-
"Mouse over the example to see the original image" /></p>
|
3095
|
-
|
3096
|
-
<h4>See also</h4>
|
3097
|
-
|
3098
|
-
<p><a href="#ordered_dither">ordered_dither</a>, <a href=
|
3099
|
-
"image3.html#quantize">quantize</a></p>
|
3100
|
-
|
3101
|
-
<h4>Magick API</h4>
|
3102
|
-
|
3103
|
-
<p>PosterizeImage</p>
|
3104
|
-
</div>
|
3105
|
-
|
3106
3249
|
<p class="spacer"> </p>
|
3107
3250
|
|
3108
3251
|
<div class="nav">
|