rmagick 2.11.1 → 2.12.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 +7 -0
- data/README.html +7 -7
- data/build_tarball.rake +1 -1
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +2 -2
- data/doc/draw.html +58 -7
- data/doc/ex/crop.rb +3 -3
- data/doc/ilist.html +2 -2
- data/doc/image1.html +70 -6
- data/doc/image2.html +77 -3
- data/doc/image3.html +6 -3
- data/doc/imageattrs.html +2 -2
- data/doc/imusage.html +2 -2
- data/doc/index.html +3 -3
- data/doc/info.html +2 -2
- data/doc/magick.html +2 -2
- data/doc/optequiv.html +47 -6
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +2 -2
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +2 -2
- data/doc/usage.html +24 -9
- data/ext/RMagick/MANIFEST +1 -1
- data/ext/RMagick/extconf.rb +9 -1
- data/ext/RMagick/rmagick.h +6 -1
- data/ext/RMagick/rmdraw.c +25 -1
- data/ext/RMagick/rmilist.c +8 -2
- data/ext/RMagick/rmimage.c +129 -3
- data/ext/RMagick/rmmain.c +20 -2
- data/ext/RMagick/rmutil.c +1 -11
- data/lib/RMagick.rb +25 -11
- data/rmagick.gemspec +3 -3
- metadata +4 -4
data/ChangeLog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
RMagick 2.12.0
|
2
|
+
o Added Image#function_channel (available in ImageMagick 6.4.8-8)
|
3
|
+
o Added Image#auto_level_channel, Image#auto_gamma_channel (available in
|
4
|
+
ImageMagick 6.5.5-1)
|
5
|
+
o Added Draw#interline_spacing, #interline_spacing= (available in
|
6
|
+
ImageMagick 6.5.5-8)
|
7
|
+
|
1
8
|
RMagick 2.11.1
|
2
9
|
o Applied Alexey Borzenkov's mingw patches to extconf.rb.
|
3
10
|
o Fixed a bug in Magick.trace_proc that could cause a segv at program exit
|
data/README.html
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title>RMagick 2.
|
4
|
+
<title>RMagick 2.12.0 README</title>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
6
6
|
<meta name="GENERATOR" content="RedCloth">
|
7
7
|
</head>
|
8
8
|
<body>
|
9
|
-
<h1>RMagick 2.
|
10
|
-
<h2>
|
9
|
+
<h1>RMagick 2.12.0 <span class="caps">README</span></h1>
|
10
|
+
<h2>10/04/09</h2>
|
11
11
|
<h3>Table of Contents</h3>
|
12
12
|
<ul>
|
13
13
|
<li><a href="#intro">Introduction</a></li>
|
@@ -47,11 +47,11 @@ his “web site”:<http://i.loveruby.net.</p>
|
|
47
47
|
this. If you have not decompressed the tarball, do so with one of these commands,<br />
|
48
48
|
depending on which tarball you have:</p>
|
49
49
|
<pre>
|
50
|
-
tar xvzf RMagick-2.
|
51
|
-
tar xvjf RMagick-2.
|
50
|
+
tar xvzf RMagick-2.12.0-tar.gz (gzipped tarball)
|
51
|
+
tar xvjf RMagick-2.12.0-tar.bz2 (bzipped tarball)
|
52
52
|
7z e RMagick-x.y.z.tar.lzma -so | tar xv (7zipped tarball)
|
53
53
|
</pre>
|
54
|
-
<p>Change to the RMagick-2.
|
54
|
+
<p>Change to the RMagick-2.12.0 directory. If you are not using any<br />
|
55
55
|
configuration options (usually you don’t need to) enter the command</p>
|
56
56
|
<pre>
|
57
57
|
ruby setup.rb
|
@@ -115,7 +115,7 @@ systems, see the documentation for the dynamic loading facility.</p>
|
|
115
115
|
<h4>No such file or directory – “/tmp/rmagick6872.6”</h4>
|
116
116
|
<p>When setup.rb is running the examples, if you get a message like this:</p>
|
117
117
|
<pre>
|
118
|
-
hook /home/me/src/RMagick-2.
|
118
|
+
hook /home/me/src/RMagick-2.12.0/./post-setup.rb failed:
|
119
119
|
No such file or directory - "/tmp/rmagick6872.6"
|
120
120
|
</pre>
|
121
121
|
<p>you probably do not have a temporary directory environment variable set. Set<br />
|
data/build_tarball.rake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
# Build the tar.gz, tar.bz2, and .gem files for an RMagick Release
|
3
|
-
|
3
|
+
# Expects the CVS tag for release RMagick x.y.z to be in the form RMagick_x-y-z.
|
4
4
|
# To use: cd to $HOME
|
5
5
|
# run: rake -f path/to/build_tarball.rake clean
|
6
6
|
# rake -f path/to/build_tarball.rake release=tag beta=whatever
|
data/doc/comtasks.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="generator" content=
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.0: Common Tasks</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -31,7 +31,7 @@
|
|
31
31
|
</head>
|
32
32
|
|
33
33
|
<body>
|
34
|
-
<h6 id="header">RMagick 2.
|
34
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
35
35
|
|
36
36
|
<div class="nav">
|
37
37
|
« <a href="optequiv.html">Prev</a> | <a href=
|
data/doc/constants.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="generator" content=
|
7
7
|
"HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.0: Constants</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -61,7 +61,7 @@
|
|
61
61
|
</head>
|
62
62
|
|
63
63
|
<body>
|
64
|
-
<h6 id="header">RMagick 2.
|
64
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
65
65
|
|
66
66
|
<div class="nav">
|
67
67
|
« <a href="info.html">Prev</a> | <a href=
|
data/doc/draw.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 7 December 2008), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.0: class Draw</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -25,7 +25,7 @@
|
|
25
25
|
</head>
|
26
26
|
|
27
27
|
<body>
|
28
|
-
<h6 id="header">RMagick 2.
|
28
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
29
29
|
|
30
30
|
<div class="nav">
|
31
31
|
« <a href="image3.html">Prev</a> | <a href=
|
@@ -112,19 +112,21 @@
|
|
112
112
|
<li><a href="#font">font</a></li>
|
113
113
|
|
114
114
|
<li><a href="#font_family">font_family</a></li>
|
115
|
+
|
116
|
+
<li><a href="#font_stretch">font_stretch</a></li>
|
115
117
|
</ul>
|
116
118
|
</div>
|
117
119
|
|
118
120
|
<div class="toccol">
|
119
121
|
<ul>
|
120
|
-
<li><a href="#font_stretch">font_stretch</a></li>
|
121
|
-
|
122
122
|
<li><a href="#font_style">font_style</a></li>
|
123
123
|
|
124
124
|
<li><a href="#font_weight">font_weight</a></li>
|
125
125
|
|
126
126
|
<li><a href="#gravity">gravity</a></li>
|
127
127
|
|
128
|
+
<li><a href="#interline_spacing">interline_spacing</a></li>
|
129
|
+
|
128
130
|
<li><a href="#interword_spacing">interword_spacing</a></li>
|
129
131
|
|
130
132
|
<li><a href="#kerning">kerning</a></li>
|
@@ -216,13 +218,13 @@
|
|
216
218
|
<li><a href="#fill_eq">fill</a></li>
|
217
219
|
|
218
220
|
<li><a href="#fill_pattern_eq">fill_pattern</a></li>
|
221
|
+
|
222
|
+
<li><a href="#font_eq">font</a></li>
|
219
223
|
</ul>
|
220
224
|
</div>
|
221
225
|
|
222
226
|
<div class="toccol">
|
223
227
|
<ul>
|
224
|
-
<li><a href="#font_eq">font</a></li>
|
225
|
-
|
226
228
|
<li><a href="#font_family_eq">font_family</a></li>
|
227
229
|
|
228
230
|
<li><a href="#font_stretch_eq">font_stretch</a></li>
|
@@ -233,6 +235,9 @@
|
|
233
235
|
|
234
236
|
<li><a href="#gravity_eq">gravity</a></li>
|
235
237
|
|
238
|
+
<li><a href=
|
239
|
+
"#interline_spacing_eq">interline_spacing</a></li>
|
240
|
+
|
236
241
|
<li><a href=
|
237
242
|
"#interword_spacing_eq">interword_spacing</a></li>
|
238
243
|
|
@@ -392,6 +397,7 @@ title.annotate(montage, 0,0,0,40, 'Named Colors') {
|
|
392
397
|
|
393
398
|
<tr>
|
394
399
|
<th>Replaced by</th>
|
400
|
+
|
395
401
|
<th> </th>
|
396
402
|
</tr>
|
397
403
|
|
@@ -1637,6 +1643,30 @@ draw.decorate(LineThroughDecoration)
|
|
1637
1643
|
<p><a href="#text_align">text_align</a></p>
|
1638
1644
|
</div>
|
1639
1645
|
|
1646
|
+
<div class="sig">
|
1647
|
+
<h3 id="interline_spacing">interline_spacing</h3>
|
1648
|
+
|
1649
|
+
<p><span class="arg">draw</span>.interline_spacing(<span class=
|
1650
|
+
"arg">space</span>) -> <em>self</em></p>
|
1651
|
+
</div>
|
1652
|
+
|
1653
|
+
<div class="desc">
|
1654
|
+
<h4>Description</h4>
|
1655
|
+
|
1656
|
+
<p>Modify the spacing between lines when text has multiple
|
1657
|
+
lines.</p>
|
1658
|
+
|
1659
|
+
<h4>Argument</h4>
|
1660
|
+
|
1661
|
+
<p>A numeric value. If positive, inserts additional space
|
1662
|
+
between lines. If negative, removes space between lines. The
|
1663
|
+
amount of space inserted or removed depends on the font.</p>
|
1664
|
+
|
1665
|
+
<h4>Returns</h4>
|
1666
|
+
|
1667
|
+
<p>self</p>
|
1668
|
+
</div>
|
1669
|
+
|
1640
1670
|
<div class="sig">
|
1641
1671
|
<h3 id="interword_spacing">interword_spacing</h3>
|
1642
1672
|
|
@@ -3042,6 +3072,27 @@ gc.text(10,10, %q/{"What's up?"}/) » "What's up?"
|
|
3042
3072
|
constant.</p>
|
3043
3073
|
</div>
|
3044
3074
|
|
3075
|
+
<div class="sig">
|
3076
|
+
<h3 id="interline_spacing_eq">interline_spacing=</h3>
|
3077
|
+
|
3078
|
+
<p><span class="arg">draw</span>.interline_spacing =
|
3079
|
+
<em>space</em></p>
|
3080
|
+
</div>
|
3081
|
+
|
3082
|
+
<div class="desc">
|
3083
|
+
<h4>Description</h4>
|
3084
|
+
|
3085
|
+
<p>Modifies the space between lines.</p>
|
3086
|
+
|
3087
|
+
<h4>Arguments</h4>
|
3088
|
+
|
3089
|
+
<p>A numeric value. May be positive or negative.</p>
|
3090
|
+
|
3091
|
+
<h4>Notes</h4>
|
3092
|
+
|
3093
|
+
<p>Available in ImageMagick 6.5.5-8.</p>
|
3094
|
+
</div>
|
3095
|
+
|
3045
3096
|
<div class="sig">
|
3046
3097
|
<h3 id="interword_spacing_eq">interword_spacing=</h3>
|
3047
3098
|
|
data/doc/ex/crop.rb
CHANGED
@@ -17,15 +17,15 @@ rect.fill_opacity(0.25)
|
|
17
17
|
rect.rectangle(23, 81, 107+23, 139+81)
|
18
18
|
rect.draw(img)
|
19
19
|
|
20
|
-
img.write('crop_before.
|
20
|
+
img.write('crop_before.png')
|
21
21
|
|
22
22
|
# Create a image to use as a background for
|
23
23
|
# the "after" image.
|
24
|
-
bg = Magick::Image.new(img.columns, img.rows)
|
24
|
+
bg = Magick::Image.new(img.columns, img.rows) {self.background_color="none"}
|
25
25
|
|
26
26
|
# Composite the the "after" (chopped) image on the background
|
27
27
|
bg = bg.composite(chopped, 23, 81, Magick::OverCompositeOp)
|
28
28
|
|
29
|
-
bg.write('crop_after.
|
29
|
+
bg.write('crop_after.png')
|
30
30
|
|
31
31
|
exit
|
data/doc/ilist.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="generator" content=
|
7
7
|
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.0: class ImageList</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -20,7 +20,7 @@
|
|
20
20
|
</head>
|
21
21
|
|
22
22
|
<body>
|
23
|
-
<h6 id="header">RMagick 2.
|
23
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
24
24
|
|
25
25
|
<div class="nav">
|
26
26
|
« <a href="magick.html">Prev</a> | <a href=
|
data/doc/image1.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="generator" content=
|
7
7
|
"HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.0: class Image (class methods and instance
|
10
10
|
methods a-d)</title>
|
11
11
|
<meta http-equiv="Content-Type" content=
|
12
12
|
"text/html; charset=us-ascii" />
|
@@ -48,7 +48,7 @@
|
|
48
48
|
</head>
|
49
49
|
|
50
50
|
<body>
|
51
|
-
<h6 id="header">RMagick 2.
|
51
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
52
52
|
|
53
53
|
<div class="nav">
|
54
54
|
« <a href="imageattrs.html">Prev</a> | <a href=
|
@@ -138,6 +138,12 @@
|
|
138
138
|
|
139
139
|
<li><a href="#annotate">annotate</a></li>
|
140
140
|
|
141
|
+
<li><a href=
|
142
|
+
"#auto_gamma_channel">auto_gamma_channel</a></li>
|
143
|
+
|
144
|
+
<li><a href=
|
145
|
+
"#auto_level_channel">auto_level_channel</a></li>
|
146
|
+
|
141
147
|
<li><a href="#auto_orient">auto_orient</a></li>
|
142
148
|
|
143
149
|
<li><a href="#auto_orient_bang">auto_orient!</a></li>
|
@@ -153,13 +159,13 @@
|
|
153
159
|
<li><a href="#blur_channel">blur_channel</a></li>
|
154
160
|
|
155
161
|
<li><a href="#blur_image">blur_image</a></li>
|
156
|
-
|
157
|
-
<li><a href="#border">border</a></li>
|
158
162
|
</ul>
|
159
163
|
</div>
|
160
164
|
|
161
165
|
<div class="toccol">
|
162
166
|
<ul>
|
167
|
+
<li><a href="#border">border</a></li>
|
168
|
+
|
163
169
|
<li><a href="#border_bang">border!</a></li>
|
164
170
|
|
165
171
|
<li><a href="#bounding_box">bounding_box</a></li>
|
@@ -1606,6 +1612,64 @@ img = Image.read_inline(content)
|
|
1606
1612
|
<p>self</p>
|
1607
1613
|
</div>
|
1608
1614
|
|
1615
|
+
<div class="sig">
|
1616
|
+
<h3 id="auto_gamma_channel">auto_gamma_channel</h3>
|
1617
|
+
|
1618
|
+
<p><span class=
|
1619
|
+
"arg">img</span>.auto_gamma_channel([<span class="arg">channel</span>...])
|
1620
|
+
-> <em>image</em></p>
|
1621
|
+
</div>
|
1622
|
+
|
1623
|
+
<div class="desc">
|
1624
|
+
<h4>Description</h4>
|
1625
|
+
|
1626
|
+
<p>"Automagically" adjust the gamma level of an image.</p>
|
1627
|
+
|
1628
|
+
<h4>Arguments</h4>
|
1629
|
+
|
1630
|
+
<dl>
|
1631
|
+
<dt>channel...</dt>
|
1632
|
+
|
1633
|
+
<dd>0 or more <a href=
|
1634
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1635
|
+
channels are specified, automagically adjusts the gamma level
|
1636
|
+
of all the channels.</dd>
|
1637
|
+
</dl>
|
1638
|
+
|
1639
|
+
<h4>Returns</h4>
|
1640
|
+
|
1641
|
+
<p>A new image</p>
|
1642
|
+
</div>
|
1643
|
+
|
1644
|
+
<div class="sig">
|
1645
|
+
<h3 id="auto_level_channel">auto_level_channel</h3>
|
1646
|
+
|
1647
|
+
<p><span class=
|
1648
|
+
"arg">img</span>.auto_level_channel([<span class="arg">channel</span>...])
|
1649
|
+
-> <em>image</em></p>
|
1650
|
+
</div>
|
1651
|
+
|
1652
|
+
<div class="desc">
|
1653
|
+
<h4>Description</h4>
|
1654
|
+
|
1655
|
+
<p>"Automagically" adjust the color levels of an image.</p>
|
1656
|
+
|
1657
|
+
<h4>Arguments</h4>
|
1658
|
+
|
1659
|
+
<dl>
|
1660
|
+
<dt>channel...</dt>
|
1661
|
+
|
1662
|
+
<dd>0 or more <a href=
|
1663
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1664
|
+
channels are specified, automagically adjusts the color level
|
1665
|
+
of all the channels.</dd>
|
1666
|
+
</dl>
|
1667
|
+
|
1668
|
+
<h4>Returns</h4>
|
1669
|
+
|
1670
|
+
<p>A new image</p>
|
1671
|
+
</div>
|
1672
|
+
|
1609
1673
|
<div class="sig">
|
1610
1674
|
<h3 id="auto_orient">auto_orient</h3>
|
1611
1675
|
|
@@ -3771,8 +3835,8 @@ cropped = img.crop(x, y, width, height, true)
|
|
3771
3835
|
|
3772
3836
|
<p class="rollover"><a href=
|
3773
3837
|
"javascript:popup('crop.rb.html')"><img onmouseover=
|
3774
|
-
"this.src='ex/crop_before.
|
3775
|
-
"this.src='ex/crop_after.
|
3838
|
+
"this.src='ex/crop_before.png'" onmouseout=
|
3839
|
+
"this.src='ex/crop_after.png'" src="ex/crop_after.png" alt=
|
3776
3840
|
"crop example" title=
|
3777
3841
|
"Click the image to see the example script" /></a><img src=
|
3778
3842
|
"ex/images/spin.gif" alt="" class="spin" title=
|
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 7 December 2008), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick 2.
|
9
|
+
<title>RMagick 2.12.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 @@
|
|
47
47
|
</head>
|
48
48
|
|
49
49
|
<body>
|
50
|
-
<h6 id="header">RMagick 2.
|
50
|
+
<h6 id="header">RMagick 2.12.0 User's Guide and Reference</h6>
|
51
51
|
|
52
52
|
<div class="nav">
|
53
53
|
« <a href="image1.html">Prev</a> | <a href=
|
@@ -113,6 +113,8 @@
|
|
113
113
|
<li><a href="#frame">frame</a></li>
|
114
114
|
|
115
115
|
<li><a href="#freeze">freeze</a></li>
|
116
|
+
|
117
|
+
<li><a href="#function_channel">function_channel</a></li>
|
116
118
|
</ul>
|
117
119
|
</div>
|
118
120
|
|
@@ -1072,6 +1074,78 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
|
1072
1074
|
<p>self</p>
|
1073
1075
|
</div>
|
1074
1076
|
|
1077
|
+
<div class="sig">
|
1078
|
+
<h3 id="function_channel">function_channel</h3>
|
1079
|
+
|
1080
|
+
<p><span class="arg">img</span>.function_channel(<span class=
|
1081
|
+
"arg">function</span> [, <span class=
|
1082
|
+
"arg">parameters</span>...][, <span class=
|
1083
|
+
"arg">channel</span>...]) -< <em>image</em></p>
|
1084
|
+
</div>
|
1085
|
+
|
1086
|
+
<div class="desc">
|
1087
|
+
<h4>Description</h4>
|
1088
|
+
|
1089
|
+
<p><span class="imquote">Apply a function to channel
|
1090
|
+
values.</span> This method is equivalent to the <a href=
|
1091
|
+
"http://www.imagemagick.org/script/command-line-options.php#function">
|
1092
|
+
convert -function</a> option. See the ImageMagick documentation
|
1093
|
+
for more information.</p>
|
1094
|
+
|
1095
|
+
<h4>Arguments</h4>
|
1096
|
+
|
1097
|
+
<dl>
|
1098
|
+
<dt>function</dt>
|
1099
|
+
|
1100
|
+
<dd>
|
1101
|
+
One of the following values.
|
1102
|
+
|
1103
|
+
<ul>
|
1104
|
+
<li><code>PolynomialFunction</code></li>
|
1105
|
+
|
1106
|
+
<li><code>SinusoidFunction</code></li>
|
1107
|
+
|
1108
|
+
<li><code>ArcsinFunction</code></li>
|
1109
|
+
|
1110
|
+
<li><code>ArctanFunction</code></li>
|
1111
|
+
</ul>Some of these values are not available in earlier
|
1112
|
+
versions of ImageMagick. To find out which values are
|
1113
|
+
available, enter the following statement in irb:
|
1114
|
+
<pre>
|
1115
|
+
Magick::MagickFunction.values {|value| p value}
|
1116
|
+
</pre>
|
1117
|
+
</dd>
|
1118
|
+
|
1119
|
+
<dt>parameters</dt>
|
1120
|
+
|
1121
|
+
<dd>One or more floating-point numbers. The number of
|
1122
|
+
parameters depends on the function. See the ImageMagick
|
1123
|
+
documentation for details.</dd>
|
1124
|
+
|
1125
|
+
<dt>channel...</dt>
|
1126
|
+
|
1127
|
+
<dd>0 or more <a href=
|
1128
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1129
|
+
channels are specified, the red, green, and blue channels are
|
1130
|
+
used.</dd>
|
1131
|
+
</dl>
|
1132
|
+
|
1133
|
+
<h4>Returns</h4>
|
1134
|
+
|
1135
|
+
<p>A new image</p>
|
1136
|
+
|
1137
|
+
<h4>Example</h4>
|
1138
|
+
<pre>
|
1139
|
+
img2 = img.function_channel(Magick::PolynomialFunction,
|
1140
|
+
-25, 53, -36, 8.3, 0.2)
|
1141
|
+
</pre>
|
1142
|
+
|
1143
|
+
<h4>See also</h4>
|
1144
|
+
|
1145
|
+
<p><a href=
|
1146
|
+
"image3.html#quantum_operator">quantum_operator</a></p>
|
1147
|
+
</div>
|
1148
|
+
|
1075
1149
|
<div class="sig">
|
1076
1150
|
<h3 id="gamma_channel">gamma_channel</h3>
|
1077
1151
|
|