rmagick 1.15.17 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rmagick might be problematic. Click here for more details.
- data/ChangeLog +78 -25
- data/README.html +117 -188
- data/README.txt +116 -181
- data/build_tarball.rake +205 -0
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +118 -44
- data/doc/draw.html +57 -99
- data/doc/ex/adaptive_threshold.rb +1 -10
- data/doc/ex/add_noise.rb +4 -5
- data/doc/ex/axes.rb +1 -1
- data/doc/ex/bilevel_channel.rb +2 -13
- data/doc/ex/bounding_box.rb +3 -4
- data/doc/ex/channel.rb +6 -7
- data/doc/ex/clip_path.rb +11 -5
- data/doc/ex/color_histogram.rb +8 -20
- data/doc/ex/composite_layers.rb +53 -0
- data/doc/ex/fill_pattern.rb +26 -0
- data/doc/ex/get_multiline_type_metrics.rb +26 -37
- data/doc/ex/get_type_metrics.rb +25 -25
- data/doc/ex/images/notimplemented.gif +0 -0
- data/doc/ex/level.rb +1 -1
- data/doc/ex/matte_floodfill.rb +5 -6
- data/doc/ex/matte_replace.rb +5 -6
- data/doc/ex/negate_channel.rb +0 -10
- data/doc/ex/opacity.rb +3 -5
- data/doc/ex/polaroid.rb +4 -1
- data/doc/ex/posterize.rb +1 -12
- data/doc/ex/preview.rb +1 -8
- data/doc/ex/radial_blur.rb +1 -11
- data/doc/ex/raise.rb +1 -4
- data/doc/ex/random_threshold_channel.rb +4 -9
- data/doc/ex/sepiatone.rb +2 -9
- data/doc/ex/shadow.rb +12 -18
- data/doc/ex/sketch.rb +2 -9
- data/doc/ex/smile.rb +7 -7
- data/doc/ex/splice.rb +3 -10
- data/doc/ex/stegano.rb +5 -0
- data/doc/ex/threshold.rb +2 -2
- data/doc/ex/transpose.rb +1 -8
- data/doc/ex/transverse.rb +1 -8
- data/doc/ex/trim.rb +1 -2
- data/doc/ex/viewex.rb +4 -5
- data/doc/ex/vignette.rb +1 -8
- data/doc/ex/watermark.rb +1 -0
- data/doc/ex/wet_floor.rb +8 -14
- data/doc/ilist.html +301 -110
- data/doc/image1.html +362 -258
- data/doc/image2.html +429 -286
- data/doc/image3.html +418 -192
- data/doc/imageattrs.html +100 -39
- data/doc/imusage.html +26 -21
- data/doc/index.html +52 -93
- data/doc/info.html +160 -64
- data/doc/magick.html +37 -71
- data/doc/optequiv.html +155 -61
- data/doc/rvg.html +3 -3
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +3 -3
- data/doc/rvgpattern.html +3 -3
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +4 -4
- data/doc/rvgtut.html +4 -4
- data/doc/rvguse.html +3 -3
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +26 -29
- data/doc/usage.html +99 -48
- data/examples/crop_with_gravity.rb +46 -0
- data/examples/demo.rb +2 -2
- data/examples/histogram.rb +11 -11
- data/examples/identify.rb +45 -45
- data/examples/spinner.rb +3 -2
- data/ext/RMagick/MANIFEST +7 -8
- data/ext/RMagick/extconf.rb +242 -0
- data/ext/RMagick/rmagick.h +136 -222
- data/ext/RMagick/rmdraw.c +226 -229
- data/ext/RMagick/rmfill.c +69 -118
- data/ext/RMagick/rmilist.c +234 -94
- data/ext/RMagick/rmimage.c +1719 -2564
- data/ext/RMagick/rminfo.c +433 -619
- data/ext/RMagick/rmmain.c +249 -487
- data/ext/RMagick/rmutil.c +344 -563
- data/lib/RMagick.rb +414 -358
- data/lib/rvg/clippath.rb +2 -2
- data/lib/rvg/container.rb +2 -2
- data/lib/rvg/describable.rb +2 -2
- data/lib/rvg/embellishable.rb +2 -2
- data/lib/rvg/misc.rb +3 -3
- data/lib/rvg/paint.rb +2 -7
- data/lib/rvg/pathdata.rb +2 -2
- data/lib/rvg/rvg.rb +2 -2
- data/lib/rvg/stretchable.rb +2 -14
- data/lib/rvg/stylable.rb +2 -2
- data/lib/rvg/text.rb +2 -2
- data/lib/rvg/transformable.rb +2 -2
- data/lib/rvg/units.rb +2 -2
- data/{metaconfig.in → metaconfig} +0 -1
- data/post-setup.rb +1 -1
- data/rmagick.gemspec +6 -9
- metadata +41 -49
- data/Makefile.in +0 -42
- data/configure +0 -12358
- data/configure.ac +0 -791
- data/ext/RMagick/extconf.rb.in +0 -25
- data/ext/RMagick/rmagick_config.h.in +0 -285
- data/gem_extconf.rb +0 -42
data/doc/imageattrs.html
CHANGED
@@ -4,9 +4,9 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for Linux/x86 (vers
|
7
|
+
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick
|
9
|
+
<title>RMagick 2.0.0: class Image (attribute methods)</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
|
28
|
+
<h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6>
|
29
29
|
|
30
30
|
<div class="nav">
|
31
31
|
« <a href="ilist.html">Prev</a> | <a href=
|
@@ -45,6 +45,8 @@
|
|
45
45
|
<div>
|
46
46
|
<div class="toccol">
|
47
47
|
<ul>
|
48
|
+
<li><a href="#alpha">alpha</a></li>
|
49
|
+
|
48
50
|
<li><a href="#background_color">background_color</a></li>
|
49
51
|
|
50
52
|
<li><a href="#base_columns">base_columns</a></li>
|
@@ -185,6 +187,50 @@
|
|
185
187
|
|
186
188
|
<h2 class="methods">attribute methods</h2>
|
187
189
|
|
190
|
+
<div class="sig">
|
191
|
+
<h3 id="alpha">alpha</h3>
|
192
|
+
|
193
|
+
<p><span class="arg">image</span>.alpha = <span class=
|
194
|
+
"arg">anAlphaChannelType</span></p>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
<div class="desc">
|
198
|
+
<h4>Description</h4>
|
199
|
+
|
200
|
+
<p>Set a flag to indicate whether or not to use alpha channel
|
201
|
+
data. Set-only.</p>
|
202
|
+
|
203
|
+
<h4>Arguments</h4>
|
204
|
+
|
205
|
+
<p>One of the following values of the AlphaChannelType
|
206
|
+
enumeration:</p>
|
207
|
+
|
208
|
+
<dl>
|
209
|
+
<dt>ActivateAlphaChannel</dt>
|
210
|
+
|
211
|
+
<dd>Use alpha channel data. Equivalent to <code>img.matte =
|
212
|
+
true</code>.</dd>
|
213
|
+
|
214
|
+
<dt>DeactivateAlphaChannel</dt>
|
215
|
+
|
216
|
+
<dd>Do not use alpha channel data. Equivalent to
|
217
|
+
<code>img.matte = false</code>.</dd>
|
218
|
+
|
219
|
+
<dt>ResetAlphaChannel</dt>
|
220
|
+
|
221
|
+
<dd>Set the alpha channel to fully opaque.</dd>
|
222
|
+
|
223
|
+
<dt>SetAlphaChannel</dt>
|
224
|
+
|
225
|
+
<dd>Sets the alpha channel to the intensity of the
|
226
|
+
image.</dd>
|
227
|
+
</dl>
|
228
|
+
|
229
|
+
<h4>See also</h4>
|
230
|
+
|
231
|
+
<p><a href="#matte">matte</a></p>
|
232
|
+
</div>
|
233
|
+
|
188
234
|
<div class="sig">
|
189
235
|
<h3 id="background_color">background_color</h3>
|
190
236
|
|
@@ -468,9 +514,9 @@
|
|
468
514
|
<h3 id="colorspace">colorspace</h3>
|
469
515
|
|
470
516
|
<p><span class="arg">image.</span>colorspace ->
|
471
|
-
<em>
|
517
|
+
<em>aColorspaceType</em><br />
|
472
518
|
<span class="arg">image.</span>colorspace = <span class=
|
473
|
-
"arg">
|
519
|
+
"arg">aColorspaceType</span></p>
|
474
520
|
</div>
|
475
521
|
|
476
522
|
<div class="desc">
|
@@ -485,12 +531,12 @@
|
|
485
531
|
|
486
532
|
<h4>Arguments</h4>
|
487
533
|
|
488
|
-
<p>A <a href="constants.html#ColorspaceType">
|
534
|
+
<p>A <a href="constants.html#ColorspaceType">ColorspaceType</a>
|
489
535
|
constant.</p>
|
490
536
|
|
491
537
|
<h4>Returns</h4>
|
492
538
|
|
493
|
-
<p>A <a href="constants.html#ColorspaceType">
|
539
|
+
<p>A <a href="constants.html#ColorspaceType">ColorspaceType</a>
|
494
540
|
constant.</p>
|
495
541
|
</div>
|
496
542
|
|
@@ -778,11 +824,11 @@
|
|
778
824
|
|
779
825
|
<h4>Arguments</h4>
|
780
826
|
|
781
|
-
<p>A <a href="constants.html#FilterTypes">
|
827
|
+
<p>A <a href="constants.html#FilterTypes">FilterTypes</a>
|
782
828
|
constant.</p>
|
783
829
|
|
784
830
|
<h4>Returns</h4>A <a href=
|
785
|
-
"constants.html#FilterTypes">
|
831
|
+
"constants.html#FilterTypes">FilterTypes</a> constant.
|
786
832
|
</div>
|
787
833
|
|
788
834
|
<div class="sig">
|
@@ -836,9 +882,9 @@
|
|
836
882
|
<p>The argument may be a floating-point numeric value or a
|
837
883
|
string in the form "NN%". In the second case, the argument is
|
838
884
|
computed as a percentage of <a href=
|
839
|
-
"constants.html#Miscellaneous_constants">
|
885
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>. For
|
840
886
|
example, a value of '5%' sets <code>fuzz</code> to
|
841
|
-
0.05*
|
887
|
+
0.05*QuantumRange.</p>
|
842
888
|
|
843
889
|
<h4>Returns</h4>
|
844
890
|
|
@@ -899,7 +945,7 @@
|
|
899
945
|
|
900
946
|
<p>The image type classification. For example, GrayscaleType.
|
901
947
|
Don't confuse this attribute with the <a href=
|
902
|
-
"#format">format</a>, that is "GIF" or "JPG".</p>
|
948
|
+
"#format">format</a>, that is "GIF" or "JPG". Get-only.</p>
|
903
949
|
|
904
950
|
<h4>Returns</h4>
|
905
951
|
|
@@ -1043,6 +1089,9 @@
|
|
1043
1089
|
|
1044
1090
|
<p>If <code>true</code>, honor the opacity values in the image
|
1045
1091
|
pixels. See <a href="struct.html#Pixel">Pixel</a>.</p>
|
1092
|
+
|
1093
|
+
<p>This attribute is deprecated in ImageMagick 6.3.5 and later.
|
1094
|
+
Use <a href="#alpha">alpha</a> instead.</p>
|
1046
1095
|
</div>
|
1047
1096
|
|
1048
1097
|
<div class="sig">
|
@@ -1114,9 +1163,7 @@
|
|
1114
1163
|
<p>If the monitor proc returns <code>nil</code> or
|
1115
1164
|
<code>false</code> the operation will be immediately
|
1116
1165
|
terminated. To stop monitoring, set <code>monitor</code> to
|
1117
|
-
<code>nil</code>.
|
1118
|
-
this attribute supercedes <a href=
|
1119
|
-
"magick.html#set_monitor">Magick.set_monitor</a>. Set-only.</p>
|
1166
|
+
<code>nil</code>. Set-only.</p>
|
1120
1167
|
|
1121
1168
|
<h4>Argument</h4>
|
1122
1169
|
|
@@ -1172,8 +1219,7 @@ blur_image is 100% complete.
|
|
1172
1219
|
<h3 id="montage">montage</h3>
|
1173
1220
|
|
1174
1221
|
<p><span class="arg">image.</span>montage ->
|
1175
|
-
<em>aString</em><br
|
1176
|
-
<span class="arg">image.</span>montage = <code>nil</code></p>
|
1222
|
+
<em>aString</em><br /></p>
|
1177
1223
|
</div>
|
1178
1224
|
|
1179
1225
|
<div class="desc">
|
@@ -1183,12 +1229,8 @@ blur_image is 100% complete.
|
|
1183
1229
|
montage. Only valid for</span> [images produced by <a href=
|
1184
1230
|
"ilist.html#montage">montage</a>.] <span class="imquote">The
|
1185
1231
|
string is in the form of a <a href=
|
1186
|
-
"imusage.html#geometry">geometry</a> string.</span
|
1187
|
-
|
1188
|
-
<h4>Arguments</h4>
|
1189
|
-
|
1190
|
-
<p>To release the montage string, set this attribute to
|
1191
|
-
<code>nil</code>.</p>
|
1232
|
+
"imusage.html#geometry">geometry</a> string.</span>
|
1233
|
+
Get-only.</p>
|
1192
1234
|
</div>
|
1193
1235
|
|
1194
1236
|
<div class="sig">
|
@@ -1275,8 +1317,8 @@ blur_image is 100% complete.
|
|
1275
1317
|
are blended with the supplied transparency value.</span>
|
1276
1318
|
Set-only.</p>
|
1277
1319
|
|
1278
|
-
<h4>Arguments</h4>A number between 0 and
|
1279
|
-
increase transparency.
|
1320
|
+
<h4>Arguments</h4>A number between 0 and QuantumRange. Higher
|
1321
|
+
numbers increase transparency.
|
1280
1322
|
</div>
|
1281
1323
|
|
1282
1324
|
<div class="sig">
|
@@ -1298,8 +1340,6 @@ blur_image is 100% complete.
|
|
1298
1340
|
<p>An <a href=
|
1299
1341
|
"constants.html#OrientationType">OrientationType</a> value.</p>
|
1300
1342
|
|
1301
|
-
<h4>Magick API</h4>Available in ImageMagick 6.0.0.
|
1302
|
-
|
1303
1343
|
<h4>Notes</h4>See <a href=
|
1304
1344
|
"http://jpegclub.org/exif_orientation.html">http://jpegclub.org/exif_orientation.html</a>
|
1305
1345
|
for more information about the Exif Orientation Tag.
|
@@ -1403,7 +1443,7 @@ blur_image is 100% complete.
|
|
1403
1443
|
<h4>Description</h4>
|
1404
1444
|
|
1405
1445
|
<p>The image depth to the nearest Quantum (8, 16, or 32).
|
1406
|
-
Get-only
|
1446
|
+
Get-only.</p>
|
1407
1447
|
</div>
|
1408
1448
|
|
1409
1449
|
<div class="sig">
|
@@ -1482,7 +1522,7 @@ blur_image is 100% complete.
|
|
1482
1522
|
|
1483
1523
|
<p><span class="arg">image.</span>ticks_per_second ->
|
1484
1524
|
<em>aNumeric</em><br />
|
1485
|
-
<span class="arg">
|
1525
|
+
<span class="arg">iamge.</span>ticks_per_second = <span class=
|
1486
1526
|
"arg">aNumeric</span></p>
|
1487
1527
|
</div>
|
1488
1528
|
|
@@ -1497,13 +1537,6 @@ blur_image is 100% complete.
|
|
1497
1537
|
<h4>Returns</h4>
|
1498
1538
|
|
1499
1539
|
<p>The current number of ticks per second</p>
|
1500
|
-
|
1501
|
-
<h4>Notes</h4>
|
1502
|
-
|
1503
|
-
<p>Available in ImageMagick 6.2.4 and later. Prior to this
|
1504
|
-
release the number of ticks per second was fixed at 100. The
|
1505
|
-
GIF image format only accepts 100 ticks per second regardless
|
1506
|
-
of the value of this attribute.</p>
|
1507
1540
|
</div>
|
1508
1541
|
|
1509
1542
|
<div class="sig">
|
@@ -1600,11 +1633,39 @@ blur_image is 100% complete.
|
|
1600
1633
|
|
1601
1634
|
<dd>The area surrounding the image is transparent
|
1602
1635
|
blackness.</dd>
|
1636
|
+
|
1637
|
+
<dt>BlackVirtualPixelMethod</dt>
|
1638
|
+
|
1639
|
+
<dd class="imquote">The area surrounding the image is
|
1640
|
+
black.</dd>
|
1641
|
+
|
1642
|
+
<dt>GrayVirtualPixelMethod</dt>
|
1643
|
+
|
1644
|
+
<dd class="imquote">The area surrounding the image is
|
1645
|
+
gray.</dd>
|
1646
|
+
|
1647
|
+
<dt>WhiteVirtualPixelMethod</dt>
|
1648
|
+
|
1649
|
+
<dd class="imquote">The area surrounding the image is
|
1650
|
+
white.</dd>
|
1651
|
+
|
1652
|
+
<dt>RandomVirtualPixelMethod</dt>
|
1653
|
+
|
1654
|
+
<dd class="imquote">Choose a random pixel from the
|
1655
|
+
image.</dd>
|
1656
|
+
|
1657
|
+
<dt>DitherVirtualPixelMethod</dt>
|
1658
|
+
|
1659
|
+
<dd class="imquote">use a dithered pattern to choose a pixel
|
1660
|
+
in a 32x32 neighborhood.</dd>
|
1603
1661
|
</dl>
|
1604
1662
|
|
1605
|
-
<p
|
1606
|
-
|
1607
|
-
|
1663
|
+
<p>Some of these values are not supported by older versions of
|
1664
|
+
ImageMagick. To see what values are available, enter the
|
1665
|
+
following code in irb:</p>
|
1666
|
+
<pre>
|
1667
|
+
Magick::VirtualPixelMethod.values {|v| puts v}
|
1668
|
+
</pre>
|
1608
1669
|
|
1609
1670
|
<h4>Returns</h4>
|
1610
1671
|
|
data/doc/imusage.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<meta name="generator" content=
|
7
7
|
"HTML Tidy for Linux/x86 (vers 1st December 2004), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick
|
9
|
+
<title>RMagick 2.0.0: ImageMagick Conventions</title>
|
10
10
|
<meta http-equiv="Content-Type" content=
|
11
11
|
"text/html; charset=us-ascii" />
|
12
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -69,7 +69,7 @@
|
|
69
69
|
</head>
|
70
70
|
|
71
71
|
<body>
|
72
|
-
<h6 id="header">RMagick
|
72
|
+
<h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6>
|
73
73
|
|
74
74
|
<div class="nav">
|
75
75
|
« <a href="usage.html">Prev</a> | <a href=
|
@@ -77,7 +77,7 @@
|
|
77
77
|
"optequiv.html">Next</a> »
|
78
78
|
</div>
|
79
79
|
|
80
|
-
<h1>RMagick: ImageMagick
|
80
|
+
<h1>RMagick: ImageMagick Conventions</h1>
|
81
81
|
|
82
82
|
<div id="toc">
|
83
83
|
<h2>Table of Contents</h2>
|
@@ -101,12 +101,12 @@
|
|
101
101
|
|
102
102
|
<h2 id="formats">Image formats and filenames</h2>
|
103
103
|
|
104
|
-
<p
|
104
|
+
<p>ImageMagick supports over 90 major <a href=
|
105
105
|
"http://www.imagemagick.org/script/formats.php">image
|
106
106
|
formats</a>.</p>
|
107
107
|
|
108
|
-
<p
|
109
|
-
|
108
|
+
<p>ImageMagick determines the format (GIF, PNG, JPEG, etc.) of an
|
109
|
+
image file either from its magic number, the filename suffix
|
110
110
|
(.gif, .png, .jpg) or from a prefix attached to the filename. For
|
111
111
|
example, <code>ps:mydoc</code> indicates that <code>mydoc</code>
|
112
112
|
is a Postscript file. <span class="imquote">The magic number
|
@@ -120,7 +120,7 @@
|
|
120
120
|
or a suffix corresponding to the format you want.</p>
|
121
121
|
|
122
122
|
<p><em>Note:</em> Keep in mind that files in some formats may
|
123
|
-
only be read by
|
123
|
+
only be read by ImageMagick, not written.</p>
|
124
124
|
|
125
125
|
<h2 id="frames">Selecting frames from a multi-frame image
|
126
126
|
file</h2>
|
@@ -128,7 +128,7 @@
|
|
128
128
|
<p>When reading a multi-frame image file such as an AVI you can
|
129
129
|
specify the subset of frames by adding a list of frame number(s)
|
130
130
|
to the end of the file name enclosed in square brackets. For
|
131
|
-
example, "my_movie.avi[0]" tells
|
131
|
+
example, "my_movie.avi[0]" tells ImageMagick to read only the
|
132
132
|
first frame. In general,</p>
|
133
133
|
|
134
134
|
<dl>
|
@@ -233,7 +233,7 @@
|
|
233
233
|
<td>cmyk(c,m,y,k)</td>
|
234
234
|
|
235
235
|
<td>CMYK functional notation. c, m, y, and k are either 4
|
236
|
-
integers 0-
|
236
|
+
integers 0-QuantumRange or 4 percentages 0%-100%.</td>
|
237
237
|
</tr>
|
238
238
|
|
239
239
|
<tr class="evenrow">
|
@@ -246,7 +246,7 @@
|
|
246
246
|
<td>rgb(r,g,b)</td>
|
247
247
|
|
248
248
|
<td>SVG functional notation. r, g, and b are either 3
|
249
|
-
integers 0-
|
249
|
+
integers 0-QuantumRange or 3 percentages 0%-100%.</td>
|
250
250
|
</tr>
|
251
251
|
|
252
252
|
<tr class="evenrow">
|
@@ -261,8 +261,7 @@
|
|
261
261
|
<td>Hue, saturation, lightness. The <em>hue</em> value (h)
|
262
262
|
should be a number in the range 0 <= n < 360. The
|
263
263
|
<em>saturation</em> (s) and <em>lightness</em> (l) values
|
264
|
-
should be numbers in the range 0 <= n <= 100
|
265
|
-
<em>(Available in ImageMagick 6.2.6)</em></td>
|
264
|
+
should be numbers in the range 0 <= n <= 100.</td>
|
266
265
|
</tr>
|
267
266
|
|
268
267
|
<tr class="evenrow">
|
@@ -274,7 +273,7 @@
|
|
274
273
|
</table>
|
275
274
|
|
276
275
|
<p>The alpha channel is the opacity of the image, which can range
|
277
|
-
from 0 (Magick::OpaqueOpacity) to
|
276
|
+
from 0 (Magick::OpaqueOpacity) to QuantumRange
|
278
277
|
(Magick::TransparentOpacity).</p>
|
279
278
|
|
280
279
|
<p>A <code>Pixel</code> object contains the numeric
|
@@ -344,7 +343,7 @@
|
|
344
343
|
it is resized to 480x480.</p>
|
345
344
|
</div>
|
346
345
|
|
347
|
-
<p>The x and y offsets, if present, can be
|
346
|
+
<p>The x and y offsets, if present, can be preceeded with either
|
348
347
|
a + or - sign. The + causes x and y to be measured from the left
|
349
348
|
or top edges, respectively. Conversely, - measures from the right
|
350
349
|
or bottom edges. Offsets are always measured in pixels.</p>
|
@@ -359,7 +358,7 @@
|
|
359
358
|
|
360
359
|
<h2 id="classtype">DirectClass and PseudoClass</h2>
|
361
360
|
|
362
|
-
<p
|
361
|
+
<p>ImageMagick classifies all images into two <em>classes</em>,
|
363
362
|
PseudoClass and DirectClass.</p>
|
364
363
|
|
365
364
|
<div class="imquote">
|
@@ -384,10 +383,10 @@
|
|
384
383
|
|
385
384
|
<h2 id="builtin_formats">Built-in image formats</h2>
|
386
385
|
|
387
|
-
<p>Some of the image formats that
|
388
|
-
special-purpose formats that are built-in to
|
389
|
-
|
390
|
-
|
386
|
+
<p>Some of the image formats that ImageMagick supports are
|
387
|
+
special-purpose formats that are built-in to ImageMagick itself.
|
388
|
+
That is, even though you can "read" images in these formats, they
|
389
|
+
do not correspond to any real image files.</p>
|
391
390
|
|
392
391
|
<p>These are the built-in formats that I know something about.
|
393
392
|
(There are more but I've never used them.) When the format is
|
@@ -411,7 +410,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
|
|
411
410
|
string. Ex: "caption:My caption text".</p>
|
412
411
|
|
413
412
|
<p>If you specify only the width in the <code>size</code>
|
414
|
-
argument,
|
413
|
+
argument, ImageMagick will wrap the text and compute the
|
415
414
|
necessary height. In addition to <code>size</code> (which is
|
416
415
|
required) you can use the following <a href=
|
417
416
|
"info.html">optional arguments</a>:</p>
|
@@ -432,6 +431,12 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
|
|
432
431
|
<li>gravity</li>
|
433
432
|
|
434
433
|
<li>pointsize</li>
|
434
|
+
|
435
|
+
<li>stroke</li>
|
436
|
+
|
437
|
+
<li>stroke_width</li>
|
438
|
+
|
439
|
+
<li>undercolor</li>
|
435
440
|
</ul>
|
436
441
|
|
437
442
|
<h4>gradient<sup>*</sup></h4>
|
@@ -451,7 +456,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
|
|
451
456
|
|
452
457
|
<h4>logo</h4>
|
453
458
|
|
454
|
-
<p>The
|
459
|
+
<p>The ImageMagick logo. Ex: <code>"logo:"</code>.</p>
|
455
460
|
|
456
461
|
<h4>netscape</h4>
|
457
462
|
|
data/doc/index.html
CHANGED
@@ -4,10 +4,9 @@
|
|
4
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
5
|
<head>
|
6
6
|
<meta name="generator" content=
|
7
|
-
"HTML Tidy for Linux/x86 (vers
|
7
|
+
"HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
|
8
8
|
|
9
|
-
<title>RMagick
|
10
|
-
Reference</title>
|
9
|
+
<title>RMagick 2.0.0 User's Guide and Reference</title>
|
11
10
|
<meta http-equiv="Content-Type" content=
|
12
11
|
"text/html; charset=us-ascii" />
|
13
12
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -106,8 +105,7 @@
|
|
106
105
|
</div>
|
107
106
|
|
108
107
|
<p id="magick">Ruby+ImageMagick<span class="tm">TM</span><br />
|
109
|
-
|
110
|
-
Version 1.15.17</p>
|
108
|
+
Version 2.0.0</p>
|
111
109
|
|
112
110
|
<h1>User's Guide and Reference</h1>
|
113
111
|
|
@@ -123,7 +121,7 @@
|
|
123
121
|
<ul>
|
124
122
|
<li><a href="usage.html">How to Use RMagick</a></li>
|
125
123
|
|
126
|
-
<li><a href="imusage.html">ImageMagick
|
124
|
+
<li><a href="imusage.html">ImageMagick
|
127
125
|
Conventions</a></li>
|
128
126
|
|
129
127
|
<li><a href="optequiv.html">Magick Command Options and
|
@@ -154,14 +152,14 @@
|
|
154
152
|
<li><a href="imageattrs.html">Image (attribute
|
155
153
|
methods)</a></li>
|
156
154
|
|
157
|
-
<li><a href="image1.html">Image (class and
|
158
|
-
methods
|
155
|
+
<li><a href="image1.html">Image (class methods and
|
156
|
+
instance methods a-d)</a></li>
|
159
157
|
|
160
|
-
<li><a href="image2.html">Image (instance methods
|
161
|
-
|
158
|
+
<li><a href="image2.html">Image (instance methods
|
159
|
+
e-o)</a></li>
|
162
160
|
|
163
|
-
<li><a href="image3.html">Image (instance methods
|
164
|
-
|
161
|
+
<li><a href="image3.html">Image (instance methods
|
162
|
+
p-w)</a></li>
|
165
163
|
|
166
164
|
<li><a href="draw.html">Draw</a></li>
|
167
165
|
</ul>
|
@@ -242,9 +240,8 @@
|
|
242
240
|
<h3>What is RMagick?</h3>
|
243
241
|
|
244
242
|
<p>RMagick is a binding from Ruby to the ImageMagick <span class=
|
245
|
-
"tm">TM</span>
|
246
|
-
|
247
|
-
"http://www.imagemagick.org/index.html">ImageMagick home page</a>
|
243
|
+
"tm">TM</span> image manipulation library. Here's how the
|
244
|
+
<a href="http://www.imagemagick.org">ImageMagick home page</a>
|
248
245
|
describes ImageMagick:</p>
|
249
246
|
|
250
247
|
<div class="imquote">
|
@@ -258,28 +255,8 @@
|
|
258
255
|
added to images and stretched and rotated.</p>
|
259
256
|
</div>
|
260
257
|
|
261
|
-
<p>
|
262
|
-
|
263
|
-
"http://www.graphicsmagick.org">GraphicsMagick web site</a> says
|
264
|
-
this about GraphicsMagick:</p>
|
265
|
-
|
266
|
-
<div class="imquote">
|
267
|
-
<p><em>GraphicsMagick</em> is the Swiss army knife of image
|
268
|
-
processing. It provides a robust collection of tools and
|
269
|
-
libraries which support reading, writing, and manipulating an
|
270
|
-
image in over 88 major formats including important formats like
|
271
|
-
DPX, GIF, JPEG, JPEG-2000, PNG, PDF, SVG, and TIFF.
|
272
|
-
GraphicsMagick supports huge images on systems that support
|
273
|
-
large files, and has been tested with gigapixel-size images.
|
274
|
-
GraphicsMagick can create new images on the fly, making it
|
275
|
-
suitable for building dynamic Web applications. GraphicsMagick
|
276
|
-
may be used to resize, rotate, sharpen, color reduce, or add
|
277
|
-
special effects to an image and save the result in the same or
|
278
|
-
differing image format</p>
|
279
|
-
</div>
|
280
|
-
|
281
|
-
<p>Both libraries offer a full range of image processing tools
|
282
|
-
that provide the capability to:</p>
|
258
|
+
<p>ImageMagick offers a full range of image processing tools that
|
259
|
+
provide the capability to:</p>
|
283
260
|
|
284
261
|
<div class="imquote">
|
285
262
|
<ul>
|
@@ -307,21 +284,21 @@
|
|
307
284
|
</ul>
|
308
285
|
</div>
|
309
286
|
|
310
|
-
<p>RMagick is a complete interface to ImageMagick
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
and
|
287
|
+
<p>RMagick is a complete interface to ImageMagick. Version 1.0.0
|
288
|
+
was released in February, 2003. Within its four major classes and
|
289
|
+
30 minor classes RMagick defines over 600 methods and 225
|
290
|
+
constants. RMagick exploits Ruby idioms such as blocks and
|
291
|
+
iterators, Struct classes, symbols, ?- and !-suffixed methods,
|
292
|
+
and exceptions.</p>
|
316
293
|
|
317
294
|
<h3>About this document</h3>
|
318
295
|
|
319
|
-
<p>This document describes Version
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
296
|
+
<p>This document describes Version 2.0.0 of RMagick. It is
|
297
|
+
divided into 4 parts. The first is this page. The second part is
|
298
|
+
a user's guide covering both RMagick and ImageMagick usage and
|
299
|
+
conventions. The third part is a reference guide to the
|
300
|
+
ImageList, Image, and Draw classes. This guide includes many
|
301
|
+
examples.</p>
|
325
302
|
|
326
303
|
<p>The fourth part covers Ruby Vector Graphics (RVG). RVG is a
|
327
304
|
facade for Draw that provides a high-level API for scalable
|
@@ -359,22 +336,14 @@
|
|
359
336
|
statement to add the constants and methods to the Object
|
360
337
|
namespace.</p>
|
361
338
|
|
362
|
-
<p><b>
|
363
|
-
GraphicsMagick is a fork of ImageMagick and shares most of
|
364
|
-
its APIs. When describing a feature, API, convention, component,
|
365
|
-
or other element that is shared by both, I use the string
|
366
|
-
<b>×Magick</b>. For example, "×Magick supports over
|
367
|
-
89 major image formats" means that both ImageMagick and
|
368
|
-
GraphicsMagick support over 89 formats.</p>
|
369
|
-
|
370
|
-
<p><b>×Magick documentation </b><span class=
|
339
|
+
<p><b>ImageMagick documentation </b><span class=
|
371
340
|
"imquote">Text that looks like this</span> is quoted from the
|
372
|
-
|
341
|
+
ImageMagick documentation.</p>
|
373
342
|
|
374
343
|
<p><b>Example programs and images </b> All of the
|
375
344
|
example images on these pages were created by RMagick. Click the
|
376
|
-
image to see the
|
377
|
-
browser to allow JavaScript and
|
345
|
+
image to see the progam code. (You may need to configure your
|
346
|
+
browser to allow JavaScript and popup windows.) All example
|
378
347
|
images show the result of applying the method. Many example
|
379
348
|
images show the "before" image as well. When the image is
|
380
349
|
accompanied by this symbol <img style="display:inline" src=
|
@@ -389,56 +358,49 @@
|
|
389
358
|
Tracker</a> or the <a href=
|
390
359
|
"http://rubyforge.org/projects/rmagick">Feature Request
|
391
360
|
Tracker</a> on RubyForge, or email me at <code>rmagick at
|
392
|
-
rubyforge
|
361
|
+
rubyforge dot org</code>.</p>
|
393
362
|
|
394
363
|
<h3><a name="bugs" id="bugs">Reporting bugs</a></h3>
|
395
364
|
|
396
365
|
<p>Please report problems with RMagick installation and usage to
|
397
366
|
the <a href="http://rubyforge.org/projects/rmagick/">Bug
|
398
367
|
Tracker</a> at RubyForge, or email me at <code>rmagick at
|
399
|
-
rubyforge
|
368
|
+
rubyforge dot org</code>.</p>
|
400
369
|
|
401
|
-
<p>For quickest results, include the RMagick,
|
370
|
+
<p>For quickest results, include the RMagick, ImageMagick and
|
402
371
|
Ruby version numbers, along with a thorough description of the
|
403
372
|
problem. RMagick will tell you both its version number and
|
404
|
-
|
405
|
-
command
|
406
|
-
Magick::Long_version"</code></p>
|
373
|
+
ImageMagick's version number. Simply bring up irb and run this
|
374
|
+
command:</p>
|
407
375
|
<pre class="example" id="version">
|
408
|
-
|
409
|
-
|
410
|
-
Built
|
376
|
+
$ ruby -rRMagick -e "puts Magick::Long_version"
|
377
|
+
This is RMagick 2.0.0 ($Date: 2007/12/27 14:11:48 $) Copyright (C) 2007 by Timothy P. Hunter
|
378
|
+
Built with ImageMagick 6.3.7 12/20/07 Q16 http://www.imagemagick.org
|
379
|
+
Built for ruby 1.8.6
|
411
380
|
Web page: http://rmagick.rubyforge.org
|
412
381
|
Email: rmagick@rubyforge.org
|
413
382
|
</pre>
|
414
383
|
|
384
|
+
<p>(Using RubyGems? If you haven't added
|
385
|
+
<code>rubygems</code> to your RUBYOPT environment variable you
|
386
|
+
may need to use this command instead: <code>ruby -rubygems -r
|
387
|
+
RMagick -e "puts Magick::Long_version"</code>.)</p>
|
388
|
+
|
415
389
|
<p>It will help a lot if you supply a small Ruby program that
|
416
|
-
reproduces the problem.
|
417
|
-
files
|
390
|
+
reproduces the problem. Don't forget to include any input image
|
391
|
+
files!</p>
|
418
392
|
|
419
|
-
<p>Please remember I can't help with Ruby or
|
393
|
+
<p>Please remember I can't help with Ruby or ImageMagick
|
420
394
|
installation and configuration problems. For help with Ruby, post
|
421
395
|
your questions to <code>comp.lang.ruby</code>. For help with
|
422
|
-
ImageMagick
|
423
|
-
|
424
|
-
|
425
|
-
or <a href=
|
426
|
-
"http://sourceforge.net/projects/graphicsmagick/">http://sourceforge.net/projects/graphicsmagick/</a>.</p>
|
396
|
+
ImageMagick, you can post to the <a href=
|
397
|
+
"http://www.imagemagick.org/discourse-server/">ImageMagick
|
398
|
+
Discourse Server</a>.</p>
|
427
399
|
|
428
400
|
<p>I'm not an image processing guru, either, so I probably won't
|
429
401
|
be able to help with questions about specific image formats and
|
430
|
-
transformations. I will be glad, however, to
|
431
|
-
|
432
|
-
question to the ×Magick developers.</p>
|
433
|
-
|
434
|
-
<h3>Contributions</h3>
|
435
|
-
|
436
|
-
<p>If you have a script or an image using RMagick that you're
|
437
|
-
particularly proud of, let me know. I'd like to collect your
|
438
|
-
contributions, along with other users' contributions, and put
|
439
|
-
them in a <code>contrib</code> directory to distribute with
|
440
|
-
RMagick. I'm particularly interested in getting examples for the
|
441
|
-
RMagick methods that currently have no examples.</p>
|
402
|
+
transformations. I will be glad, however, to intermediate between
|
403
|
+
RMagick users and the ImageMagick developers.</p>
|
442
404
|
|
443
405
|
<h3><a name="copyrights" id="copyrights">Copyright
|
444
406
|
Notices</a></h3>
|
@@ -448,9 +410,6 @@ Email: rmagick@rubyforge.org
|
|
448
410
|
|
449
411
|
<li>ImageMagick © 1999-2007 ImageMagick Studio.</li>
|
450
412
|
|
451
|
-
<li>GraphicsMagick © 2002, 2003, 2004, 2005 GraphicsMagick
|
452
|
-
Group.</li>
|
453
|
-
|
454
413
|
<li>Ruby is copyrighted free software by Yukihiro
|
455
414
|
Matsumoto.</li>
|
456
415
|
</ul>
|