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.
- data/ChangeLog +232 -0
- data/Makefile.in +28 -0
- data/README.html +404 -0
- data/README.txt +397 -0
- data/configure +8554 -0
- data/configure.ac +497 -0
- data/doc/comtasks.html +241 -0
- data/doc/constants.html +1195 -0
- data/doc/css/doc.css +299 -0
- data/doc/css/popup.css +34 -0
- data/doc/draw.html +3108 -0
- data/doc/ex/Adispatch.rb +43 -0
- data/doc/ex/Zconstitute.rb +9 -0
- data/doc/ex/adaptive_threshold.rb +19 -0
- data/doc/ex/add_noise.rb +18 -0
- data/doc/ex/affine.rb +48 -0
- data/doc/ex/affine_transform.rb +20 -0
- data/doc/ex/arc.rb +47 -0
- data/doc/ex/arcpath.rb +33 -0
- data/doc/ex/average.rb +15 -0
- data/doc/ex/axes.rb +64 -0
- data/doc/ex/bilevel_channel.rb +20 -0
- data/doc/ex/blur_image.rb +12 -0
- data/doc/ex/border.rb +10 -0
- data/doc/ex/bounding_box.rb +48 -0
- data/doc/ex/cbezier1.rb +40 -0
- data/doc/ex/cbezier2.rb +40 -0
- data/doc/ex/cbezier3.rb +40 -0
- data/doc/ex/cbezier4.rb +41 -0
- data/doc/ex/cbezier5.rb +41 -0
- data/doc/ex/cbezier6.rb +51 -0
- data/doc/ex/channel.rb +26 -0
- data/doc/ex/channel_threshold.rb +48 -0
- data/doc/ex/charcoal.rb +12 -0
- data/doc/ex/chop.rb +29 -0
- data/doc/ex/circle.rb +31 -0
- data/doc/ex/clip_path.rb +56 -0
- data/doc/ex/coalesce.rb +60 -0
- data/doc/ex/color_fill_to_border.rb +29 -0
- data/doc/ex/color_floodfill.rb +28 -0
- data/doc/ex/color_histogram.rb +60 -0
- data/doc/ex/color_reset.rb +11 -0
- data/doc/ex/colorize.rb +16 -0
- data/doc/ex/colors.rb +65 -0
- data/doc/ex/composite.rb +135 -0
- data/doc/ex/contrast.rb +37 -0
- data/doc/ex/crop.rb +31 -0
- data/doc/ex/crop_with_gravity.rb +46 -0
- data/doc/ex/cycle_colormap.rb +21 -0
- data/doc/ex/demo.rb +324 -0
- data/doc/ex/drawcomp.rb +42 -0
- data/doc/ex/drop_shadow.rb +60 -0
- data/doc/ex/edge.rb +11 -0
- data/doc/ex/ellipse.rb +43 -0
- data/doc/ex/emboss.rb +11 -0
- data/doc/ex/enhance.rb +28 -0
- data/doc/ex/equalize.rb +11 -0
- data/doc/ex/flatten_images.rb +38 -0
- data/doc/ex/flip.rb +11 -0
- data/doc/ex/flop.rb +11 -0
- data/doc/ex/fonts.rb +20 -0
- data/doc/ex/frame.rb +12 -0
- data/doc/ex/gaussian_blur.rb +11 -0
- data/doc/ex/get_multiline_type_metrics.rb +53 -0
- data/doc/ex/get_pixels.rb +48 -0
- data/doc/ex/get_type_metrics.rb +140 -0
- data/doc/ex/gradientfill.rb +27 -0
- data/doc/ex/grav.rb +44 -0
- data/doc/ex/gravity.rb +80 -0
- data/doc/ex/hatchfill.rb +27 -0
- data/doc/ex/images/Ballerina.jpg +0 -0
- data/doc/ex/images/Ballerina3.jpg +0 -0
- data/doc/ex/images/Button_0.gif +0 -0
- data/doc/ex/images/Button_1.gif +0 -0
- data/doc/ex/images/Button_2.gif +0 -0
- data/doc/ex/images/Button_3.gif +0 -0
- data/doc/ex/images/Button_4.gif +0 -0
- data/doc/ex/images/Button_5.gif +0 -0
- data/doc/ex/images/Button_6.gif +0 -0
- data/doc/ex/images/Button_7.gif +0 -0
- data/doc/ex/images/Button_8.gif +0 -0
- data/doc/ex/images/Button_9.gif +0 -0
- data/doc/ex/images/Button_A.gif +0 -0
- data/doc/ex/images/Button_B.gif +0 -0
- data/doc/ex/images/Button_C.gif +0 -0
- data/doc/ex/images/Button_D.gif +0 -0
- data/doc/ex/images/Button_E.gif +0 -0
- data/doc/ex/images/Button_F.gif +0 -0
- data/doc/ex/images/Button_G.gif +0 -0
- data/doc/ex/images/Button_H.gif +0 -0
- data/doc/ex/images/Button_I.gif +0 -0
- data/doc/ex/images/Button_J.gif +0 -0
- data/doc/ex/images/Button_K.gif +0 -0
- data/doc/ex/images/Button_L.gif +0 -0
- data/doc/ex/images/Button_M.gif +0 -0
- data/doc/ex/images/Button_N.gif +0 -0
- data/doc/ex/images/Button_O.gif +0 -0
- data/doc/ex/images/Button_P.gif +0 -0
- data/doc/ex/images/Button_Q.gif +0 -0
- data/doc/ex/images/Button_R.gif +0 -0
- data/doc/ex/images/Button_S.gif +0 -0
- data/doc/ex/images/Button_T.gif +0 -0
- data/doc/ex/images/Button_U.gif +0 -0
- data/doc/ex/images/Button_V.gif +0 -0
- data/doc/ex/images/Button_W.gif +0 -0
- data/doc/ex/images/Button_X.gif +0 -0
- data/doc/ex/images/Button_Y.gif +0 -0
- data/doc/ex/images/Button_Z.gif +0 -0
- data/doc/ex/images/Cheetah.jpg +0 -0
- data/doc/ex/images/Coffee.wmf +0 -0
- data/doc/ex/images/Flower_Hat.jpg +0 -0
- data/doc/ex/images/Gold_Statue.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
- data/doc/ex/images/No.wmf +0 -0
- data/doc/ex/images/Polynesia.jpg +0 -0
- data/doc/ex/images/Red_Rocks.jpg +0 -0
- data/doc/ex/images/Shorts.jpg +0 -0
- data/doc/ex/images/Snake.wmf +0 -0
- data/doc/ex/images/Violin.jpg +0 -0
- data/doc/ex/images/graydient230x6.gif +0 -0
- data/doc/ex/images/logo400x83.gif +0 -0
- data/doc/ex/images/model.miff +0 -0
- data/doc/ex/images/notimplemented.gif +0 -0
- data/doc/ex/images/smile.miff +0 -0
- data/doc/ex/images/spin.gif +0 -0
- data/doc/ex/implode.rb +32 -0
- data/doc/ex/level.rb +12 -0
- data/doc/ex/level_channel.rb +33 -0
- data/doc/ex/line.rb +40 -0
- data/doc/ex/map.rb +28 -0
- data/doc/ex/map_f.rb +15 -0
- data/doc/ex/matte_fill_to_border.rb +42 -0
- data/doc/ex/matte_floodfill.rb +35 -0
- data/doc/ex/matte_replace.rb +42 -0
- data/doc/ex/median_filter.rb +28 -0
- data/doc/ex/modulate.rb +11 -0
- data/doc/ex/mono.rb +23 -0
- data/doc/ex/morph.rb +26 -0
- data/doc/ex/mosaic.rb +35 -0
- data/doc/ex/motion_blur.rb +11 -0
- data/doc/ex/negate.rb +11 -0
- data/doc/ex/negate_channel.rb +19 -0
- data/doc/ex/normalize.rb +11 -0
- data/doc/ex/oil_paint.rb +11 -0
- data/doc/ex/opacity.rb +38 -0
- data/doc/ex/opaque.rb +14 -0
- data/doc/ex/ordered_dither.rb +11 -0
- data/doc/ex/path.rb +62 -0
- data/doc/ex/pattern1.rb +25 -0
- data/doc/ex/pattern2.rb +26 -0
- data/doc/ex/polygon.rb +24 -0
- data/doc/ex/polyline.rb +23 -0
- data/doc/ex/posterize.rb +19 -0
- data/doc/ex/preview.rb +16 -0
- data/doc/ex/qbezierpath.rb +49 -0
- data/doc/ex/quantize-m.rb +25 -0
- data/doc/ex/radial_blur.rb +19 -0
- data/doc/ex/raise.rb +11 -0
- data/doc/ex/random_channel_threshold.rb +17 -0
- data/doc/ex/random_threshold_channel.rb +18 -0
- data/doc/ex/rectangle.rb +33 -0
- data/doc/ex/reduce_noise.rb +28 -0
- data/doc/ex/roll.rb +9 -0
- data/doc/ex/rotate.rb +43 -0
- data/doc/ex/rotate_f.rb +14 -0
- data/doc/ex/roundrect.rb +32 -0
- data/doc/ex/rubyname.rb +31 -0
- data/doc/ex/segment.rb +11 -0
- data/doc/ex/shade.rb +11 -0
- data/doc/ex/shave.rb +15 -0
- data/doc/ex/shear.rb +10 -0
- data/doc/ex/skewx.rb +50 -0
- data/doc/ex/skewy.rb +45 -0
- data/doc/ex/smile.rb +124 -0
- data/doc/ex/solarize.rb +11 -0
- data/doc/ex/splice.rb +16 -0
- data/doc/ex/spread.rb +11 -0
- data/doc/ex/stegano.rb +50 -0
- data/doc/ex/stroke_dasharray.rb +41 -0
- data/doc/ex/stroke_linecap.rb +44 -0
- data/doc/ex/stroke_linejoin.rb +48 -0
- data/doc/ex/stroke_width.rb +47 -0
- data/doc/ex/swirl.rb +17 -0
- data/doc/ex/text.rb +32 -0
- data/doc/ex/text_align.rb +36 -0
- data/doc/ex/text_antialias.rb +33 -0
- data/doc/ex/text_undercolor.rb +26 -0
- data/doc/ex/texture_fill_to_border.rb +34 -0
- data/doc/ex/texture_floodfill.rb +31 -0
- data/doc/ex/texturefill.rb +25 -0
- data/doc/ex/threshold.rb +13 -0
- data/doc/ex/to_blob.rb +14 -0
- data/doc/ex/translate.rb +37 -0
- data/doc/ex/transparent.rb +38 -0
- data/doc/ex/trim.rb +25 -0
- data/doc/ex/unsharp_mask.rb +28 -0
- data/doc/ex/viewex.rb +36 -0
- data/doc/ex/wave.rb +9 -0
- data/doc/ilist.html +1592 -0
- data/doc/image1.html +3009 -0
- data/doc/image2.html +2169 -0
- data/doc/image3.html +2815 -0
- data/doc/imageattrs.html +1319 -0
- data/doc/imusage.html +403 -0
- data/doc/index.html +418 -0
- data/doc/info.html +949 -0
- data/doc/magick.html +439 -0
- data/doc/scripts/doc.js +9 -0
- data/doc/struct.html +1334 -0
- data/doc/usage.html +1318 -0
- data/examples/describe.rb +44 -0
- data/examples/histogram.rb +289 -0
- data/examples/image_opacity.rb +29 -0
- data/examples/import_export.rb +31 -0
- data/examples/pattern_fill.rb +38 -0
- data/examples/rotating_text.rb +47 -0
- data/examples/thumbnail.rb +65 -0
- data/examples/vignette.rb +79 -0
- data/ext/RMagick/MANIFEST +239 -0
- data/ext/RMagick/extconf.rb.in +21 -0
- data/ext/RMagick/rmagick.h +938 -0
- data/ext/RMagick/rmagick_config.h.in +170 -0
- data/ext/RMagick/rmdraw.c +1308 -0
- data/ext/RMagick/rmfill.c +609 -0
- data/ext/RMagick/rmilist.c +685 -0
- data/ext/RMagick/rmimage.c +7980 -0
- data/ext/RMagick/rminfo.c +982 -0
- data/ext/RMagick/rmmain.c +1497 -0
- data/ext/RMagick/rmutil.c +2685 -0
- data/install.rb +1015 -0
- data/lib/RMagick.rb +1486 -0
- data/metaconfig.in +6 -0
- data/post-clean.rb +12 -0
- data/post-install.rb +36 -0
- data/post-setup.rb +245 -0
- data/rmagick.gemspec +22 -0
- data/uninstall.rb +71 -0
- metadata +286 -0
data/doc/image2.html
ADDED
@@ -0,0 +1,2169 @@
|
|
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 September 2004), see www.w3.org" />
|
8
|
+
|
9
|
+
<title>RMagick: class Image (instance methods, part 2)</title>
|
10
|
+
<meta http-equiv="Content-Type" content=
|
11
|
+
"text/html; charset=us-ascii" />
|
12
|
+
<meta name="GENERATOR" content="Quanta Plus" />
|
13
|
+
<meta name="Copyright" content=
|
14
|
+
"Copyright (C) 2004 by Timothy P. Hunter" />
|
15
|
+
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
16
|
+
<script type="text/javascript" src="scripts/doc.js">
|
17
|
+
</script>
|
18
|
+
<script type="text/javascript">
|
19
|
+
//<![CDATA[
|
20
|
+
<!-- Pre-load this image so that the browser knows how big it is. -->
|
21
|
+
<!-- Begin
|
22
|
+
flower_hat = new Image();
|
23
|
+
flower_hat.src = "ex/images/Flower_Hat.jpg";
|
24
|
+
// End -->
|
25
|
+
//]]>
|
26
|
+
</script>
|
27
|
+
</head>
|
28
|
+
|
29
|
+
<body>
|
30
|
+
<h6 id="header">RMagick User's Guide and Reference</h6>
|
31
|
+
|
32
|
+
<div class="nav">
|
33
|
+
« <a href="image1.html">Prev</a> | <a href=
|
34
|
+
"index.html">Contents</a> | <a href=
|
35
|
+
"image3.html">Next</a> »
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<h1>class Image <span class="superclass">< Object</span>
|
39
|
+
(class and instance methods, part 2)<br />
|
40
|
+
<span class="mixin">mixes in Comparable</span></h1>
|
41
|
+
|
42
|
+
<div id="toc">
|
43
|
+
<h2>Table of Contents</h2>
|
44
|
+
|
45
|
+
<h3>instance methods</h3>
|
46
|
+
|
47
|
+
<div>
|
48
|
+
<div class="toccol">
|
49
|
+
<ul>
|
50
|
+
<li><a href="#enhance">enhance</a></li>
|
51
|
+
|
52
|
+
<li><a href="#equalize">equalize</a></li>
|
53
|
+
|
54
|
+
<li><a href="#erase_bang">erase!</a></li>
|
55
|
+
|
56
|
+
<li><a href="#export_pixels">export_pixels</a></li>
|
57
|
+
|
58
|
+
<li><a href="#flip">flip</a></li>
|
59
|
+
|
60
|
+
<li><a href="#flip_bang">flip!</a></li>
|
61
|
+
|
62
|
+
<li><a href="#flop">flop</a></li>
|
63
|
+
|
64
|
+
<li><a href="#flop_bang">flop!</a></li>
|
65
|
+
|
66
|
+
<li><a href="#frame">frame</a></li>
|
67
|
+
|
68
|
+
<li><a href="#gamma_channel">gamma_channel</a></li>
|
69
|
+
|
70
|
+
<li><a href="#gamma_correct">gamma_correct</a></li>
|
71
|
+
|
72
|
+
<li><a href="#gaussian_blur">gaussian_blur</a></li>
|
73
|
+
|
74
|
+
<li><a href=
|
75
|
+
"#gaussian_blur_channel">gaussian_blur_channel</a></li>
|
76
|
+
|
77
|
+
<li><a href=
|
78
|
+
"#get_exif_by_entry">get_exif_by_entry</a></li>
|
79
|
+
|
80
|
+
<li><a href=
|
81
|
+
"#get_exif_by_number">get_exif_by_number</a></li>
|
82
|
+
|
83
|
+
<li><a href="#get_pixels">get_pixels</a></li>
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div class="toccol">
|
88
|
+
<ul>
|
89
|
+
<li><a href="#gray_q">gray?</a></li>
|
90
|
+
|
91
|
+
<li><a href=
|
92
|
+
"#grayscale_pseudo_class">grayscale_pseudo_class</a></li>
|
93
|
+
|
94
|
+
<li><a href="#grey_q">grey?</a></li>
|
95
|
+
|
96
|
+
<li><a href="#implode">implode</a></li>
|
97
|
+
|
98
|
+
<li><a href="#import_pixels">import_pixels</a></li>
|
99
|
+
|
100
|
+
<li><a href="#inspect">inspect</a></li>
|
101
|
+
|
102
|
+
<li><a href="#level">level</a></li>
|
103
|
+
|
104
|
+
<li><a href="#level_channel">level_channel</a></li>
|
105
|
+
|
106
|
+
<li><a href="#magnify">magnify</a></li>
|
107
|
+
|
108
|
+
<li><a href="#magnify_bang">magnify!</a></li>
|
109
|
+
|
110
|
+
<li><a href="#map">map</a></li>
|
111
|
+
|
112
|
+
<li><a href=
|
113
|
+
"#matte_fill_to_border">matte_fill_to_border</a></li>
|
114
|
+
|
115
|
+
<li><a href="#matte_floodfill">matte_floodfill</a></li>
|
116
|
+
|
117
|
+
<li><a href="#matte_point">matte_point</a></li>
|
118
|
+
|
119
|
+
<li><a href="#matte_replace">matte_replace</a></li>
|
120
|
+
|
121
|
+
<li><a href="#matte_reset_bang">matte_reset!</a></li>
|
122
|
+
</ul>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
<div class="toccol">
|
126
|
+
<ul>
|
127
|
+
<li><a href="#median_filter">median_filter</a></li>
|
128
|
+
|
129
|
+
<li><a href="#minify">minify</a></li>
|
130
|
+
|
131
|
+
<li><a href="#minify_bang">minify!</a></li>
|
132
|
+
|
133
|
+
<li><a href="#modulate">modulate</a></li>
|
134
|
+
|
135
|
+
<li><a href="#monochrome_q">monochrome?</a></li>
|
136
|
+
|
137
|
+
<li><a href="#motion_blur">motion_blur</a></li>
|
138
|
+
|
139
|
+
<li><a href="#negate">negate</a></li>
|
140
|
+
|
141
|
+
<li><a href="#negate_channel">negate_channel</a></li>
|
142
|
+
|
143
|
+
<li><a href="#normalize">normalize</a></li>
|
144
|
+
|
145
|
+
<li><a href="#normalize_channel">normalize_channel</a></li>
|
146
|
+
|
147
|
+
<li><a href="#oil_paint">oil_paint</a></li>
|
148
|
+
|
149
|
+
<li><a href="#opaque">opaque</a></li>
|
150
|
+
|
151
|
+
<li><a href="#opaque_q">opaque?</a></li>
|
152
|
+
|
153
|
+
<li><a href="#ordered_dither">ordered_dither</a></li>
|
154
|
+
|
155
|
+
<li><a href="#palette_q">palette?</a></li>
|
156
|
+
|
157
|
+
<li><a href="#pixel_color">pixel_color</a></li>
|
158
|
+
|
159
|
+
<li><a href="#posterize">posterize</a></li>
|
160
|
+
</ul>
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<h2 class="methods">instance methods</h2>
|
166
|
+
|
167
|
+
<div class="sig">
|
168
|
+
<h3 id="enhance">enhance</h3>
|
169
|
+
|
170
|
+
<p><span class="arg">image</span>.enhance ->
|
171
|
+
<em>anImage</em></p>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div class="desc">
|
175
|
+
<h4>Description</h4>
|
176
|
+
|
177
|
+
<p class="imquote">Applies a digital filter that improves the
|
178
|
+
quality of a noisy image.</p>
|
179
|
+
|
180
|
+
<h4>Returns</h4>
|
181
|
+
|
182
|
+
<p>A new image</p>
|
183
|
+
|
184
|
+
<h4>Example</h4>
|
185
|
+
|
186
|
+
<p>The left-hand side has had noise added by <code><a href=
|
187
|
+
"#add_noise">add_noise</a></code>. The right-hand side is the
|
188
|
+
result after using <code>enhance</code>.</p>
|
189
|
+
|
190
|
+
<p><a href="javascript:popup('enhance.rb.html')"><img src=
|
191
|
+
"ex/enhance.jpg" alt="enhance example" title=
|
192
|
+
"Click to see the example script" /></a></p>
|
193
|
+
|
194
|
+
<h4>See also</h4><p><a href=
|
195
|
+
"image2.html#median_filter">median_filter</a>, <a href=
|
196
|
+
"image2.html#reduce_noise">reduce_noise</a>, <a href=
|
197
|
+
"image3.html#unsharp_mask">unsharp_mask</a></p>
|
198
|
+
|
199
|
+
<h4>Magick API</h4>
|
200
|
+
|
201
|
+
<p>EnhanceImage</p>
|
202
|
+
</div>
|
203
|
+
|
204
|
+
<div class="sig">
|
205
|
+
<h3 id="equalize">equalize</h3>
|
206
|
+
|
207
|
+
<p><span class="arg">image</span>.equalize ->
|
208
|
+
<em>anImage</em></p>
|
209
|
+
</div>
|
210
|
+
|
211
|
+
<div class="desc">
|
212
|
+
<h4>Description</h4>
|
213
|
+
|
214
|
+
<p class="imquote">Applies a histogram equalization to the
|
215
|
+
image.</p>
|
216
|
+
|
217
|
+
<h4>Returns</h4>
|
218
|
+
|
219
|
+
<p>A new image</p>
|
220
|
+
|
221
|
+
<h4>Example</h4>
|
222
|
+
|
223
|
+
<p class="rollover"><a href=
|
224
|
+
"javascript:popup('equalize.rb.html')"><img onmouseover=
|
225
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
226
|
+
"this.src='ex/equalize.jpg'" src="ex/equalize.jpg" alt=
|
227
|
+
"equalize example" title=
|
228
|
+
"Click to see the example script" /></a> <img src=
|
229
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
230
|
+
"Mouse over the example to see the original image" /></p>
|
231
|
+
|
232
|
+
<h4>Magick API</h4>
|
233
|
+
|
234
|
+
<p>EqualizeImage</p>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
<div class="sig">
|
238
|
+
<h3 id="erase_bang">erase!</h3>
|
239
|
+
|
240
|
+
<p><span class="arg">image</span>.erase! ->
|
241
|
+
<em>image</em></p>
|
242
|
+
</div>
|
243
|
+
|
244
|
+
<div class="desc">
|
245
|
+
<h4>Description</h4>
|
246
|
+
|
247
|
+
<p>Sets the entire image to the <a href=
|
248
|
+
"imageattrs.html#background_color">background color</a>.</p>
|
249
|
+
|
250
|
+
<h4>Returns</h4>self
|
251
|
+
|
252
|
+
<h4>See also</h4><p><a href=
|
253
|
+
"image1.html#color_reset_bang">color_reset!</a></p>
|
254
|
+
|
255
|
+
<h4>Magick API</h4>
|
256
|
+
|
257
|
+
<p>SetImage</p>
|
258
|
+
</div>
|
259
|
+
|
260
|
+
<div class="sig">
|
261
|
+
<h3 id="export_pixels">export_pixels</h3>
|
262
|
+
|
263
|
+
<p><span class="arg">image</span>.export_pixels(<span class=
|
264
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
265
|
+
"arg">columns</span>, <span class="arg">rows</span>,
|
266
|
+
<span class="arg">map</span>) -> <em>anArray</em></p>
|
267
|
+
</div>
|
268
|
+
|
269
|
+
<div class="desc">
|
270
|
+
<h4>Description</h4>
|
271
|
+
|
272
|
+
<p>Extracts the pixel data from the specified rectangle and
|
273
|
+
returns it as an array of <code>Integer</code> values.</p>
|
274
|
+
|
275
|
+
<p>The array returned by <code>export_pixels</code> is suitable
|
276
|
+
for use as an argument to <code>import_pixels</code>.</p>
|
277
|
+
|
278
|
+
<h4>Arguments</h4>
|
279
|
+
|
280
|
+
<dl>
|
281
|
+
<dt>x, y</dt>
|
282
|
+
|
283
|
+
<dd>The offset of the rectangle from the upper-left corner of
|
284
|
+
the image.</dd>
|
285
|
+
|
286
|
+
<dt>columns, rows</dt>
|
287
|
+
|
288
|
+
<dd>The width and height of the rectangle.</dd>
|
289
|
+
|
290
|
+
<dt>map</dt>
|
291
|
+
|
292
|
+
<dd>A <code>String</code> reflecting the order of the pixel
|
293
|
+
data. <span class="imquote">It can be any combination or
|
294
|
+
order of R = red, G = green, B = blue, A = alpha, C = cyan, Y
|
295
|
+
= yellow, M = magenta, K = black, or I = intensity (for
|
296
|
+
grayscale).</span></dd>
|
297
|
+
</dl>
|
298
|
+
|
299
|
+
<h4>Returns</h4>An array
|
300
|
+
|
301
|
+
<h4>Example</h4>
|
302
|
+
<pre>
|
303
|
+
# Export the r'th scanline from an image in red-green-blue order
|
304
|
+
scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
305
|
+
</pre>
|
306
|
+
|
307
|
+
<h4>See also</h4><p><a href="image1.html#dispatch">dispatch</a>,
|
308
|
+
<a href="#import_pixels">import_pixels</a>, <a href=
|
309
|
+
"#get_pixels">get_pixels</a></p>
|
310
|
+
|
311
|
+
<h4>Magick API</h4>
|
312
|
+
|
313
|
+
<p>ExportImagePixels (available in ImageMagick 5.5.7 and
|
314
|
+
GraphicsMagick 1.1)</p>
|
315
|
+
|
316
|
+
<h4>Note</h4>
|
317
|
+
|
318
|
+
<p>This method replaces the <code>dispatch</code> method.</p>
|
319
|
+
</div>
|
320
|
+
|
321
|
+
<div class="sig">
|
322
|
+
<h3 id="flip">flip</h3>
|
323
|
+
|
324
|
+
<p><span class="arg">image</span>.flip ->
|
325
|
+
<em>anImage</em></p>
|
326
|
+
</div>
|
327
|
+
|
328
|
+
<div class="desc">
|
329
|
+
<h4>Description</h4>
|
330
|
+
|
331
|
+
<p>Create a vertical mirror image of the receiver.</p>
|
332
|
+
|
333
|
+
<h4>Returns</h4>
|
334
|
+
|
335
|
+
<p>A new image</p>
|
336
|
+
|
337
|
+
<h4>Example</h4>
|
338
|
+
|
339
|
+
<p class="rollover"><a href=
|
340
|
+
"javascript:popup('flip.rb.html')"><img onmouseover=
|
341
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
342
|
+
"this.src='ex/flip.jpg'" src="ex/flip.jpg" alt="flip example"
|
343
|
+
title="Click to see the example script" /></a> <img src=
|
344
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
345
|
+
"Mouse over the example to see the original image" /></p>
|
346
|
+
|
347
|
+
<h4>See also</h4>
|
348
|
+
|
349
|
+
<p><a href="#flip_bang">flip!</a>, <a href="#flop">flop</a>,
|
350
|
+
<a href="image1.html#affine_transform">affine_transform</a></p>
|
351
|
+
|
352
|
+
<h4>Magick API</h4>
|
353
|
+
|
354
|
+
<p>FlipImage</p>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
<div class="sig">
|
358
|
+
<h3 id="flip_bang">flip!</h3>
|
359
|
+
|
360
|
+
<p><span class="arg">image</span>.flip! ->
|
361
|
+
<em>image</em></p>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
<div class="desc">
|
365
|
+
<h4>Description</h4>
|
366
|
+
|
367
|
+
<p>In-place form of <a href="image1.html#flip">flip</a>.</p>
|
368
|
+
|
369
|
+
<h4>Returns</h4>
|
370
|
+
|
371
|
+
<p>self</p>
|
372
|
+
</div>
|
373
|
+
|
374
|
+
<div class="sig">
|
375
|
+
<h3 id="flop">flop</h3>
|
376
|
+
|
377
|
+
<p><span class="arg">image</span>.flop ->
|
378
|
+
<em>anImage</em></p>
|
379
|
+
</div>
|
380
|
+
|
381
|
+
<div class="desc">
|
382
|
+
<h4>Description</h4>
|
383
|
+
|
384
|
+
<p>Create a horizontal mirror image of the receiver.</p>
|
385
|
+
|
386
|
+
<h4>Returns</h4>
|
387
|
+
|
388
|
+
<p>A new image</p>
|
389
|
+
|
390
|
+
<h4>Example</h4>
|
391
|
+
|
392
|
+
<p class="rollover"><a href=
|
393
|
+
"javascript:popup('flop.rb.html')"><img onmouseover=
|
394
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
395
|
+
"this.src='ex/flop.jpg'" src="ex/flop.jpg" alt="flop example"
|
396
|
+
title="Click to see the example script" /></a> <img src=
|
397
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
398
|
+
"Mouse over the example to see the original image" /></p>
|
399
|
+
|
400
|
+
<h4>See also</h4>
|
401
|
+
|
402
|
+
<p><a href="#flop_bang">flop!</a>, <a href="#flip">flip</a>,
|
403
|
+
<a href="image1.html#affine_transform">affine_transform</a></p>
|
404
|
+
|
405
|
+
<h4>Magick API</h4>
|
406
|
+
|
407
|
+
<p>FlopImage</p>
|
408
|
+
</div>
|
409
|
+
|
410
|
+
<div class="sig">
|
411
|
+
<h3 id="flop_bang">flop!</h3>
|
412
|
+
|
413
|
+
<p><span class="arg">image</span>.flop! ->
|
414
|
+
<em>image</em></p>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div class="desc">
|
418
|
+
<h4>Description</h4>
|
419
|
+
|
420
|
+
<p>In-place form of <a href="image1.html#flop">flop</a>.</p>
|
421
|
+
|
422
|
+
<h4>Returns</h4>
|
423
|
+
|
424
|
+
<p>self</p>
|
425
|
+
</div>
|
426
|
+
|
427
|
+
<div class="sig">
|
428
|
+
<h3 id="frame">frame</h3>
|
429
|
+
|
430
|
+
<p><span class="arg">image</span>.frame(<span class=
|
431
|
+
"arg">width</span>=25, <span class="arg">height</span>=25,
|
432
|
+
<span class="arg">x</span>=25, <span class="arg">y</span>=25,
|
433
|
+
<span class="arg">inner_bevel</span>=6, <span class=
|
434
|
+
"arg">outer_bevel</span>=6, <span class=
|
435
|
+
"arg">color</span>=<code><a href=
|
436
|
+
"imageattrs.html#matte_color">matte_color</a></code>) ->
|
437
|
+
<em>anImage</em></p>
|
438
|
+
</div>
|
439
|
+
|
440
|
+
<div class="desc">
|
441
|
+
<h4>Description</h4>
|
442
|
+
|
443
|
+
<p>Adds a simulated 3D border.</p>
|
444
|
+
|
445
|
+
<h4>Arguments</h4>
|
446
|
+
|
447
|
+
<dl>
|
448
|
+
<dt>width</dt>
|
449
|
+
|
450
|
+
<dd>The width of the left and right sides.</dd>
|
451
|
+
|
452
|
+
<dt>height</dt>
|
453
|
+
|
454
|
+
<dd>The height of the top and bottom sides.</dd>
|
455
|
+
|
456
|
+
<dt>x, y</dt>
|
457
|
+
|
458
|
+
<dd>The image does not have to be centered in the border.
|
459
|
+
These two arguments specify the offset of the image from the
|
460
|
+
upper-left outside corner of the border.</dd>
|
461
|
+
|
462
|
+
<dt>inner_bevel, outer_bevel</dt>
|
463
|
+
|
464
|
+
<dd>The width of the inner and outer shadows of the border.
|
465
|
+
These values should be much smaller than the width and height
|
466
|
+
and cannot be greater than 1/2 the lesser of the width or
|
467
|
+
height.</dd>
|
468
|
+
|
469
|
+
<dt>color</dt>
|
470
|
+
|
471
|
+
<dd>The border color. By default the color is the <a href=
|
472
|
+
"imageattrs.html#matte_color">matte color</a>.</dd>
|
473
|
+
</dl>
|
474
|
+
|
475
|
+
<h4>Returns</h4>
|
476
|
+
|
477
|
+
<p>A new image</p>
|
478
|
+
|
479
|
+
<h4>Example</h4>
|
480
|
+
|
481
|
+
<p class="rollover"><a href=
|
482
|
+
"javascript:popup('frame.rb.html')">
|
483
|
+
<!-- This img tag displays the original image when the mouse is over -->
|
484
|
+
<img style="padding:25px; display:none" id="frameless"
|
485
|
+
onmouseout="this.style.display='none';framed.style.display='';"
|
486
|
+
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
|
487
|
+
"Click to see the example script" /><!--
|
488
|
+
This img tag displays the framed image when the mouse is not over
|
489
|
+
--><img class="hide"
|
490
|
+
id="framed" onmouseover=
|
491
|
+
"this.style.display='none';frameless.style.display='';" src=
|
492
|
+
"ex/frame.jpg" alt="frame example" /></a>
|
493
|
+
<img src="ex/images/spin.gif" alt="" style=
|
494
|
+
"margin-bottom: 280px" title=
|
495
|
+
"Mouse over the example to see the original image" /></p>
|
496
|
+
|
497
|
+
<h4>See also</h4><p><a href="image1.html#border">border</a></p>
|
498
|
+
|
499
|
+
<h4>Magick API</h4>
|
500
|
+
|
501
|
+
<p>FrameImage</p>
|
502
|
+
</div>
|
503
|
+
|
504
|
+
<div class="sig">
|
505
|
+
<h3 id="gamma_channel">gamma_channel</h3>
|
506
|
+
|
507
|
+
<p><span class="arg">image</span>.gamma_channel(<span class=
|
508
|
+
"arg">gamma</span>, [<span class="arg">channel</span>[,
|
509
|
+
<span class="arg">channel</span>...]] = <em>anImage</em></p>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
<div class="desc">
|
513
|
+
<h4>Description</h4>
|
514
|
+
|
515
|
+
<p class="imquote">Gamma-correct a particular image channel.
|
516
|
+
The same image viewed on different devices will have perceptual
|
517
|
+
differences in the way the image's intensities are represented
|
518
|
+
on the screen.</p>
|
519
|
+
|
520
|
+
<h4>Arguments</h4>
|
521
|
+
|
522
|
+
<dl>
|
523
|
+
<dt>gamma</dt>
|
524
|
+
|
525
|
+
<dd class="imquote">Values typically range from 0.8 to 2.3.
|
526
|
+
You can also reduce the influence of a particular channel
|
527
|
+
with a gamma value of 0.</dd>
|
528
|
+
|
529
|
+
<dt>channel...</dt>
|
530
|
+
|
531
|
+
<dd>0 or more <a href=
|
532
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
533
|
+
channels are specified, all the channels are corrected using
|
534
|
+
the <span class="arg">gamma</span> value.</dd>
|
535
|
+
</dl>
|
536
|
+
|
537
|
+
<h4>Returns</h4>
|
538
|
+
|
539
|
+
<p>A new image</p>
|
540
|
+
|
541
|
+
<h4>See also</h4><p>The older <a href=
|
542
|
+
"#gamma_correct">gamma_correct</a> method is implemented in
|
543
|
+
terms of <code>gamma_channel</code>.</p>
|
544
|
+
|
545
|
+
<h4>Magick API</h4>
|
546
|
+
|
547
|
+
<p>GammaImageChannel (available in ImageMagick 6.0.0)</p>
|
548
|
+
</div>
|
549
|
+
|
550
|
+
<div class="sig">
|
551
|
+
<h3 id="gamma_correct">gamma_correct</h3>
|
552
|
+
|
553
|
+
<p><span class="arg">image</span>.gamma_correct(<span class=
|
554
|
+
"arg">red_gamma</span>[,<span class="arg">green_gamma</span>[,
|
555
|
+
<span class="arg">blue_gamma</span>[, <span class=
|
556
|
+
"arg">opacity_gamma</span>]]]) -> <em>anImage</em></p>
|
557
|
+
</div>
|
558
|
+
|
559
|
+
<div class="desc">
|
560
|
+
<h4>Description</h4>
|
561
|
+
|
562
|
+
<p>Gamma-correct an image. The same image viewed on different
|
563
|
+
devices will have perceptual differences in the way the image's
|
564
|
+
intensities are represented on the screen.</p>
|
565
|
+
|
566
|
+
<h4>Arguments</h4>
|
567
|
+
|
568
|
+
<p>You must specify at least <code>red_gamma</code>. Omitted
|
569
|
+
arguments take on the value of the last specified argument.
|
570
|
+
<span class="imquote">Values typically range from 0.8 to
|
571
|
+
2.3.</span></p>
|
572
|
+
|
573
|
+
<h4>Returns</h4>
|
574
|
+
|
575
|
+
<p>A new image</p>
|
576
|
+
|
577
|
+
<h4>See also</h4><p><a href="#gamma_channel">gamma_channel</a></p>
|
578
|
+
|
579
|
+
<h4>Magick API</h4>
|
580
|
+
|
581
|
+
<p>GammaImage</p>
|
582
|
+
</div>
|
583
|
+
|
584
|
+
<div class="sig">
|
585
|
+
<h3 id="gaussian_blur">gaussian_blur</h3>
|
586
|
+
|
587
|
+
<p><span class="arg">image</span>.gaussian_blur(<span class=
|
588
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
|
589
|
+
-> <em>anImage</em></p>
|
590
|
+
</div>
|
591
|
+
|
592
|
+
<div class="desc">
|
593
|
+
<h4>Description</h4>
|
594
|
+
|
595
|
+
<p class="imquote">Blurs an image. We convolve the image with a
|
596
|
+
Gaussian operator of the given radius and standard deviation
|
597
|
+
(sigma).</p>
|
598
|
+
|
599
|
+
<h4>Arguments</h4>
|
600
|
+
|
601
|
+
<dl>
|
602
|
+
<dt>radius</dt>
|
603
|
+
|
604
|
+
<dd>A <code>Float</code> value representing <span class=
|
605
|
+
"imquote">the radius of the Gaussian, in pixels, not counting
|
606
|
+
the center pixel.</span></dd>
|
607
|
+
|
608
|
+
<dt>sigma</dt>
|
609
|
+
|
610
|
+
<dd>A <code>Float</code> value representing the standard
|
611
|
+
deviation of the Gaussian operator, in pixels. This argument
|
612
|
+
must be > 0.0.</dd>
|
613
|
+
</dl>
|
614
|
+
|
615
|
+
<h4>Returns</h4>
|
616
|
+
|
617
|
+
<p>A new image</p>
|
618
|
+
|
619
|
+
<h4>Example</h4>
|
620
|
+
|
621
|
+
<p><code>gaussian_blur(0.0, 3.0)</code></p>
|
622
|
+
|
623
|
+
<p class="rollover"><a href=
|
624
|
+
"javascript:popup('gaussian_blur.rb.html')"><img onmouseover=
|
625
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
626
|
+
"this.src='ex/gaussian_blur.jpg'" src="ex/gaussian_blur.jpg"
|
627
|
+
alt="gaussian_blur example" title=
|
628
|
+
"Click to see the example script" /></a> <img src=
|
629
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
630
|
+
"Mouse over the example to see the original image" /></p>
|
631
|
+
|
632
|
+
<h4>See also</h4><p><a href=
|
633
|
+
"image1.html#blur_image">blur_image</a>, <a href=
|
634
|
+
"#motion_blur">motion_blur</a>,
|
635
|
+
<a href="image3.html#radial_blur">radial_blur</a></p>
|
636
|
+
|
637
|
+
<h4>Magick API</h4>
|
638
|
+
|
639
|
+
<p>GaussianBlurImage</p>
|
640
|
+
</div>
|
641
|
+
|
642
|
+
<div class="sig">
|
643
|
+
<h3 id="gaussian_blur_channel">gaussian_blur_channel</h3>
|
644
|
+
|
645
|
+
<p><span class=
|
646
|
+
"arg">image</span>.gaussian_blur_channel(<span class=
|
647
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0[,
|
648
|
+
<span class="arg">channel</span>[, <span class=
|
649
|
+
"arg">channel</span>...]) -> <em>anImage</em></p>
|
650
|
+
</div>
|
651
|
+
|
652
|
+
<div class="desc">
|
653
|
+
<h4>Description</h4>
|
654
|
+
|
655
|
+
<p>Blurs the selected channel or channels using a Gaussian
|
656
|
+
operator of the specified radius and standard deviation.</p>
|
657
|
+
|
658
|
+
<h4>Arguments</h4>
|
659
|
+
|
660
|
+
<dl>
|
661
|
+
<dt>radius</dt>
|
662
|
+
|
663
|
+
<dd>A <code>Float</code> value representing <span class=
|
664
|
+
"imquote">the radius of the Gaussian, in pixels, not counting
|
665
|
+
the center pixel.</span></dd>
|
666
|
+
|
667
|
+
<dt>sigma</dt>
|
668
|
+
|
669
|
+
<dd>A <code>Float</code> value representing the standard
|
670
|
+
deviation of the Gaussian operator, in pixels. This argument
|
671
|
+
must be > 0.0.</dd>
|
672
|
+
|
673
|
+
<dt>channel...</dt>
|
674
|
+
|
675
|
+
<dd>0 or more <a href=
|
676
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
677
|
+
channels are specified, all the channels are blurred. This is
|
678
|
+
the same as using <a href=
|
679
|
+
"#gaussian_blur">gaussian_blur</a>.</dd>
|
680
|
+
</dl>
|
681
|
+
|
682
|
+
<h4>Returns</h4>
|
683
|
+
|
684
|
+
<p>A new image</p>
|
685
|
+
|
686
|
+
<h4>See also</h4>
|
687
|
+
|
688
|
+
<p><a href="image1.html#blur_channel">blur_channel</a></p>
|
689
|
+
|
690
|
+
<h4>Magick API</h4>GaussianBlurImageChannel (available in
|
691
|
+
ImageMagick 6.0.0)
|
692
|
+
</div>
|
693
|
+
|
694
|
+
<div class="sig">
|
695
|
+
<h3 id="get_exif_by_entry">get_exif_by_entry</h3>
|
696
|
+
|
697
|
+
<p><span class=
|
698
|
+
"arg">image</span>.get_exif_by_entry(<span class="arg">[name]*</span>)
|
699
|
+
-> <em>anArray</em></p>
|
700
|
+
</div>
|
701
|
+
|
702
|
+
<div class="desc">
|
703
|
+
<h4>Description</h4>
|
704
|
+
|
705
|
+
<p>Returns the value associated with the specified EXIF entry
|
706
|
+
name or names. If no names are specified, returns all the
|
707
|
+
entries. The return value is an array containing one or more
|
708
|
+
[name, value] elements.</p>
|
709
|
+
|
710
|
+
<h4>Arguments</h4>
|
711
|
+
|
712
|
+
<p>Zero or more EXIF entry names.</p>
|
713
|
+
|
714
|
+
<h4>Returns</h4>
|
715
|
+
|
716
|
+
<p>The elements in the returned array are 2-element arrays in
|
717
|
+
the form [name, value]. If ×Magick does not know the name
|
718
|
+
for an entry it uses "unknown." There may be more than one
|
719
|
+
entry for "unknown" in the returned array. If there is no entry
|
720
|
+
with the specified name the value is set to
|
721
|
+
<code>nil</code>.</p>
|
722
|
+
|
723
|
+
<h4>Example</h4>
|
724
|
+
<pre>
|
725
|
+
image.get_exif_by_entry('Make') » [["Make", "Canon"]]
|
726
|
+
image.get_exif_by_entry("ShutterSpeedValue") »
|
727
|
+
[["ShutterSpeedValue", "189/32"]]
|
728
|
+
image.get_exif_by_entry() »
|
729
|
+
[["Make", "Canon"], ["ShutterSpeedValue", "189/32"] ...]
|
730
|
+
</pre>
|
731
|
+
|
732
|
+
<h4>See also</h4>
|
733
|
+
|
734
|
+
<p><a href="#get_exif_by_number">get_exif_by_number</a></p>
|
735
|
+
</div>
|
736
|
+
|
737
|
+
<div class="sig">
|
738
|
+
<h3 id="get_exif_by_number">get_exif_by_number</h3>
|
739
|
+
|
740
|
+
<p><span class=
|
741
|
+
"arg">image</span>.get_exif_by_number(<span class=
|
742
|
+
"arg">[tag]*</span>) -> <em>aHash</em></p>
|
743
|
+
</div>
|
744
|
+
|
745
|
+
<div class="desc">
|
746
|
+
<h4>Description</h4>
|
747
|
+
|
748
|
+
<p>Returns the value associated with the specified EXIF tag
|
749
|
+
number or numbers. If no numbers are specified, returns all the
|
750
|
+
tags. The return value is a hash. The hash keys are EXIF tag
|
751
|
+
numbers. The values are the values associated with the
|
752
|
+
tags.</p>
|
753
|
+
|
754
|
+
<h4>Arguments</h4>
|
755
|
+
|
756
|
+
<p>Zero or more EXIF tag numbers.</p>
|
757
|
+
|
758
|
+
<h4>Returns</h4>
|
759
|
+
|
760
|
+
<p>A hash. If there is no tag with the specified number the
|
761
|
+
value is set to <code>nil</code>.</p>
|
762
|
+
|
763
|
+
<h4>Example</h4>
|
764
|
+
<pre>
|
765
|
+
image.get_exif_by_number(271) » {271=>"Canon"}
|
766
|
+
image.get_exif_by_number(37377) » {37377=>"189/32"}
|
767
|
+
image.get_exif_by_number() »
|
768
|
+
{271=>"Canon", 37377=>"189/32" ...}
|
769
|
+
</pre>
|
770
|
+
|
771
|
+
<h4>See also</h4>
|
772
|
+
|
773
|
+
<p><a href="#get_exif_by_entry">get_exif_by_entry</a></p>
|
774
|
+
</div>
|
775
|
+
|
776
|
+
<div class="sig">
|
777
|
+
<h3 id="get_pixels">get_pixels</h3>
|
778
|
+
|
779
|
+
<p><span class="arg">image</span>.get_pixels(<span class=
|
780
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
781
|
+
"arg">columns</span>, <span class="arg">rows</span>) ->
|
782
|
+
<em>anArray</em></p>
|
783
|
+
</div>
|
784
|
+
|
785
|
+
<div class="desc">
|
786
|
+
<h4>Description</h4>
|
787
|
+
|
788
|
+
<p>Gets the pixels from the specified rectangle within the
|
789
|
+
image.</p>
|
790
|
+
|
791
|
+
<h4>Arguments</h4>
|
792
|
+
|
793
|
+
<dl>
|
794
|
+
<dt>x, y</dt>
|
795
|
+
|
796
|
+
<dd>The x- and y-offset of the rectangle within the
|
797
|
+
image.</dd>
|
798
|
+
|
799
|
+
<dt>columns, rows</dt>
|
800
|
+
|
801
|
+
<dd>The width and height of the rectangle.</dd>
|
802
|
+
</dl>
|
803
|
+
|
804
|
+
<h4>Returns</h4>
|
805
|
+
|
806
|
+
<p>An array of <a href="struct.html#Pixel">pixels</a>. There
|
807
|
+
will be <code>columns*rows</code> elements in the array.</p>
|
808
|
+
|
809
|
+
<h4>Example</h4>
|
810
|
+
|
811
|
+
<p>This example <a href="image1.html#composite">composites</a>
|
812
|
+
a black-and-white version of an image over the same image in
|
813
|
+
its original colors. It uses <code>get_pixels</code> and
|
814
|
+
<a href="image3.html#store_pixels">store_pixels</a> to make
|
815
|
+
each column of pixels in the black-and-white image slightly
|
816
|
+
more opaque than the column on its left, so that the resulting
|
817
|
+
composite changes smoothly from color on the left to
|
818
|
+
black-and-white on the right.</p><!--
|
819
|
+
Reduce the size of the original image by specifying
|
820
|
+
the size of the example image.
|
821
|
+
-->
|
822
|
+
|
823
|
+
<p class="rollover"><a href=
|
824
|
+
"javascript:popup('get_pixels.rb.html')"><img width="384"
|
825
|
+
height="249" onmouseover="this.src='ex/images/Red_Rocks.jpg'"
|
826
|
+
onmouseout="this.src='ex/get_pixels.jpg'" src=
|
827
|
+
"ex/get_pixels.jpg" title="Click to see the example script"
|
828
|
+
alt="get_pixels example" /></a> <img src="ex/images/spin.gif"
|
829
|
+
alt="" class="spin" style="left:388px" title=
|
830
|
+
"Mouse over the example to see the original image" /></p>
|
831
|
+
|
832
|
+
<h4>See also</h4>
|
833
|
+
|
834
|
+
<p><a href="image3.html#store_pixels">store_pixels</a>,
|
835
|
+
<a href="image3.html#view">view</a></p>
|
836
|
+
|
837
|
+
<h4>Magick API</h4>
|
838
|
+
|
839
|
+
<p>AcquireImagePixels</p>
|
840
|
+
</div>
|
841
|
+
|
842
|
+
<div class="sig">
|
843
|
+
<h3 id="gray_q">gray?</h3>
|
844
|
+
|
845
|
+
<p><span class="arg">image</span>.gray? -> <code>true</code>
|
846
|
+
or <code>false</code></p>
|
847
|
+
</div>
|
848
|
+
|
849
|
+
<div class="desc">
|
850
|
+
<h4>Description</h4>
|
851
|
+
|
852
|
+
<p>Returns <code>true</code> if all the pixels in the image
|
853
|
+
have the same red, green, and blue intensities.</p>
|
854
|
+
|
855
|
+
<h4>Returns</h4>
|
856
|
+
|
857
|
+
<p><code>true</code> or <code>false</code></p>
|
858
|
+
|
859
|
+
<h4>See also</h4>
|
860
|
+
|
861
|
+
<p><a href="#monochrome_q">monochrome?</a></p>
|
862
|
+
|
863
|
+
<h4>Magick API</h4>
|
864
|
+
|
865
|
+
<p>IsGrayImage</p>
|
866
|
+
</div>
|
867
|
+
|
868
|
+
<div class="sig">
|
869
|
+
<h3 id="grayscale_pseudo_class">grayscale_pseudo_class</h3>
|
870
|
+
|
871
|
+
<p><span class=
|
872
|
+
"arg">image</span>.grayscale_pseudo_class(<span class=
|
873
|
+
"arg">optimize</span>=<code>true</code>) ->
|
874
|
+
<em>anImage</em></p>
|
875
|
+
</div>
|
876
|
+
|
877
|
+
<div class="desc">
|
878
|
+
<h4>Description</h4>
|
879
|
+
|
880
|
+
<p><span class="imquote">Converts an image to a PseudoClass
|
881
|
+
grayscale representation with an optionally compressed and
|
882
|
+
sorted colormap..</span> This method is available in
|
883
|
+
GraphicsMagick 1.1.</p>
|
884
|
+
|
885
|
+
<h4>Arguments</h4>
|
886
|
+
|
887
|
+
<dl>
|
888
|
+
<dt>optimize</dt>
|
889
|
+
|
890
|
+
<dd>If true, compress and sort the colormap by increasing
|
891
|
+
intensity.</dd>
|
892
|
+
</dl>
|
893
|
+
|
894
|
+
<h4>Returns</h4>
|
895
|
+
|
896
|
+
<p>A new image</p>
|
897
|
+
|
898
|
+
<h4>Magick API</h4>
|
899
|
+
|
900
|
+
<p>GrayscalePseudoClass</p>
|
901
|
+
</div>
|
902
|
+
|
903
|
+
<div class="sig">
|
904
|
+
<h3 id="grey_q">grey?</h3>
|
905
|
+
|
906
|
+
<p><span class="arg">image</span>.qrey? -> <code>true</code>
|
907
|
+
or <code>false</code></p>
|
908
|
+
</div>
|
909
|
+
|
910
|
+
<div class="desc">
|
911
|
+
<h4>Description</h4>
|
912
|
+
|
913
|
+
<p>Synonym for <a href="#gray_q">gray?</a></p>
|
914
|
+
</div>
|
915
|
+
|
916
|
+
<div class="sig">
|
917
|
+
<h3 id="implode">implode</h3>
|
918
|
+
|
919
|
+
<p><span class="arg">image</span>.implode(<span class=
|
920
|
+
"arg">amount</span>=0.50) -> <em>anImage</em></p>
|
921
|
+
</div>
|
922
|
+
|
923
|
+
<div class="desc">
|
924
|
+
<h4>Description</h4>
|
925
|
+
|
926
|
+
<p>A funhouse mirror effect. See the example below.</p>
|
927
|
+
|
928
|
+
<h4>Arguments</h4>
|
929
|
+
|
930
|
+
<p>A <code>Float</code> value. Increasing the absolute value of
|
931
|
+
the argument increases the effect. The value may be positive
|
932
|
+
for implosion, or negative for explosion. The default is
|
933
|
+
0.50.</p>
|
934
|
+
|
935
|
+
<h4>Returns</h4>
|
936
|
+
|
937
|
+
<p>A new image</p>
|
938
|
+
|
939
|
+
<h4>Example</h4>
|
940
|
+
|
941
|
+
<p>This example is an animated image. Mouse over the image to
|
942
|
+
start the animation.</p>
|
943
|
+
|
944
|
+
<p class="rollover"><a href=
|
945
|
+
"javascript:popup('implode.rb.html')"><img onmouseover=
|
946
|
+
"this.src='ex/implode.gif'" onmouseout=
|
947
|
+
"this.src='ex/images/Flower_Hat.jpg'" src=
|
948
|
+
"ex/images/Flower_Hat.jpg" alt="implode example" title=
|
949
|
+
"Click the image to see the example script" /></a><img src=
|
950
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
951
|
+
"Mouse over the example to see the animation" /></p>
|
952
|
+
|
953
|
+
<h4>Magick API</h4>
|
954
|
+
|
955
|
+
<p>ImplodeImage</p>
|
956
|
+
</div>
|
957
|
+
|
958
|
+
<div class="sig">
|
959
|
+
<h3 id="import_pixels">import_pixels</h3>
|
960
|
+
|
961
|
+
<p><span class="arg">image</span>.import_pixels(<span class=
|
962
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
963
|
+
"arg">columns</span>, <span class="arg">rows</span>,
|
964
|
+
<span class="arg">map</span>, <span class="arg">pixels</span>)
|
965
|
+
-> <em>image</em></p>
|
966
|
+
</div>
|
967
|
+
|
968
|
+
<div class="desc">
|
969
|
+
<h4>Description</h4>
|
970
|
+
|
971
|
+
<p>Replaces the pixels in the specified rectangle with pixel
|
972
|
+
data from the supplied array. This method is the reverse of
|
973
|
+
<code>export_pixels</code>.</p>
|
974
|
+
|
975
|
+
<h4>Arguments</h4>
|
976
|
+
|
977
|
+
<dl>
|
978
|
+
<dt>x, y</dt>
|
979
|
+
|
980
|
+
<dd>The offset of the rectangle from the upper-left corner of
|
981
|
+
the image</dd>
|
982
|
+
|
983
|
+
<dt>columns, rows</dt>
|
984
|
+
|
985
|
+
<dd>The width and height of the rectangle</dd>
|
986
|
+
|
987
|
+
<dt>map</dt>
|
988
|
+
|
989
|
+
<dd>A string describing <span class="imquote">the expected
|
990
|
+
ordering of the pixel array. It can be any combination or
|
991
|
+
order of R = red, G = green, B = blue, A = alpha, C = cyan, Y
|
992
|
+
= yellow, M = magenta, K = black, or I = intensity (for
|
993
|
+
grayscale).</span></dd>
|
994
|
+
|
995
|
+
<dt>pixels</dt>
|
996
|
+
|
997
|
+
<dd>The pixel data. The pixel data in the array must be
|
998
|
+
stored in scanline order, left-to-right and top-to-bottom.
|
999
|
+
The elements in the array must be <code>Numeric</code> values
|
1000
|
+
in the range [0..MaxRGB]. The easiest way to obtain such an
|
1001
|
+
array is by using the <code>export_pixels</code> method.</dd>
|
1002
|
+
</dl>
|
1003
|
+
|
1004
|
+
<h4>Returns</h4>
|
1005
|
+
|
1006
|
+
<p>The image as transformed by the pixel data.</p>
|
1007
|
+
|
1008
|
+
<h4>Example</h4>
|
1009
|
+
<pre>
|
1010
|
+
# Replace the r'th scanline of the image using
|
1011
|
+
# pixel data stored in red-green-blue order.
|
1012
|
+
img.import_pixels(0, r, img.columns, 1, "RGB", scanline);
|
1013
|
+
</pre>
|
1014
|
+
|
1015
|
+
<h4>See also</h4>
|
1016
|
+
|
1017
|
+
<p><a href="image1.html#constitute">constitute</a>, <a href=
|
1018
|
+
"image2.html#export_pixels">export_pixels</a>, <a href=
|
1019
|
+
"image3.html#store_pixels">store_pixels</a></p>
|
1020
|
+
|
1021
|
+
<h4>Magick API</h4>
|
1022
|
+
|
1023
|
+
<p>ImportImagePixels (available in ImageMagick 5.5.7 and
|
1024
|
+
GraphicsMagick 1.1)</p>
|
1025
|
+
|
1026
|
+
<h4>Note</h4>
|
1027
|
+
|
1028
|
+
<p>This method replaces the <code>constitute</code> method.</p>
|
1029
|
+
</div>
|
1030
|
+
|
1031
|
+
<div class="sig">
|
1032
|
+
<h3 id="inspect">inspect</h3>
|
1033
|
+
|
1034
|
+
<p><span class="arg">image</span>.inspect ->
|
1035
|
+
<em>aString</em></p>
|
1036
|
+
</div>
|
1037
|
+
|
1038
|
+
<div class="desc">
|
1039
|
+
<h4>Description</h4>
|
1040
|
+
|
1041
|
+
<p>Constructs a description of the image as a string. The
|
1042
|
+
string contains some or all of the following fields:</p>
|
1043
|
+
|
1044
|
+
<dl>
|
1045
|
+
<dt>original_filename=></dt>
|
1046
|
+
|
1047
|
+
<dd>if different from the current filename.</dd>
|
1048
|
+
|
1049
|
+
<dt>filename</dt>
|
1050
|
+
|
1051
|
+
<dd>the current filename</dd>
|
1052
|
+
|
1053
|
+
<dt>[scene]</dt>
|
1054
|
+
|
1055
|
+
<dd>the scene number, if the image is part of an image
|
1056
|
+
sequence</dd>
|
1057
|
+
|
1058
|
+
<dt>format</dt>
|
1059
|
+
|
1060
|
+
<dd>the image format (GIF or JPEG, for example)</dd>
|
1061
|
+
|
1062
|
+
<dt>original width x height</dt>
|
1063
|
+
|
1064
|
+
<dd>if different from the current width x height</dd>
|
1065
|
+
|
1066
|
+
<dt>page width x height + x-offset + y-offset</dt>
|
1067
|
+
|
1068
|
+
<dd>if any of these fields is non-zero</dd>
|
1069
|
+
|
1070
|
+
<dt>storage class</dt>
|
1071
|
+
|
1072
|
+
<dd><em>DirectClass</em> or <em>PseudoClass</em></dd>
|
1073
|
+
|
1074
|
+
<dt>number of colors</dt>
|
1075
|
+
|
1076
|
+
<dd>total number of colors used in the image</dd>
|
1077
|
+
|
1078
|
+
<dt>mean error per pixel/normalized mean error/normalized
|
1079
|
+
maximum error</dt>
|
1080
|
+
|
1081
|
+
<dd>for PseudoClass images, if present</dd>
|
1082
|
+
|
1083
|
+
<dt><em>N</em>-bit</dt>
|
1084
|
+
|
1085
|
+
<dd>bit depth</dd>
|
1086
|
+
|
1087
|
+
<dt>blob size</dt>
|
1088
|
+
|
1089
|
+
<dd>if present</dd>
|
1090
|
+
</dl>
|
1091
|
+
|
1092
|
+
<h4>Example</h4>
|
1093
|
+
<pre>
|
1094
|
+
f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
1095
|
+
</pre>
|
1096
|
+
</div>
|
1097
|
+
|
1098
|
+
<div class="sig">
|
1099
|
+
<h3 id="level">level</h3>
|
1100
|
+
|
1101
|
+
<p><span class="arg">image</span>.level(<span class=
|
1102
|
+
"arg">black_point</span>=<code>0.0</code>, <span class=
|
1103
|
+
"arg">mid_point</span>=<code>1.0</code>, <span class=
|
1104
|
+
"arg">white_point</span>=<code>MaxRGB</code>) ->
|
1105
|
+
<em>anImage</em></p>
|
1106
|
+
</div>
|
1107
|
+
|
1108
|
+
<div class="desc">
|
1109
|
+
<h4>Description</h4>
|
1110
|
+
|
1111
|
+
<p class="imquote">Adjusts the levels of an image by scaling
|
1112
|
+
the colors falling between specified white and black points to
|
1113
|
+
the full available quantum range. The parameters provided
|
1114
|
+
represent the black, mid, and white points. The black point
|
1115
|
+
specifies the darkest color in the image. Colors darker than
|
1116
|
+
the black point are set to zero. Mid point specifies a gamma
|
1117
|
+
correction to apply to the image. White point specifies the
|
1118
|
+
lightest color in the image. Colors brighter than the white
|
1119
|
+
point are set to the maximum quantum value.</p>
|
1120
|
+
|
1121
|
+
<h4>Arguments</h4>
|
1122
|
+
|
1123
|
+
<dl>
|
1124
|
+
<dt>black_point</dt>
|
1125
|
+
|
1126
|
+
<dd>The black point level. The default is 0.0.</dd>
|
1127
|
+
|
1128
|
+
<dt>mid_point</dt>
|
1129
|
+
|
1130
|
+
<dd>The mid-point level. The default is 1.0.</dd>
|
1131
|
+
|
1132
|
+
<dt>white_point</dt>
|
1133
|
+
|
1134
|
+
<dd>The white point level. The default is <a href=
|
1135
|
+
"constants.html#Miscellaneous_constants">MaxRGB</a>.</dd>
|
1136
|
+
</dl>
|
1137
|
+
|
1138
|
+
<h4>Returns</h4>
|
1139
|
+
|
1140
|
+
<p>A new image</p>
|
1141
|
+
|
1142
|
+
<h4>Example</h4>
|
1143
|
+
|
1144
|
+
<p><code>level(0,1.50)</code></p>
|
1145
|
+
|
1146
|
+
<p class="rollover"><a href=
|
1147
|
+
"javascript:popup('level.rb.html')"><img onmouseover=
|
1148
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1149
|
+
"this.src='ex/level.jpg'" src="ex/level.jpg" title=
|
1150
|
+
"Click to see the example script" alt="level example" /></a>
|
1151
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
1152
|
+
"Mouse over the image to see the original image" /></p>
|
1153
|
+
|
1154
|
+
<h4>See also</h4><p><a href="#level_channel">level_channel</a></p>
|
1155
|
+
|
1156
|
+
<h4>Magick API</h4>
|
1157
|
+
|
1158
|
+
<p>LevelImage</p>
|
1159
|
+
</div>
|
1160
|
+
|
1161
|
+
<div class="sig">
|
1162
|
+
<h3 id="level_channel">level_channel</h3>
|
1163
|
+
|
1164
|
+
<p><span class="arg">image</span>.level_channel(<span class=
|
1165
|
+
"arg">channel</span>, <span class=
|
1166
|
+
"arg">black_point</span>=<code>0.0</code>, <span class=
|
1167
|
+
"arg">mid_point</span>=<code>1.0</code>, <span class=
|
1168
|
+
"arg">white_point</span>=<code>MaxRGB</code>) ->
|
1169
|
+
<em>anImage</em></p>
|
1170
|
+
</div>
|
1171
|
+
|
1172
|
+
<div class="desc">
|
1173
|
+
<h4>Description</h4>Same as <code>level</code> but operates
|
1174
|
+
only on the specified channel.
|
1175
|
+
|
1176
|
+
<h4>Arguments</h4>
|
1177
|
+
|
1178
|
+
<dl>
|
1179
|
+
<dt>channel</dt>
|
1180
|
+
|
1181
|
+
<dd>A <a href="constants.html#ChannelType">ChannelType</a>
|
1182
|
+
value.</dd>
|
1183
|
+
|
1184
|
+
<dt>black_point</dt>
|
1185
|
+
|
1186
|
+
<dd>The black point level. The default is 0.0.</dd>
|
1187
|
+
|
1188
|
+
<dt>mid_point</dt>
|
1189
|
+
|
1190
|
+
<dd>The mid-point level. The default is 1.0.</dd>
|
1191
|
+
|
1192
|
+
<dt>white_point</dt>
|
1193
|
+
|
1194
|
+
<dd>The white point level. The default is <a href=
|
1195
|
+
"constants.html#Miscellaneous_constants">MaxRGB</a>.</dd>
|
1196
|
+
</dl>
|
1197
|
+
|
1198
|
+
<h4>Returns</h4>
|
1199
|
+
|
1200
|
+
<p>A new image</p>
|
1201
|
+
|
1202
|
+
<h4>Example</h4>
|
1203
|
+
|
1204
|
+
<p class="rollover"><a href=
|
1205
|
+
"javascript:popup('level_channel.rb.html')"><img onmouseover=
|
1206
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1207
|
+
"this.src='ex/level_channel.jpg'" src="ex/level_channel.jpg"
|
1208
|
+
title="Click to see the example script" alt=
|
1209
|
+
"level_channel example" /></a> <img src="ex/images/spin.gif"
|
1210
|
+
alt="" class="spin" title=
|
1211
|
+
"Mouse over the example to see the original image" /></p>
|
1212
|
+
|
1213
|
+
<h4>See also</h4><p><a href="#level">level</a></p>
|
1214
|
+
|
1215
|
+
<h4>Magick API</h4>
|
1216
|
+
|
1217
|
+
<p>LevelImageChannel (available in ImageMagick 5.5.3)</p>
|
1218
|
+
</div>
|
1219
|
+
|
1220
|
+
<div class="sig">
|
1221
|
+
<h3 id="magnify">magnify</h3>
|
1222
|
+
|
1223
|
+
<p><span class="arg">image</span>.magnify ->
|
1224
|
+
<em>anImage</em></p>
|
1225
|
+
</div>
|
1226
|
+
|
1227
|
+
<div class="desc">
|
1228
|
+
<h4>Description</h4>
|
1229
|
+
|
1230
|
+
<p>A convenience method that scales the receiver to twice its
|
1231
|
+
size.</p>
|
1232
|
+
|
1233
|
+
<h4>Returns</h4>
|
1234
|
+
|
1235
|
+
<p>A new image</p>
|
1236
|
+
|
1237
|
+
<h4>See also</h4>
|
1238
|
+
|
1239
|
+
<p><a href="#magnify_bang">magnify!</a>, <a href=
|
1240
|
+
"#minify">minify</a>, <a href="image3.html#resize">resize</a>,
|
1241
|
+
<a href="image3.html#scale">scale</a>, <a href=
|
1242
|
+
"image3.html#sample">sample</a>, <a href=
|
1243
|
+
"image3.html#thumbnail">thumbnail</a></p>
|
1244
|
+
|
1245
|
+
<h4>Magick API</h4>
|
1246
|
+
|
1247
|
+
<p>MagnifyImage</p>
|
1248
|
+
</div>
|
1249
|
+
|
1250
|
+
<div class="sig">
|
1251
|
+
<h3 id="magnify_bang">magnify!</h3>
|
1252
|
+
|
1253
|
+
<p><span class="arg">image</span>.magnify! ->
|
1254
|
+
<em>image</em></p>
|
1255
|
+
</div>
|
1256
|
+
|
1257
|
+
<div class="desc">
|
1258
|
+
<h4>Description</h4>
|
1259
|
+
|
1260
|
+
<p>In-place form of <a href="#magnify">magnify</a></p>
|
1261
|
+
|
1262
|
+
<h4>Returns</h4>self
|
1263
|
+
</div>
|
1264
|
+
|
1265
|
+
<div class="sig">
|
1266
|
+
<h3 id="map">map</h3>
|
1267
|
+
|
1268
|
+
<p><span class="arg">image</span>.map(<span class=
|
1269
|
+
"arg">img</span>, <span class=
|
1270
|
+
"arg">dither</span>=<code>false</code>) ->
|
1271
|
+
<em>anImage</em></p>
|
1272
|
+
</div>
|
1273
|
+
|
1274
|
+
<div class="desc">
|
1275
|
+
<h4>Description</h4>
|
1276
|
+
|
1277
|
+
<p class="imquote">Replaces the colors of an image with the
|
1278
|
+
closest color from a reference image.</p>
|
1279
|
+
|
1280
|
+
<h4>Arguments</h4>
|
1281
|
+
|
1282
|
+
<dl>
|
1283
|
+
<dt>img</dt>
|
1284
|
+
|
1285
|
+
<dd>The reference image. May be either another image or an
|
1286
|
+
<code>Image</code> object.</dd>
|
1287
|
+
|
1288
|
+
<dt>dither</dt>
|
1289
|
+
|
1290
|
+
<dd>If <code>true</code>, dithers the mapped image.</dd>
|
1291
|
+
</dl>
|
1292
|
+
|
1293
|
+
<h4>Returns</h4>
|
1294
|
+
|
1295
|
+
<p>A new image</p>
|
1296
|
+
|
1297
|
+
<h4>Example</h4>
|
1298
|
+
|
1299
|
+
<p>This image has been mapped to the Netscape 216-color
|
1300
|
+
cube.</p>
|
1301
|
+
|
1302
|
+
<p class="rollover"><a href=
|
1303
|
+
"javascript:popup('map_f.rb.html')"><img onmouseover=
|
1304
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1305
|
+
"this.src='ex/map_f.jpg'" src="ex/map_f.jpg" alt=
|
1306
|
+
"map_f example" title="Click to see the example script" /></a>
|
1307
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
1308
|
+
"Mouse over the image to see the original image" /></p>
|
1309
|
+
|
1310
|
+
<h4>See also</h4>
|
1311
|
+
|
1312
|
+
<p><a href="ilist.html#map">ImageList#map</a></p>
|
1313
|
+
|
1314
|
+
<h4>Magick API</h4>
|
1315
|
+
|
1316
|
+
<p>MapImage</p>
|
1317
|
+
</div>
|
1318
|
+
|
1319
|
+
<div class="sig">
|
1320
|
+
<h3 id="matte_fill_to_border">matte_fill_to_border</h3>
|
1321
|
+
|
1322
|
+
<p><span class=
|
1323
|
+
"arg">image</span>.matte_fill_to_border(<span class=
|
1324
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
1325
|
+
<em>anImage</em></p>
|
1326
|
+
</div>
|
1327
|
+
|
1328
|
+
<div class="desc">
|
1329
|
+
<h4>Description</h4>
|
1330
|
+
|
1331
|
+
<p>Makes transparent all the pixels that are neighbors of the
|
1332
|
+
pixel at <span class="arg">x</span>,<span class="arg">y</span>
|
1333
|
+
and are not the border color.</p>
|
1334
|
+
|
1335
|
+
<h4>Arguments</h4>
|
1336
|
+
|
1337
|
+
<p>The x- and y- coordinates of the target pixel.</p>
|
1338
|
+
|
1339
|
+
<h4>Returns</h4>
|
1340
|
+
|
1341
|
+
<p>A new image</p>
|
1342
|
+
|
1343
|
+
<h4>Example</h4>
|
1344
|
+
|
1345
|
+
<p>In this example the border color is black. The fill starts
|
1346
|
+
in the center and makes all the pixels transparent until it
|
1347
|
+
reaches a black pixel. The resulting image has been composited
|
1348
|
+
over a plasma background, which shows through the transparent
|
1349
|
+
pixels.</p>
|
1350
|
+
|
1351
|
+
<p class="rollover"><a href=
|
1352
|
+
"javascript:popup('matte_fill_to_border.rb.html')"><img src=
|
1353
|
+
"ex/matte_fill_to_border_after.gif" onmouseover=
|
1354
|
+
"this.src='ex/matte_fill_to_border_before.gif'" onmouseout=
|
1355
|
+
"this.src='ex/matte_fill_to_border_after.gif'" alt=
|
1356
|
+
"matte_fill_to_border example" title=
|
1357
|
+
"Click to see the example script" /></a> <img src=
|
1358
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1359
|
+
"Mouse over the image to see the original image" /></p>
|
1360
|
+
|
1361
|
+
<h4>See also</h4>
|
1362
|
+
|
1363
|
+
<p><a href="#matte_floodfill">matte_floodfill</a>, <a href=
|
1364
|
+
"draw.html#matte">Draw#matte</a></p>
|
1365
|
+
|
1366
|
+
<h4>Magick API</h4>
|
1367
|
+
|
1368
|
+
<p>MatteFloodfillImage</p>
|
1369
|
+
</div>
|
1370
|
+
|
1371
|
+
<div class="sig">
|
1372
|
+
<h3 id="matte_floodfill">matte_floodfill</h3>
|
1373
|
+
|
1374
|
+
<p><span class="arg">image</span>.matte_floodfill(<span class=
|
1375
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
1376
|
+
<em>anImage</em></p>
|
1377
|
+
</div>
|
1378
|
+
|
1379
|
+
<div class="desc">
|
1380
|
+
<h4>Description</h4>
|
1381
|
+
|
1382
|
+
<p>Makes transparent all the pixels that are the same color as
|
1383
|
+
the pixel at <span class="arg">x</span>, <span class=
|
1384
|
+
"arg">y</span>, and are neighbors.</p>
|
1385
|
+
|
1386
|
+
<h4>Arguments</h4>
|
1387
|
+
|
1388
|
+
<p>The x- and y-coordinates of the target pixel.</p>
|
1389
|
+
|
1390
|
+
<h4>Returns</h4>
|
1391
|
+
|
1392
|
+
<p>A new image</p>
|
1393
|
+
|
1394
|
+
<h4>Example</h4>
|
1395
|
+
|
1396
|
+
<p>In this example the fill starts at the center pixel and
|
1397
|
+
replaces all the yellow pixels - the color of the center pixel.
|
1398
|
+
The resulting image has been composited over a plasma
|
1399
|
+
background, which shows through the transparent pixels.</p>
|
1400
|
+
|
1401
|
+
<p class="rollover"><a href=
|
1402
|
+
"javascript:popup('matte_floodfill.rb.html')"><img src=
|
1403
|
+
"ex/matte_floodfill_after.gif" onmouseover=
|
1404
|
+
"this.src='ex/matte_floodfill_before.gif'" onmouseout=
|
1405
|
+
"this.src='ex/matte_floodfill_after.gif'" alt=
|
1406
|
+
"matte_floodfill example" title=
|
1407
|
+
"Click to see the example script" /></a> <img src=
|
1408
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1409
|
+
"Mouse over the image to see the original image" /></p>
|
1410
|
+
|
1411
|
+
<h4>See also</h4>
|
1412
|
+
|
1413
|
+
<p><a href="#matte_replace">matte_replace</a>, <a href=
|
1414
|
+
"draw.html#matte">Draw#matte</a></p>
|
1415
|
+
|
1416
|
+
<h4>Magick API</h4>
|
1417
|
+
|
1418
|
+
<p>MatteFloodfilImage</p>
|
1419
|
+
</div>
|
1420
|
+
|
1421
|
+
<div class="sig">
|
1422
|
+
<h3 id="matte_point">matte_point</h3>
|
1423
|
+
|
1424
|
+
<p><span class="arg">image</span>.matte_point(<span class=
|
1425
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
1426
|
+
<em>anImage</em></p>
|
1427
|
+
</div>
|
1428
|
+
|
1429
|
+
<div class="desc">
|
1430
|
+
<h4>Description</h4>
|
1431
|
+
|
1432
|
+
<p>Makes the pixel at <span class="arg">x</span>, <span class=
|
1433
|
+
"arg">y</span> transparent. This method makes a copy of the
|
1434
|
+
image, just to make one pixel transparent. I recommend using
|
1435
|
+
the <code>Draw#matte</code> method instead.</p>
|
1436
|
+
|
1437
|
+
<h4>Arguments</h4>
|
1438
|
+
|
1439
|
+
<p>The x- and y-coordinates of the target pixel.</p>
|
1440
|
+
|
1441
|
+
<h4>Returns</h4>
|
1442
|
+
|
1443
|
+
<p>A new image</p>
|
1444
|
+
|
1445
|
+
<h4>See also</h4><p><a href="draw.html#Draw.matte">Draw#matte</a></p>
|
1446
|
+
</div>
|
1447
|
+
|
1448
|
+
<div class="sig">
|
1449
|
+
<h3 id="matte_replace">matte_replace</h3>
|
1450
|
+
|
1451
|
+
<p><span class="arg">image</span>.matte_replace(<span class=
|
1452
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
1453
|
+
<em>anImage</em></p>
|
1454
|
+
</div>
|
1455
|
+
|
1456
|
+
<div class="desc">
|
1457
|
+
<h4>Description</h4>
|
1458
|
+
|
1459
|
+
<p>Makes transparent all the pixels that are the same color as
|
1460
|
+
the pixel at <span class="arg">x</span>, <span class=
|
1461
|
+
"arg">y</span>.</p>
|
1462
|
+
|
1463
|
+
<h4>Arguments</h4>The x- and y-coordinates of the target pixel.
|
1464
|
+
|
1465
|
+
<h4>Returns</h4>
|
1466
|
+
|
1467
|
+
<p>A new image</p>
|
1468
|
+
|
1469
|
+
<h4>Example</h4>
|
1470
|
+
|
1471
|
+
<p>In this example the target pixel is a black pixel in the
|
1472
|
+
center of the uppermost circle. The <code>matte_replace</code>
|
1473
|
+
method makes all the black pixels in the image transparent. The
|
1474
|
+
resulting image has been composited over a plasma background,
|
1475
|
+
which shows through the transparent pixels.</p>
|
1476
|
+
|
1477
|
+
<p class="rollover"><a href=
|
1478
|
+
"javascript:popup('matte_replace.rb.html')"><img onmouseover=
|
1479
|
+
"this.src='ex/matte_replace_before.gif'" onmouseout=
|
1480
|
+
"this.src='ex/matte_replace_after.gif'" src=
|
1481
|
+
"ex/matte_replace_after.gif" alt="matte_replace example" title=
|
1482
|
+
"Click to see the example script" /></a> <img src=
|
1483
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1484
|
+
"Mouse over the image to see the original image" /></p>
|
1485
|
+
|
1486
|
+
<h4>See also</h4><p><a href=
|
1487
|
+
"image3.html#transparent">transparent</a>, <a href=
|
1488
|
+
"draw.html#matte">Draw#matte</a></p>
|
1489
|
+
|
1490
|
+
<h4>Magick API</h4>
|
1491
|
+
|
1492
|
+
<p>TransparentImage</p>
|
1493
|
+
</div>
|
1494
|
+
|
1495
|
+
<div class="sig">
|
1496
|
+
<h3 id="matte_reset_bang">matte_reset!</h3>
|
1497
|
+
|
1498
|
+
<p><span class="arg">image</span>.matte_reset! ->
|
1499
|
+
<em>anImage</em></p>
|
1500
|
+
</div>
|
1501
|
+
|
1502
|
+
<div class="desc">
|
1503
|
+
<h4>Description</h4>
|
1504
|
+
|
1505
|
+
<p>Makes all the pixels in the image transparent.</p>
|
1506
|
+
|
1507
|
+
<h4>Returns</h4>
|
1508
|
+
|
1509
|
+
<p>A new image</p>
|
1510
|
+
|
1511
|
+
<h4>See also</h4>
|
1512
|
+
|
1513
|
+
<p><a href="imageattrs.html#opacity_eq">opacity=</a></p>
|
1514
|
+
|
1515
|
+
<h4>Magick API</h4>SetImageOpacity
|
1516
|
+
</div>
|
1517
|
+
|
1518
|
+
<div class="sig">
|
1519
|
+
<h3 id="median_filter">median_filter</h3>
|
1520
|
+
|
1521
|
+
<p><span class="arg">image</span>.median_filter(<span class=
|
1522
|
+
"arg">radius</span>=1.0) -> <em>anImage</em></p>
|
1523
|
+
</div>
|
1524
|
+
|
1525
|
+
<div class="desc">
|
1526
|
+
<h4>Description</h4>
|
1527
|
+
|
1528
|
+
<p class="imquote">Applies a digital filter that improves the
|
1529
|
+
quality of a noisy image. Each pixel is replaced by the median
|
1530
|
+
in a set of neighboring pixels as defined by radius.</p>
|
1531
|
+
|
1532
|
+
<h4>Arguments</h4>
|
1533
|
+
|
1534
|
+
<p>The filter radius. The larger the value, the longer it takes
|
1535
|
+
to render. Values larger than 8 or 9 may take longer than you
|
1536
|
+
want to wait, and will not have significantly better results
|
1537
|
+
than much smaller values.</p>
|
1538
|
+
|
1539
|
+
<h4>Returns</h4>
|
1540
|
+
|
1541
|
+
<p>A new image</p>
|
1542
|
+
|
1543
|
+
<h4>Example</h4>
|
1544
|
+
|
1545
|
+
<p>The left side of the image has been modified by <a href=
|
1546
|
+
"image1.html#add_noise"><code>add_noise</code></a>. The right
|
1547
|
+
side has been filtered by
|
1548
|
+
<code>median_filter(0.05).</code></p><a href=
|
1549
|
+
"javascript:popup('median_filter.rb.html')"><img src=
|
1550
|
+
"ex/median_filter.jpg" alt="median_filter example" /></a>
|
1551
|
+
|
1552
|
+
<h4>See also</h4><p><a href="#enhance">enhance</a>, <a href=
|
1553
|
+
"image3.html#reduce_noise">reduce_noise</a>, <a href=
|
1554
|
+
"image3.html#unsharp_mask">unsharp_mask</a></p>
|
1555
|
+
|
1556
|
+
<h4>Magick API</h4>
|
1557
|
+
|
1558
|
+
<p>MedianFilterImage</p>
|
1559
|
+
</div>
|
1560
|
+
|
1561
|
+
<div class="sig">
|
1562
|
+
<h3 id="minify">minify</h3>
|
1563
|
+
|
1564
|
+
<p><span class="arg">image</span>.minify ->
|
1565
|
+
<em>anImage</em></p>
|
1566
|
+
</div>
|
1567
|
+
|
1568
|
+
<div class="desc">
|
1569
|
+
<h4>Description</h4>
|
1570
|
+
|
1571
|
+
<p>A convenience method that scales the receiver to half its
|
1572
|
+
size.</p>
|
1573
|
+
|
1574
|
+
<h4>Returns</h4>
|
1575
|
+
|
1576
|
+
<p>A new image</p>
|
1577
|
+
|
1578
|
+
<h4>See also</h4><p><a href="#minify_bang">minify!</a> <a href=
|
1579
|
+
"#magnify">magnify</a>, <a href=
|
1580
|
+
"image3.html#resize">resize</a>, <a href=
|
1581
|
+
"image3.html#sample">sample</a>, <a href=
|
1582
|
+
"image3.html#scale">scale</a>, <a href=
|
1583
|
+
"image3.html#thumbnail">thumbnail</a></p>
|
1584
|
+
|
1585
|
+
<h4>Magick API</h4>
|
1586
|
+
|
1587
|
+
<p>MinifyImage</p>
|
1588
|
+
</div>
|
1589
|
+
|
1590
|
+
<div class="sig">
|
1591
|
+
<h3 id="minify_bang">minify!</h3>
|
1592
|
+
|
1593
|
+
<p><span class="arg">image</span>.minify! ->
|
1594
|
+
<em>image</em></p>
|
1595
|
+
</div>
|
1596
|
+
|
1597
|
+
<div class="desc">
|
1598
|
+
<h4>Description</h4>
|
1599
|
+
|
1600
|
+
<p>In-place form of <a href="#Image.minify">minify</a>.</p>
|
1601
|
+
|
1602
|
+
<h4>Returns</h4>
|
1603
|
+
|
1604
|
+
<p>self</p>
|
1605
|
+
</div>
|
1606
|
+
|
1607
|
+
<div class="sig">
|
1608
|
+
<h3 id="modulate">modulate</h3>
|
1609
|
+
|
1610
|
+
<p><span class="arg">image</span>.modulate(<span class=
|
1611
|
+
"arg">brightness</span>=1.0, <span class=
|
1612
|
+
"arg">saturation</span>=1.0, <span class="arg">hue</span>=1.0)
|
1613
|
+
-> <em>anImage</em></p>
|
1614
|
+
</div>
|
1615
|
+
|
1616
|
+
<div class="desc">
|
1617
|
+
<h4>Description</h4>
|
1618
|
+
|
1619
|
+
<p>Changes the brightness, saturation, and hue.</p>
|
1620
|
+
|
1621
|
+
<h4>Arguments</h4>
|
1622
|
+
|
1623
|
+
<p>The percent change in the brightness, saturation, and hue,
|
1624
|
+
represented as <code>Float</code> numbers. For example, 0.25
|
1625
|
+
means "25%". All three arguments may be omitted. The default
|
1626
|
+
value of each argument is 1.0, that is, 100%.</p>
|
1627
|
+
|
1628
|
+
<h4>Returns</h4>
|
1629
|
+
|
1630
|
+
<p>A new image</p>
|
1631
|
+
|
1632
|
+
<h4>Example</h4>
|
1633
|
+
|
1634
|
+
<p><code>modulate(0.85)</code></p>
|
1635
|
+
|
1636
|
+
<p class="rollover"><a href=
|
1637
|
+
"javascript:popup('modulate.rb.html')"><img src=
|
1638
|
+
"ex/modulate.jpg" alt="modulate example" onmouseover=
|
1639
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1640
|
+
"this.src='ex/modulate.jpg'" title=
|
1641
|
+
"Click to see the example script" /></a> <img src=
|
1642
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1643
|
+
"Mouse over the example to see the original image" /></p>
|
1644
|
+
|
1645
|
+
<h4>Magick API</h4>
|
1646
|
+
|
1647
|
+
<p>ModulateImage</p>
|
1648
|
+
</div>
|
1649
|
+
|
1650
|
+
<div class="sig">
|
1651
|
+
<h3 id="monochrome_q">monochrome?</h3>
|
1652
|
+
|
1653
|
+
<p><span class="arg">image</span>.monochrome? ->
|
1654
|
+
<code>true</code> or <code>false</code></p>
|
1655
|
+
</div>
|
1656
|
+
|
1657
|
+
<div class="desc">
|
1658
|
+
<h4>Description</h4>
|
1659
|
+
|
1660
|
+
<p>Returns <code>true</code> if all the pixels have the same
|
1661
|
+
red, green, and blue values and the values are either 0 or
|
1662
|
+
MaxRGB. That is, the image is black-and-white.</p>
|
1663
|
+
|
1664
|
+
<h4>See also</h4>
|
1665
|
+
|
1666
|
+
<p><a href="#gray_q">gray?</a></p>
|
1667
|
+
|
1668
|
+
<h4>Magick API</h4>
|
1669
|
+
|
1670
|
+
<p>IsMonochromeImage</p>
|
1671
|
+
</div>
|
1672
|
+
|
1673
|
+
<div class="sig">
|
1674
|
+
<h3 id="motion_blur">motion_blur</h3>
|
1675
|
+
|
1676
|
+
<p><span class="arg">image</span>.motion_blur(<span class=
|
1677
|
+
"arg">radius</span>, <span class="arg">sigma</span>,
|
1678
|
+
<span class="arg">angle</span>) -> <em>anImage</em></p>
|
1679
|
+
</div>
|
1680
|
+
|
1681
|
+
<div class="desc">
|
1682
|
+
<h4>Description</h4>
|
1683
|
+
|
1684
|
+
<p class="imquote">Simulates motion blur. We convolve the image
|
1685
|
+
with a Gaussian operator of the given <span class=
|
1686
|
+
"arg">radius</span> and standard deviation (<span class=
|
1687
|
+
"arg">sigma</span>). Use a radius of 0 and
|
1688
|
+
<code>motion_blur</code> selects a suitable radius for you.
|
1689
|
+
<span class="arg">Angle</span> gives the angle of the blurring
|
1690
|
+
motion.</p>
|
1691
|
+
|
1692
|
+
<h4>Arguments</h4>
|
1693
|
+
|
1694
|
+
<dl>
|
1695
|
+
<dt>radius</dt>
|
1696
|
+
|
1697
|
+
<dd>The radius of the Gaussian operator.</dd>
|
1698
|
+
|
1699
|
+
<dt>sigma</dt>
|
1700
|
+
|
1701
|
+
<dd>The standard deviation of the Gaussian operator. Must be
|
1702
|
+
greater than 0.</dd>
|
1703
|
+
|
1704
|
+
<dt>angle</dt>
|
1705
|
+
|
1706
|
+
<dd>The angle (in degrees) of the blurring motion.</dd>
|
1707
|
+
</dl>
|
1708
|
+
|
1709
|
+
<h4>Returns</h4>
|
1710
|
+
|
1711
|
+
<p>A new image</p>
|
1712
|
+
|
1713
|
+
<h4>Example</h4>
|
1714
|
+
|
1715
|
+
<p class="rollover"><a href=
|
1716
|
+
"javascript:popup('motion_blur.rb.html')"><img src=
|
1717
|
+
"ex/motion_blur.jpg" alt="motion_blur example" title=
|
1718
|
+
"Click to see the example script" onmouseover=
|
1719
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1720
|
+
"this.src='ex/motion_blur.jpg'" /></a> <img src=
|
1721
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1722
|
+
"Mouse over the example to see the original image" /></p>
|
1723
|
+
|
1724
|
+
<h4>See also</h4>
|
1725
|
+
|
1726
|
+
<p><a href="image1.html#blur_image">blur_image</a>, <a href=
|
1727
|
+
"#gaussian_blur">gaussian_blur</a></p>
|
1728
|
+
|
1729
|
+
<h4>Magick API</h4>
|
1730
|
+
|
1731
|
+
<p>MotionBlurImage</p>
|
1732
|
+
</div>
|
1733
|
+
|
1734
|
+
<div class="sig">
|
1735
|
+
<h3 id="negate">negate</h3>
|
1736
|
+
|
1737
|
+
<p><span class="arg">image</span>.negate(<span class=
|
1738
|
+
"arg">grayscale</span>=<code>false</code>) ->
|
1739
|
+
<em>anImage</em></p>
|
1740
|
+
</div>
|
1741
|
+
|
1742
|
+
<div class="desc">
|
1743
|
+
<h4>Description</h4>
|
1744
|
+
|
1745
|
+
<p>Negates the colors in the receiver.</p>
|
1746
|
+
|
1747
|
+
<h4>Arguments</h4>If the <span class="arg">grayscale</span>
|
1748
|
+
argument is true, only the grayscale values are negated.
|
1749
|
+
|
1750
|
+
<h4>Returns</h4>
|
1751
|
+
|
1752
|
+
<p>A new image</p>
|
1753
|
+
|
1754
|
+
<h4>Example</h4>
|
1755
|
+
|
1756
|
+
<p class="rollover"><a href=
|
1757
|
+
"javascript:popup('negate.rb.html')"><img src="ex/negate.jpg"
|
1758
|
+
alt="negate example" onmouseover=
|
1759
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1760
|
+
"this.src='ex/negate.jpg'" title=
|
1761
|
+
"Click to see the example script" /></a> <img src=
|
1762
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1763
|
+
"Mouse over the example to see the original image" /></p>
|
1764
|
+
|
1765
|
+
<h4>See also</h4><p><a href="#negate_channel">negate_channel</a></p>
|
1766
|
+
|
1767
|
+
<h4>Magick API</h4>
|
1768
|
+
|
1769
|
+
<p>NegateImage</p>
|
1770
|
+
</div>
|
1771
|
+
|
1772
|
+
<div class="sig">
|
1773
|
+
<h3 id="negate_channel">negate_channel</h3>
|
1774
|
+
|
1775
|
+
<p><span class="arg">image</span>.negate_channel(<span class=
|
1776
|
+
"arg">grayscale</span>=<code>false</code>, [<span class=
|
1777
|
+
"arg">channel</span>[, <span class="arg">channel</span>...]] =
|
1778
|
+
<em>anImage</em></p>
|
1779
|
+
</div>
|
1780
|
+
|
1781
|
+
<div class="desc">
|
1782
|
+
<h4>Description</h4>
|
1783
|
+
|
1784
|
+
<p>Negate a particular image channel or channels.</p>
|
1785
|
+
|
1786
|
+
<h4>Arguments</h4>
|
1787
|
+
|
1788
|
+
<dl>
|
1789
|
+
<dt>grayscale</dt>
|
1790
|
+
|
1791
|
+
<dd class="imquote">if <code>true</code>, only negate
|
1792
|
+
grayscale pixels within the image</dd>
|
1793
|
+
|
1794
|
+
<dt>channel...</dt>
|
1795
|
+
|
1796
|
+
<dd>0 or more <a href=
|
1797
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1798
|
+
channels are specified, all the channels are negated.
|
1799
|
+
Specifying no channel arguments has the same effect as the
|
1800
|
+
<code>negate</code> method, above.</dd>
|
1801
|
+
</dl>
|
1802
|
+
|
1803
|
+
<h4>Returns</h4>
|
1804
|
+
|
1805
|
+
<p>A new image</p>
|
1806
|
+
|
1807
|
+
<h4>Example</h4>
|
1808
|
+
|
1809
|
+
<p><code>negate_channel(false, GreenChannel)</code></p>
|
1810
|
+
|
1811
|
+
<p class="rollover"><a href=
|
1812
|
+
"javascript:popup('negate_channel.rb.html')"><img src=
|
1813
|
+
"ex/negate_channel.jpg" alt="negate_channel example"
|
1814
|
+
onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1815
|
+
"this.src='ex/negate_channel.jpg'" title=
|
1816
|
+
"Click to see the example script" /></a> <img src=
|
1817
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1818
|
+
"Mouse over the example to see the original image" /></p>
|
1819
|
+
|
1820
|
+
<h4>See also</h4><p><a href="#negate">negate</a></p>.
|
1821
|
+
|
1822
|
+
<h4>Magick API</h4>
|
1823
|
+
|
1824
|
+
<p>NegateImageChannel (available in ImageMagick 6.0.0)</p>
|
1825
|
+
</div>
|
1826
|
+
|
1827
|
+
<div class="sig">
|
1828
|
+
<h3 id="normalize">normalize</h3>
|
1829
|
+
|
1830
|
+
<p><span class="arg">image</span>.normalize ->
|
1831
|
+
<em>anImage</em></p>
|
1832
|
+
</div>
|
1833
|
+
|
1834
|
+
<div class="desc">
|
1835
|
+
<h4>Description</h4>
|
1836
|
+
|
1837
|
+
<p class="imquote">Enhances the contrast of a color image by
|
1838
|
+
adjusting the pixel color to span the entire range of colors
|
1839
|
+
available.</p>
|
1840
|
+
|
1841
|
+
<h4>Returns</h4>
|
1842
|
+
|
1843
|
+
<p>A new image</p>
|
1844
|
+
|
1845
|
+
<h4>Example</h4>
|
1846
|
+
|
1847
|
+
<p class="rollover"><a href=
|
1848
|
+
"javascript:popup('normalize.rb.html')"><img src=
|
1849
|
+
"ex/normalize.jpg" alt="normalize example" title=
|
1850
|
+
"Click to see the example script" onmouseover=
|
1851
|
+
"this.src='ex/images/Hot_Air_Balloons.jpg'" onmouseout=
|
1852
|
+
"this.src='ex/normalize.jpg'" /></a> <img src=
|
1853
|
+
"ex/images/spin.gif" alt="" class="spin" style="left: 191px;"
|
1854
|
+
title="Mouse over the example to see the original image" /></p>
|
1855
|
+
|
1856
|
+
<h4>Magick API</h4>
|
1857
|
+
|
1858
|
+
<p>NormalizeImage</p>
|
1859
|
+
<h4>See also</h4>
|
1860
|
+
<p><a href="#normalize_channel">normalize_channel</a></p>
|
1861
|
+
</div>
|
1862
|
+
|
1863
|
+
<div class="sig">
|
1864
|
+
<h3 id="normalize_channel">normalize_channel</h3>
|
1865
|
+
<p><span class="arg">image</span>.normalize_channel([<span class="arg">channel</span>[,
|
1866
|
+
<span class="arg">channel</span>...]]) = <em>anImage</em></p>
|
1867
|
+
</div>
|
1868
|
+
|
1869
|
+
|
1870
|
+
<div class="desc">
|
1871
|
+
<h4>Description</h4>
|
1872
|
+
<p><span class="imquote">Enhances the contrast of a color image by adjusting the pixel color to span the entire range of colors available.</span> Only the specified channels are normalized.</p>
|
1873
|
+
|
1874
|
+
<h4>Arguments</h4>
|
1875
|
+
<dl>
|
1876
|
+
<dt>channel...</dt>
|
1877
|
+
|
1878
|
+
<dd>0 or more <a href=
|
1879
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1880
|
+
channels are specified, all the channels are normalized.
|
1881
|
+
Specifying no channel arguments has the same effect as the
|
1882
|
+
<code>normalize</code> method, above.</dd>
|
1883
|
+
</dl>
|
1884
|
+
|
1885
|
+
<h4>Returns</h4>
|
1886
|
+
<p>A new image</p>
|
1887
|
+
<h4>Magick API</h4>
|
1888
|
+
<p>NormalizeImageChannel (available in ImageMagick 6.1.0)</p>
|
1889
|
+
<h4>See also</h4>
|
1890
|
+
<p><a href="#normalize">normalize</a></p>
|
1891
|
+
</div>
|
1892
|
+
|
1893
|
+
<div class="sig">
|
1894
|
+
<h3 id="oil_paint">oil_paint</h3>
|
1895
|
+
|
1896
|
+
<p><span class="arg">image</span>.oil_paint(<span class=
|
1897
|
+
"arg">radius</span>=3.0) -> <em>anImage</em></p>
|
1898
|
+
</div>
|
1899
|
+
|
1900
|
+
<div class="desc">
|
1901
|
+
<h4>Description</h4>
|
1902
|
+
|
1903
|
+
<p class="imquote">Applies a special effect filter that
|
1904
|
+
simulates an oil painting. Each pixel is replaced by the most
|
1905
|
+
frequent color occurring in a circular region defined by
|
1906
|
+
<span class="arg">radius</span>.</p>
|
1907
|
+
|
1908
|
+
<h4>Returns</h4>
|
1909
|
+
|
1910
|
+
<p>A new image</p>
|
1911
|
+
|
1912
|
+
<h4>Example</h4>
|
1913
|
+
|
1914
|
+
<p class="rollover"><a href=
|
1915
|
+
"javascript:('oil_paint.rb.html')"><img src="ex/oil_paint.jpg"
|
1916
|
+
title="Click to see the example script" onmouseover=
|
1917
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1918
|
+
"this.src='ex/oil_paint.jpg'" alt="oil_paint example" /></a>
|
1919
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
1920
|
+
"Mouse over the example to see the original image" /></p>
|
1921
|
+
|
1922
|
+
<h4>Magick API</h4>
|
1923
|
+
|
1924
|
+
<p>OilPaintImage</p>
|
1925
|
+
</div>
|
1926
|
+
|
1927
|
+
<div class="sig">
|
1928
|
+
<h3 id="opaque">opaque</h3>
|
1929
|
+
|
1930
|
+
<p><span class="arg">image</span>.opaque(<span class=
|
1931
|
+
"arg">target</span>, <span class="arg">fill</span>) ->
|
1932
|
+
<em>anImage</em></p>
|
1933
|
+
</div>
|
1934
|
+
|
1935
|
+
<div class="desc">
|
1936
|
+
<h4>Description</h4>
|
1937
|
+
|
1938
|
+
<p>Changes all pixels having the target color to the fill
|
1939
|
+
color.</p>
|
1940
|
+
|
1941
|
+
<h4>Arguments</h4>
|
1942
|
+
|
1943
|
+
<dl>
|
1944
|
+
<dt>target</dt>
|
1945
|
+
|
1946
|
+
<dd>The color to be replaced. May be a color name or a
|
1947
|
+
<code><a href="struct.html#Pixel">Pixel</a></code></dd>
|
1948
|
+
|
1949
|
+
<dt>fill</dt>
|
1950
|
+
|
1951
|
+
<dd>The replacement color. May be a color name or a
|
1952
|
+
<code><a href="struct.html#Pixel">Pixel</a></code></dd>
|
1953
|
+
</dl>
|
1954
|
+
|
1955
|
+
<h4>Returns</h4>
|
1956
|
+
|
1957
|
+
<p>A new image</p>
|
1958
|
+
|
1959
|
+
<h4>Example</h4>
|
1960
|
+
|
1961
|
+
<p>This example replaces white pixels with red pixels. Set the
|
1962
|
+
<code>fuzz</code> attribute to specify how closely the target
|
1963
|
+
pixels must match.</p>
|
1964
|
+
|
1965
|
+
<p class="rollover"><a href=
|
1966
|
+
"javascript:popup('opaque.rb.html')"><img src="ex/opaque.jpg"
|
1967
|
+
alt="opaque example" onmouseover=
|
1968
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1969
|
+
"this.src='ex/opaque.jpg'" title=
|
1970
|
+
"Click to see the example script" /></a> <img src=
|
1971
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1972
|
+
"Mouse over the example to see the original image" /></p>
|
1973
|
+
|
1974
|
+
<h4>See also</h4>
|
1975
|
+
|
1976
|
+
<p><a href="#color_floodfill">color_floodfill</a></p>
|
1977
|
+
|
1978
|
+
<h4>Magick API</h4>
|
1979
|
+
|
1980
|
+
<p>OpaqueImage</p>
|
1981
|
+
</div>
|
1982
|
+
|
1983
|
+
<div class="sig">
|
1984
|
+
<h3 id="opaque_q">opaque?</h3>
|
1985
|
+
|
1986
|
+
<p><span class="arg">image</span>.opaque? ->
|
1987
|
+
<code>true</code> or <code>false</code></p>
|
1988
|
+
</div>
|
1989
|
+
|
1990
|
+
<div class="desc">
|
1991
|
+
<h4>Description</h4>
|
1992
|
+
|
1993
|
+
<p>Returns <code>true</code> if all of the pixels in the
|
1994
|
+
receiver have an opacity value of <a href=
|
1995
|
+
"constants.html#Opacity">OpaqueOpacity</a>.</p>
|
1996
|
+
|
1997
|
+
<h4>Returns</h4>
|
1998
|
+
|
1999
|
+
<p><code>true</code> or <code>false</code></p>
|
2000
|
+
|
2001
|
+
<h4>Magick API</h4>
|
2002
|
+
|
2003
|
+
<p>IsOpaqueImage</p>
|
2004
|
+
</div>
|
2005
|
+
|
2006
|
+
<div class="sig">
|
2007
|
+
<h3 id="ordered_dither">ordered_dither</h3>
|
2008
|
+
|
2009
|
+
<p><span class="arg">image</span>.ordered_dither ->
|
2010
|
+
<em>anImage</em></p>
|
2011
|
+
</div>
|
2012
|
+
|
2013
|
+
<div class="desc">
|
2014
|
+
<h4>Description</h4>
|
2015
|
+
|
2016
|
+
<p class="imquote">Uses the ordered dithering technique of
|
2017
|
+
reducing color images to monochrome using positional
|
2018
|
+
information to retain as much information as possible.</p>
|
2019
|
+
|
2020
|
+
<h4>Returns</h4>
|
2021
|
+
|
2022
|
+
<p>A new image</p>
|
2023
|
+
|
2024
|
+
<h4>Example</h4>
|
2025
|
+
|
2026
|
+
<p class="rollover"><a href=
|
2027
|
+
"javascript:popup('ordered_dither.rb.html')"><img src=
|
2028
|
+
"ex/ordered_dither.jpg" alt="ordered_dither example"
|
2029
|
+
onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
2030
|
+
"this.src='ex/ordered_dither.jpg'" title=
|
2031
|
+
"Click to see the example script" /></a> <img src=
|
2032
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
2033
|
+
"Mouse over the example to see the original image" /></p>
|
2034
|
+
|
2035
|
+
<h4>See also</h4><p><a href="#posterize">posterize</a>, <a href=
|
2036
|
+
"image3.html#quantize">quantize</a></p>
|
2037
|
+
|
2038
|
+
<h4>Magick API</h4>
|
2039
|
+
|
2040
|
+
<p>OrderedDitherImage</p>
|
2041
|
+
</div>
|
2042
|
+
|
2043
|
+
<div class="sig">
|
2044
|
+
<h3 id="palette_q">palette?</h3>
|
2045
|
+
|
2046
|
+
<p><span class="arg">image</span>.palette? ->
|
2047
|
+
<code>true</code> or <code>false</code></p>
|
2048
|
+
</div>
|
2049
|
+
|
2050
|
+
<div class="desc">
|
2051
|
+
<h4>Description</h4>
|
2052
|
+
|
2053
|
+
<p class="imquote">Returns true if the image is <a href=
|
2054
|
+
"constants.html#ClassType"><code>PseudoClass</code></a> and has
|
2055
|
+
256 unique colors or less.</p>
|
2056
|
+
|
2057
|
+
<h4>Returns</h4>
|
2058
|
+
|
2059
|
+
<p><code>true</code> or <code>false</code></p>
|
2060
|
+
|
2061
|
+
<h4>Magick API</h4>
|
2062
|
+
|
2063
|
+
<p>IsPaletteImage</p>
|
2064
|
+
</div>
|
2065
|
+
|
2066
|
+
<div class="sig">
|
2067
|
+
<h3 id="pixel_color">pixel_color</h3>
|
2068
|
+
|
2069
|
+
<p><span class="arg">image</span>.pixel_color(<span class=
|
2070
|
+
"arg">x</span>, <span class="arg">y</span>[, <span class=
|
2071
|
+
"arg">new_color</span>]) -> <em>aPixel</em></p>
|
2072
|
+
</div>
|
2073
|
+
|
2074
|
+
<div class="desc">
|
2075
|
+
<h4>Description</h4>
|
2076
|
+
|
2077
|
+
<p>Returns the color of the pixel at <span class=
|
2078
|
+
"arg">x</span>, <span class="arg">y</span>. Optionally, changes
|
2079
|
+
the color of the pixel to a new color.</p>
|
2080
|
+
|
2081
|
+
<h4>Arguments</h4>
|
2082
|
+
|
2083
|
+
<dl>
|
2084
|
+
<dt>x, y</dt>
|
2085
|
+
|
2086
|
+
<dd>The x- and y-coordinates of the pixel.</dd>
|
2087
|
+
|
2088
|
+
<dt>new_color</dt>
|
2089
|
+
|
2090
|
+
<dd>If specified, the pixel is set to this color. May be
|
2091
|
+
either a color name or a <a href=
|
2092
|
+
"struct.html#Pixel">Pixel</a>.</dd>
|
2093
|
+
</dl>
|
2094
|
+
|
2095
|
+
<h4>Returns</h4>A <a href="struct.html#Pixel">Pixel</a> having
|
2096
|
+
the RGB values of the specified pixel.
|
2097
|
+
|
2098
|
+
<h4>Example</h4>
|
2099
|
+
<pre>
|
2100
|
+
old = image.pixel_color(20,40,"white")
|
2101
|
+
</pre>
|
2102
|
+
|
2103
|
+
<h4>Magick API</h4>
|
2104
|
+
|
2105
|
+
<p>AcquireImagePixels</p>
|
2106
|
+
</div>
|
2107
|
+
|
2108
|
+
<div class="sig">
|
2109
|
+
<h3 id="posterize">posterize</h3>
|
2110
|
+
|
2111
|
+
<p><span class="arg">image</span>.posterize(<span class=
|
2112
|
+
"arg">levels</span>=4, <span class=
|
2113
|
+
"arg">dither</span>=<code>false</code>) ->
|
2114
|
+
<em>anImage</em></p>
|
2115
|
+
</div>
|
2116
|
+
|
2117
|
+
<div class="desc">
|
2118
|
+
<h4>Description</h4>
|
2119
|
+
|
2120
|
+
<p class="imquote">Reduces the image to a limited number of
|
2121
|
+
colors for a "poster" effect.</p>
|
2122
|
+
|
2123
|
+
<h4>Arguments</h4>
|
2124
|
+
|
2125
|
+
<dl>
|
2126
|
+
<dt>levels</dt>
|
2127
|
+
|
2128
|
+
<dd><span class="imquote">Number of color levels allowed in
|
2129
|
+
each channel. Very low values (2, 3, or 4) have the most
|
2130
|
+
visible effect.</span> The default is 4.</dd>
|
2131
|
+
|
2132
|
+
<dt>dither</dt>
|
2133
|
+
|
2134
|
+
<dd>If <code>true</code>, dither the image. The default is
|
2135
|
+
<code>false</code>.</dd>
|
2136
|
+
</dl>
|
2137
|
+
|
2138
|
+
<h4>Returns</h4>
|
2139
|
+
|
2140
|
+
<p>A new image</p>
|
2141
|
+
|
2142
|
+
<h4>Example</h4>
|
2143
|
+
|
2144
|
+
<p class="rollover"><a href=
|
2145
|
+
"javascript:popup('posterize.rb.html')"><img src=
|
2146
|
+
"ex/posterize.jpg" alt="posterize example" onmouseover=
|
2147
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
2148
|
+
"this.src='ex/posterize.jpg'" title=
|
2149
|
+
"Click to see the example script" /></a> <img src=
|
2150
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
2151
|
+
"Mouse over the example to see the original image" /></p>
|
2152
|
+
|
2153
|
+
<h4>See also</h4><p><a href="#ordered_dither">ordered_dither</a>,
|
2154
|
+
<a href="image3.html#quantize">quantize</a></p>
|
2155
|
+
|
2156
|
+
<h4>Magick API</h4>
|
2157
|
+
|
2158
|
+
<p>PosterizeImage (available in ImageMagick 6.0.0)</p>
|
2159
|
+
</div>
|
2160
|
+
|
2161
|
+
<p class="spacer"> </p>
|
2162
|
+
|
2163
|
+
<div class="nav">
|
2164
|
+
« <a href="image1.html">Prev</a> | <a href=
|
2165
|
+
"index.html">Contents</a> | <a href=
|
2166
|
+
"image3.html">Next</a> »
|
2167
|
+
</div>
|
2168
|
+
</body>
|
2169
|
+
</html>
|