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/image1.html
CHANGED
@@ -4,10 +4,10 @@
|
|
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
|
-
|
9
|
+
<title>RMagick 2.0.0: class Image (class methods and instance
|
10
|
+
methods a-d)</title>
|
11
11
|
<meta http-equiv="Content-Type" content=
|
12
12
|
"text/html; charset=us-ascii" />
|
13
13
|
<meta name="GENERATOR" content="Quanta Plus" />
|
@@ -48,7 +48,7 @@ float: left;
|
|
48
48
|
</head>
|
49
49
|
|
50
50
|
<body>
|
51
|
-
<h6 id="header">RMagick
|
51
|
+
<h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6>
|
52
52
|
|
53
53
|
<div class="nav">
|
54
54
|
« <a href="imageattrs.html">Prev</a> | <a href=
|
@@ -57,7 +57,7 @@ float: left;
|
|
57
57
|
</div>
|
58
58
|
|
59
59
|
<h1>class Image <span class="superclass">< Object</span>
|
60
|
-
(class and instance methods
|
60
|
+
(class methods and instance methods a-d)<br />
|
61
61
|
<span class="mixin">mixes in Comparable</span></h1>
|
62
62
|
|
63
63
|
<div id="toc">
|
@@ -65,21 +65,35 @@ float: left;
|
|
65
65
|
|
66
66
|
<h3>class methods</h3>
|
67
67
|
|
68
|
-
<
|
69
|
-
<
|
68
|
+
<div>
|
69
|
+
<div class="toccol">
|
70
|
+
<ul>
|
71
|
+
<li><a href="#capture">capture</a></li>
|
70
72
|
|
71
|
-
|
73
|
+
<li><a href="#combine">combine</a></li>
|
72
74
|
|
73
|
-
|
75
|
+
<li><a href="#constitute">constitute</a></li>
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div class="toccol">
|
80
|
+
<ul>
|
81
|
+
<li><a href="#from_blob">from_blob</a></li>
|
74
82
|
|
75
|
-
|
83
|
+
<li><a href="#new">new</a></li>
|
76
84
|
|
77
|
-
|
85
|
+
<li><a href="#ping">ping</a></li>
|
86
|
+
</ul>
|
87
|
+
</div>
|
78
88
|
|
79
|
-
<
|
89
|
+
<div class="toccol">
|
90
|
+
<ul>
|
91
|
+
<li><a href="#read">read</a></li>
|
80
92
|
|
81
|
-
|
82
|
-
|
93
|
+
<li><a href="#read_inline">read_inline</a></li>
|
94
|
+
</ul>
|
95
|
+
</div>
|
96
|
+
</div>
|
83
97
|
|
84
98
|
<h3>instance methods</h3>
|
85
99
|
|
@@ -133,13 +147,13 @@ float: left;
|
|
133
147
|
<li><a href="#blur_image">blur_image</a></li>
|
134
148
|
|
135
149
|
<li><a href="#border">border</a></li>
|
150
|
+
|
151
|
+
<li><a href="#border_bang">border!</a></li>
|
136
152
|
</ul>
|
137
153
|
</div>
|
138
154
|
|
139
155
|
<div class="toccol">
|
140
156
|
<ul>
|
141
|
-
<li><a href="#border_bang">border!</a></li>
|
142
|
-
|
143
157
|
<li><a href="#change_geometry">change_geometry</a></li>
|
144
158
|
|
145
159
|
<li><a href="#changed_q">changed?</a></li>
|
@@ -154,10 +168,14 @@ float: left;
|
|
154
168
|
|
155
169
|
<li><a href="#charcoal">charcoal</a></li>
|
156
170
|
|
171
|
+
<li><a href="#check_destroyed">check_destroyed</a></li>
|
172
|
+
|
157
173
|
<li><a href="#chop">chop</a></li>
|
158
174
|
|
159
175
|
<li><a href="#clone">clone</a></li>
|
160
176
|
|
177
|
+
<li><a href="#clut_channel">clut_channel</a></li>
|
178
|
+
|
161
179
|
<li><a href=
|
162
180
|
"#color_fill_to_border">color_fill_to_border</a></li>
|
163
181
|
|
@@ -213,6 +231,10 @@ float: left;
|
|
213
231
|
|
214
232
|
<li><a href="#despeckle">despeckle</a></li>
|
215
233
|
|
234
|
+
<li><a href="#destroy_bang">destroy!</a></li>
|
235
|
+
|
236
|
+
<li><a href="#destroyed_q">destroyed?</a></li>
|
237
|
+
|
216
238
|
<li><a href="#difference">difference</a></li>
|
217
239
|
|
218
240
|
<li><a href="#dispatch">dispatch</a></li>
|
@@ -223,19 +245,12 @@ float: left;
|
|
223
245
|
|
224
246
|
<li><a href="#dissolve">dissolve</a></li>
|
225
247
|
|
248
|
+
<li><a href="#distort">distort</a></li>
|
249
|
+
|
226
250
|
<li><a href=
|
227
251
|
"#distortion_channel">distortion_channel</a></li>
|
228
252
|
|
229
253
|
<li><a href="#dup">dup</a></li>
|
230
|
-
|
231
|
-
<li><a href=
|
232
|
-
"#each_iptc_dataset">each_iptc_dataset</a></li>
|
233
|
-
|
234
|
-
<li><a href="#each_profile">each_profile</a></li>
|
235
|
-
|
236
|
-
<li><a href="#edge">edge</a></li>
|
237
|
-
|
238
|
-
<li><a href="#emboss">emboss</a></li>
|
239
254
|
</ul>
|
240
255
|
</div>
|
241
256
|
</div>
|
@@ -328,6 +343,52 @@ img = Magick::Image.capture {
|
|
328
343
|
</pre>
|
329
344
|
</div>
|
330
345
|
|
346
|
+
<div class="sig">
|
347
|
+
<h3 id="combine">combine</h3>
|
348
|
+
|
349
|
+
<p>Image.combine(<span class="arg">red_ch</span>=nil[,
|
350
|
+
<span class="arg">green_ch</span>=nil[, <span class=
|
351
|
+
"arg">blue_ch</span>=nil[<span class="arg">,
|
352
|
+
opacity_ch</span>=nil]]]) -><em>anImage</em></p>
|
353
|
+
</div>
|
354
|
+
|
355
|
+
<div class="desc">
|
356
|
+
<h4>Description</h4>
|
357
|
+
|
358
|
+
<p>Combines the grayscale value of the pixels in each image to
|
359
|
+
form a new image.</p>
|
360
|
+
|
361
|
+
<h4>Arguments</h4>
|
362
|
+
|
363
|
+
<p>The red channel of the image specified in the first argument
|
364
|
+
is used as the red channel in the new image. The green channel
|
365
|
+
of the image specified in the second argument is used as the
|
366
|
+
green channel in the new image. The blue channel of the image
|
367
|
+
specified in the third argument is used as the blue channel in
|
368
|
+
the new image. The opacity channel of the image specified in
|
369
|
+
the fourth argument is used as the opacity channel in the new
|
370
|
+
image.</p>
|
371
|
+
|
372
|
+
<p>Any of the arguments may be nil. Trailing nil arguments may
|
373
|
+
be omitted. You must specify at least one image argument.</p>
|
374
|
+
|
375
|
+
<h4>Returns</h4>
|
376
|
+
|
377
|
+
<p>A new image</p>
|
378
|
+
|
379
|
+
<h4>See also</h4>
|
380
|
+
|
381
|
+
<p>The same results can be obtained using the <a href=
|
382
|
+
"#composite">composite</a> method and the
|
383
|
+
CopyRed/Green/Blue/OpacityCompositeOp <a href=
|
384
|
+
"constants.html#CompositeOperator">CompositeOperator</a> enum
|
385
|
+
values.</p>
|
386
|
+
|
387
|
+
<h4>Magick API</h4>
|
388
|
+
|
389
|
+
<p>CombineImages</p>
|
390
|
+
</div>
|
391
|
+
|
331
392
|
<div class="sig">
|
332
393
|
<h3 id="constitute">constitute</h3>
|
333
394
|
|
@@ -368,7 +429,7 @@ img = Magick::Image.capture {
|
|
368
429
|
The elements in the array must be either all
|
369
430
|
<code>Integers</code> or all <code>Floats</code>. If the
|
370
431
|
elements are <code>Integers</code>, the <code>Integers</code>
|
371
|
-
must be in the range [0..
|
432
|
+
must be in the range [0..QuantumRange]. If the elements are
|
372
433
|
<code>Floats</code>, they must be in the range [0..1].</dd>
|
373
434
|
</dl>
|
374
435
|
|
@@ -547,7 +608,13 @@ p cheetah[0].columns » 1024
|
|
547
608
|
<div class="desc">
|
548
609
|
<h4>Description</h4>
|
549
610
|
|
550
|
-
<p>
|
611
|
+
<p>Reads all the images from the specified file.</p>
|
612
|
+
|
613
|
+
<p><span style="font-style:italic">Note:</span> Because an
|
614
|
+
image file can contain multiple images or multiple image
|
615
|
+
layers, <code>read</code> always returns an array containing 0
|
616
|
+
or more elements, one element for each image or image layer in
|
617
|
+
the file.</p>
|
551
618
|
|
552
619
|
<h4>Arguments</h4>
|
553
620
|
|
@@ -574,6 +641,12 @@ animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
|
|
574
641
|
|
575
642
|
<p><a href="#ping"><code>ping</code></a></p>
|
576
643
|
|
644
|
+
<h4>Note</h4>
|
645
|
+
|
646
|
+
<p>The read method does not accept a StringIO object. If you
|
647
|
+
want to create an image from a string buffer, use <a href=
|
648
|
+
"image1.html#from_blob">from_blob</a>.</p>
|
649
|
+
|
577
650
|
<h4>Magick API</h4>
|
578
651
|
|
579
652
|
<p>ReadImage</p>
|
@@ -599,7 +672,7 @@ animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
|
|
599
672
|
required. If the image format cannot be deduced from the image
|
600
673
|
data, you can use the <a href="info.html#format">format</a>
|
601
674
|
attribute. If you want to extract a subset of an image
|
602
|
-
sequence,
|
675
|
+
sequence, see <a href="imusage.html#frames">here</a>.</p>
|
603
676
|
|
604
677
|
<h4>Returns</h4>
|
605
678
|
|
@@ -634,7 +707,7 @@ img = Magick::Image.read_inline(content)
|
|
634
707
|
<p>Returns the value of the image property identified by
|
635
708
|
<span class="arg">key</span>. An image may have any number of
|
636
709
|
properties. Each property is identified by a string (or symbol)
|
637
|
-
key. The property value is a string.
|
710
|
+
key. The property value is a string. ImageMagick predefines
|
638
711
|
some properties, including <code>Label</code>,
|
639
712
|
<code>Comment</code>, <code>Signature</code>, and in some cases
|
640
713
|
<code>EXIF</code>.</p>
|
@@ -662,7 +735,7 @@ img = Magick::Image.read_inline(content)
|
|
662
735
|
|
663
736
|
<h4>Note</h4>
|
664
737
|
|
665
|
-
<p
|
738
|
+
<p>ImageMagick calls properties "attributes." I use the word
|
666
739
|
"properties" to reduce the confusion with image object
|
667
740
|
attributes such as <code>rows</code> and
|
668
741
|
<code>columns</code>.</p>
|
@@ -753,7 +826,7 @@ img = Magick::Image.read_inline(content)
|
|
753
826
|
<div class="desc">
|
754
827
|
<h4>Description</h4>
|
755
828
|
|
756
|
-
<p><span class="imquote">Adaptively blurs the image by
|
829
|
+
<p><span class="imquote">Adaptively blurs the image by bluring
|
757
830
|
more intensely near image edges and less intensely far from
|
758
831
|
edges.</span> The adaptive_blur method blurs <span class=
|
759
832
|
"imquote">the image with a Gaussian operator of the
|
@@ -793,7 +866,7 @@ img = Magick::Image.read_inline(content)
|
|
793
866
|
|
794
867
|
<h4>Magick API</h4>
|
795
868
|
|
796
|
-
<p>AdaptiveBlurImage
|
869
|
+
<p>AdaptiveBlurImage</p>
|
797
870
|
</div>
|
798
871
|
|
799
872
|
<div class="sig">
|
@@ -844,8 +917,7 @@ img = Magick::Image.read_inline(content)
|
|
844
917
|
|
845
918
|
<h4>Magick API</h4>
|
846
919
|
|
847
|
-
<p>AdaptiveBlurImageChannel
|
848
|
-
6.2.8)</p>
|
920
|
+
<p>AdaptiveBlurImageChannel</p>
|
849
921
|
</div>
|
850
922
|
|
851
923
|
<div class="sig">
|
@@ -899,7 +971,7 @@ img = Magick::Image.read_inline(content)
|
|
899
971
|
|
900
972
|
<h4>Magick API</h4>
|
901
973
|
|
902
|
-
<p>AdaptiveResizeImage
|
974
|
+
<p>AdaptiveResizeImage</p>
|
903
975
|
</div>
|
904
976
|
|
905
977
|
<div class="sig">
|
@@ -953,7 +1025,7 @@ img = Magick::Image.read_inline(content)
|
|
953
1025
|
|
954
1026
|
<h4>Magick API</h4>
|
955
1027
|
|
956
|
-
<p>AdaptiveSharpenImage
|
1028
|
+
<p>AdaptiveSharpenImage</p>
|
957
1029
|
</div>
|
958
1030
|
|
959
1031
|
<div class="sig">
|
@@ -1004,8 +1076,7 @@ img = Magick::Image.read_inline(content)
|
|
1004
1076
|
|
1005
1077
|
<h4>Magick API</h4>
|
1006
1078
|
|
1007
|
-
<p>AdaptiveSharpenImageChannel
|
1008
|
-
6.2.7)</p>
|
1079
|
+
<p>AdaptiveSharpenImageChannel</p>
|
1009
1080
|
</div>
|
1010
1081
|
|
1011
1082
|
<div class="sig">
|
@@ -1094,8 +1165,8 @@ img = Magick::Image.read_inline(content)
|
|
1094
1165
|
<div class="noise_example_wrapper">
|
1095
1166
|
<a href="javascript:popup('add_noise.rb.html')"><img src=
|
1096
1167
|
"ex/images/Flower_Hat.jpg" alt="add_noise example" id=
|
1097
|
-
"add_noise_example" title=
|
1098
|
-
/></a>
|
1168
|
+
"add_noise_example" title=
|
1169
|
+
"Click to see the example script" /></a>
|
1099
1170
|
|
1100
1171
|
<p>Click the NoiseType to see the effect.</p>
|
1101
1172
|
|
@@ -1124,6 +1195,10 @@ img = Magick::Image.read_inline(content)
|
|
1124
1195
|
|
1125
1196
|
<div style="clear: both;"></div>
|
1126
1197
|
|
1198
|
+
<h4>Notes</h4>
|
1199
|
+
|
1200
|
+
<p>The RandomNoise type was added in ImageMagick 6.3.5.</p>
|
1201
|
+
|
1127
1202
|
<h4>Magick API</h4>
|
1128
1203
|
|
1129
1204
|
<p>AddNoiseImage</p>
|
@@ -1170,7 +1245,7 @@ img = Magick::Image.read_inline(content)
|
|
1170
1245
|
method can also be used to add a profile. The type of profile
|
1171
1246
|
must be specified and the profile data must be in the form of a
|
1172
1247
|
string. Also see <a href="#delete_profile">delete_profile</a>
|
1173
|
-
and <a href="#each_profile">each_profile</a>.</p>
|
1248
|
+
and <a href="image2.html#each_profile">each_profile</a>.</p>
|
1174
1249
|
|
1175
1250
|
<h4>Magick API</h4>
|
1176
1251
|
|
@@ -1215,7 +1290,7 @@ img = Magick::Image.read_inline(content)
|
|
1215
1290
|
|
1216
1291
|
<h4>Magick API</h4>
|
1217
1292
|
|
1218
|
-
<p>AddNoiseImageChannel
|
1293
|
+
<p>AddNoiseImageChannel</p>
|
1219
1294
|
|
1220
1295
|
<h4>See also</h4>
|
1221
1296
|
|
@@ -1324,9 +1399,8 @@ img = Magick::Image.read_inline(content)
|
|
1324
1399
|
|
1325
1400
|
<h4>Magick API</h4>
|
1326
1401
|
|
1327
|
-
<p>FlipImage, FlopImage, RotateImage, TransposeImage
|
1328
|
-
|
1329
|
-
ImageMagick 6.2.8)</p>
|
1402
|
+
<p>FlipImage, FlopImage, RotateImage, TransposeImage,
|
1403
|
+
TransverseImage</p>
|
1330
1404
|
</div>
|
1331
1405
|
|
1332
1406
|
<div class="sig">
|
@@ -1377,7 +1451,7 @@ img = Magick::Image.read_inline(content)
|
|
1377
1451
|
<dt>threshold</dt>
|
1378
1452
|
|
1379
1453
|
<dd>The threshold value, a number between 0 and
|
1380
|
-
|
1454
|
+
QuantumRange.</dd>
|
1381
1455
|
|
1382
1456
|
<dt>channel...</dt>
|
1383
1457
|
|
@@ -1393,7 +1467,8 @@ img = Magick::Image.read_inline(content)
|
|
1393
1467
|
|
1394
1468
|
<h4>Example</h4>
|
1395
1469
|
|
1396
|
-
<p><code>bilevel_channel(2*
|
1470
|
+
<p><code>bilevel_channel(2*QuantumRange/3,
|
1471
|
+
RedChannel)</code></p>
|
1397
1472
|
|
1398
1473
|
<p class="rollover"><a href=
|
1399
1474
|
"javascript:popup('bilevel_channel.rb.html')"><img onmouseover=
|
@@ -1434,9 +1509,9 @@ img = Magick::Image.read_inline(content)
|
|
1434
1509
|
|
1435
1510
|
<h4>Arguments</h4>
|
1436
1511
|
|
1437
|
-
<p>Each channel argument is a number between 0 and
|
1438
|
-
arguments except the first may be omitted. If
|
1439
|
-
"arg">green_channel</span> or <span class=
|
1512
|
+
<p>Each channel argument is a number between 0 and
|
1513
|
+
QuantumRange. All arguments except the first may be omitted. If
|
1514
|
+
the <span class="arg">green_channel</span> or <span class=
|
1440
1515
|
"arg">blue_channel</span> argument is omitted, the default
|
1441
1516
|
value is the <span class="arg">red_channel</span> value. If the
|
1442
1517
|
<span class="arg">opacity_channel</span> argument is omitted,
|
@@ -1480,7 +1555,7 @@ img = Magick::Image.read_inline(content)
|
|
1480
1555
|
and <span class="arg">dst_percent</span>.</p>
|
1481
1556
|
|
1482
1557
|
<p>This method corresponds to the -blend option of
|
1483
|
-
|
1558
|
+
ImageMagick's <code>composite</code> command.</p>
|
1484
1559
|
|
1485
1560
|
<h4>Arguments</h4>
|
1486
1561
|
|
@@ -1584,7 +1659,7 @@ img = Magick::Image.read_inline(content)
|
|
1584
1659
|
|
1585
1660
|
<h4>Magick API</h4>
|
1586
1661
|
|
1587
|
-
<p>BlurImageChannel
|
1662
|
+
<p>BlurImageChannel</p>
|
1588
1663
|
</div>
|
1589
1664
|
|
1590
1665
|
<div class="sig">
|
@@ -1678,13 +1753,12 @@ img = Magick::Image.read_inline(content)
|
|
1678
1753
|
"padding: 10px; display: none;" id="borderless" onmouseout=
|
1679
1754
|
"this.style.display='none'; bordered.style.display='';" src=
|
1680
1755
|
"ex/images/Flower_Hat.jpg" alt="border example" title=
|
1681
|
-
"Click to see the example script"
|
1682
|
-
|
1756
|
+
"Click to see the example script" /> <img id="bordered"
|
1757
|
+
onmouseover=
|
1683
1758
|
"this.style.display='none'; borderless.style.display='';" src=
|
1684
|
-
"ex/border.jpg" alt="border example"
|
1685
|
-
|
1686
|
-
|
1687
|
-
"Mouse over the example to see the original image" /></p>
|
1759
|
+
"ex/border.jpg" alt="border example" /></a><img src=
|
1760
|
+
"ex/images/spin.gif" alt="" class="spin" style="left: 224px;"
|
1761
|
+
title="Mouse over the example to see the original image" /></p>
|
1688
1762
|
|
1689
1763
|
<h4>See also</h4>
|
1690
1764
|
|
@@ -1883,10 +1957,7 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1883
1957
|
|
1884
1958
|
<dd>Zero or more <a href=
|
1885
1959
|
"constants.html#ChannelType">ChannelType</a> values. If no
|
1886
|
-
arguments are specified, the default is all channels
|
1887
|
-
<em>GraphicsMagick users note:</em> Specify exactly one
|
1888
|
-
channel. The <code>AllChannels</code> value is not
|
1889
|
-
supported.</dd>
|
1960
|
+
arguments are specified, the default is all channels.</dd>
|
1890
1961
|
</dl>
|
1891
1962
|
|
1892
1963
|
<h4>Returns</h4>
|
@@ -1894,15 +1965,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1894
1965
|
<p>An array. The first element in the array is the minimum
|
1895
1966
|
value. The second element is the maximum value.</p>
|
1896
1967
|
|
1897
|
-
<h4>See also</h4>
|
1898
|
-
|
1899
|
-
<p>GraphicsMagick users see <a href=
|
1900
|
-
"image3.html#statistics">statistics</a></p>
|
1901
|
-
|
1902
1968
|
<h4>Magick API</h4>
|
1903
1969
|
|
1904
|
-
<p>GetImageChannelExtrema
|
1905
|
-
GetImageStatistics (available in GraphicsMagick 1.1)</p>
|
1970
|
+
<p>GetImageChannelExtrema</p>
|
1906
1971
|
</div>
|
1907
1972
|
|
1908
1973
|
<div class="sig">
|
@@ -1926,10 +1991,7 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1926
1991
|
|
1927
1992
|
<dd>Zero or more <a href=
|
1928
1993
|
"constants.html#ChannelType">ChannelType</a> values. If no
|
1929
|
-
arguments are specified, the default is all channels
|
1930
|
-
<em>GraphicsMagick users note:</em> Specify exactly one
|
1931
|
-
channel. The <code>AllChannels</code> value is not
|
1932
|
-
supported.</dd>
|
1994
|
+
arguments are specified, the default is all channels.</dd>
|
1933
1995
|
</dl>
|
1934
1996
|
|
1935
1997
|
<h4>Returns</h4>
|
@@ -1937,15 +1999,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1937
1999
|
<p>An array. The first element in the array is the mean value.
|
1938
2000
|
The second element is the standard deviation.</p>
|
1939
2001
|
|
1940
|
-
<h4>See also</h4>
|
1941
|
-
|
1942
|
-
<p>GraphicsMagick users see <a href=
|
1943
|
-
"image3.html#statistics">statistics</a></p>
|
1944
|
-
|
1945
2002
|
<h4>Magick API</h4>
|
1946
2003
|
|
1947
|
-
<p>GetImageChannelMean
|
1948
|
-
GetImageStatistics (available in GraphicsMagick 1.1)</p>
|
2004
|
+
<p>GetImageChannelMean</p>
|
1949
2005
|
</div>
|
1950
2006
|
|
1951
2007
|
<div class="sig">
|
@@ -1998,6 +2054,25 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
1998
2054
|
<p>CharcoalImage</p>
|
1999
2055
|
</div>
|
2000
2056
|
|
2057
|
+
<div class="sig">
|
2058
|
+
<h3 id="check_destroyed">check_destroyed</h3>
|
2059
|
+
|
2060
|
+
<p><span class="arg">image</span>.check_destroyed ->
|
2061
|
+
<code>nil</code></p>
|
2062
|
+
</div>
|
2063
|
+
|
2064
|
+
<div class="desc">
|
2065
|
+
<h4>Description</h4>
|
2066
|
+
|
2067
|
+
<p>Raises Magick::DestroyedImageError if the image has been
|
2068
|
+
destroyed. Returns nil otherwise.</p>
|
2069
|
+
|
2070
|
+
<h4>See also</h4>
|
2071
|
+
|
2072
|
+
<p><a href="#destroy_bang">destroy!</a>, <a href=
|
2073
|
+
"#destroyed_q">destroyed?</a></p>
|
2074
|
+
</div>
|
2075
|
+
|
2001
2076
|
<div class="sig">
|
2002
2077
|
<h3 id="chop">chop</h3>
|
2003
2078
|
|
@@ -2073,7 +2148,7 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2073
2148
|
<h4>Description</h4>
|
2074
2149
|
|
2075
2150
|
<p>Same as <a href="#dup">dup</a> except the frozen state of
|
2076
|
-
the original is
|
2151
|
+
the original is propogated to the new copy.</p>
|
2077
2152
|
|
2078
2153
|
<h4>Returns</h4>
|
2079
2154
|
|
@@ -2084,6 +2159,69 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2084
2159
|
<p><a href="#dup">dup</a></p>
|
2085
2160
|
</div>
|
2086
2161
|
|
2162
|
+
<div class="sig">
|
2163
|
+
<h3 id="clut_channel">clut_channel</h3>
|
2164
|
+
|
2165
|
+
<p><span class="arg">image</span>.clut(<span class=
|
2166
|
+
"arg">clut_image</span> [, <span class=
|
2167
|
+
"arg">channel...</span>]) -> <em>self</em></p>
|
2168
|
+
</div>
|
2169
|
+
|
2170
|
+
<div class="desc">
|
2171
|
+
<h4>Description</h4>
|
2172
|
+
|
2173
|
+
<p>Replace the channel values in the target image with a lookup
|
2174
|
+
of its replacement value in an LUT gradient image.</p>
|
2175
|
+
|
2176
|
+
<p class="imquote">The LUT image should be either a single row
|
2177
|
+
or column image of replacement colors. The lookup is controled
|
2178
|
+
by the -interpolate setting, especially for an LUT which is not
|
2179
|
+
the full length needed by the IM installed Quality (Q) level.
|
2180
|
+
Good setings for this is the default 'bilinear' or 'bicubic'
|
2181
|
+
interpolation setting for a smooth color gradient, or 'integer'
|
2182
|
+
for a direct unsmoothed lookup of color values.</p>
|
2183
|
+
|
2184
|
+
<p class="imquote">This method is especially suited to
|
2185
|
+
replacing a grayscale image with specific color gradient from
|
2186
|
+
the CLUT image.</p>
|
2187
|
+
|
2188
|
+
<p class="imquote">Note that color replacements involving
|
2189
|
+
transparency (alpha/matte channel) will lookup the replacement
|
2190
|
+
alpha/matte value using the alpha/matte value of the original
|
2191
|
+
image. As such correct alpha channel lookup for a pure
|
2192
|
+
gray-scale original image will require a copy of that grayscale
|
2193
|
+
to be transfered into its alpha channel before applying the
|
2194
|
+
-clut operator.</p>
|
2195
|
+
|
2196
|
+
<h4>Arguments</h4>
|
2197
|
+
|
2198
|
+
<dl>
|
2199
|
+
<dt>clut_image</dt>
|
2200
|
+
|
2201
|
+
<dd>The LUT gradient image. Specify which interpolation
|
2202
|
+
method to use by setting this image's <a href=
|
2203
|
+
"imageattrs.html#pixel_interpolation_method">pixel_interpolation_method</a>
|
2204
|
+
attribute to a <a href=
|
2205
|
+
"constants.html#InterpolatePixelMethod">Magick::InterpolatePixelMethod</a>
|
2206
|
+
value.</dd>
|
2207
|
+
|
2208
|
+
<dt>channel...</dt>
|
2209
|
+
|
2210
|
+
<dd>Limit which channels are modified by specifying one or
|
2211
|
+
more <a href="constants.html#ChannelType">ChannelType</a>
|
2212
|
+
values. Only these channels will be changed. If no channels
|
2213
|
+
are specified, all channels will be changed.</dd>
|
2214
|
+
</dl>
|
2215
|
+
|
2216
|
+
<h4>Returns</h4>
|
2217
|
+
|
2218
|
+
<p>self</p>
|
2219
|
+
|
2220
|
+
<h4>See also</h4>
|
2221
|
+
|
2222
|
+
<p>ImageMagick's -clut option.</p>
|
2223
|
+
</div>
|
2224
|
+
|
2087
2225
|
<div class="sig">
|
2088
2226
|
<h3 id="color_fill_to_border">color_fill_to_border</h3>
|
2089
2227
|
|
@@ -2235,9 +2373,9 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2235
2373
|
"ex/color_histogram.gif" alt="color_histogram example" title=
|
2236
2374
|
"Click the image to see the example script" /></a></p>
|
2237
2375
|
|
2238
|
-
<h4>Magick API</h4>
|
2239
|
-
|
2240
|
-
|
2376
|
+
<h4>Magick API</h4>
|
2377
|
+
|
2378
|
+
<p>GetImageHistogram</p>
|
2241
2379
|
</div>
|
2242
2380
|
|
2243
2381
|
<div class="sig">
|
@@ -2263,7 +2401,7 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2263
2401
|
<dt>red_pct, green_pct, blue_pct, matte_pct</dt>
|
2264
2402
|
|
2265
2403
|
<dd>The percentage of the fill color red, green, blue and
|
2266
|
-
matte (
|
2404
|
+
matte (tranparency) components to blend with the image pixel.
|
2267
2405
|
For example, <code>.25</code> is 25%. The matte_pct argument
|
2268
2406
|
is optional.</dd>
|
2269
2407
|
|
@@ -2279,8 +2417,8 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2279
2417
|
|
2280
2418
|
<h4>Example</h4>
|
2281
2419
|
|
2282
|
-
<p>This example converts a color image to sepia-tone
|
2283
|
-
<a href="image3.html#quantize">quantize</a> and
|
2420
|
+
<p>This example converts a color image to a "sepia-tone-ish"
|
2421
|
+
image using the <a href="image3.html#quantize">quantize</a> and
|
2284
2422
|
<code>colorize</code> methods.</p>
|
2285
2423
|
|
2286
2424
|
<p class="rollover"><a href=
|
@@ -2358,7 +2496,7 @@ mona.change_geometry!('320x240') { |cols, rows, img|
|
|
2358
2496
|
"arg">x</span>,<span class="arg">y</span> to the fill color.
|
2359
2497
|
This method creates a new image object. If you want to set a
|
2360
2498
|
single pixel in the image without creating a new image, use
|
2361
|
-
<a href="
|
2499
|
+
<a href="image3.html#pixel_color">pixel_color</a> or the
|
2362
2500
|
<a href="draw.html#point">Draw#point</a> method.
|
2363
2501
|
|
2364
2502
|
<h4>Arguments</h4>
|
@@ -2385,7 +2523,7 @@ f.color_point(50,50, 'red')
|
|
2385
2523
|
|
2386
2524
|
<h4>See also</h4>
|
2387
2525
|
|
2388
|
-
<p><a href="
|
2526
|
+
<p><a href="image3.html#pixel_color">pixel_color</a>, <a href=
|
2389
2527
|
"draw.html#point">Draw#point</a></p>
|
2390
2528
|
|
2391
2529
|
<h4>Magick API</h4>
|
@@ -2624,7 +2762,7 @@ f.color_reset!(red)
|
|
2624
2762
|
<dt>x, y</dt>
|
2625
2763
|
|
2626
2764
|
<dd>The x- and y-offset of the composited image, measured
|
2627
|
-
|
2765
|
+
relative to the <em>gravity</em> argument.</dd>
|
2628
2766
|
|
2629
2767
|
<dt>composite_op</dt>
|
2630
2768
|
|
@@ -2858,7 +2996,7 @@ f.colors » 108
|
|
2858
2996
|
|
2859
2997
|
<h4>Magick API</h4>
|
2860
2998
|
|
2861
|
-
<p>ContrastStretchImage
|
2999
|
+
<p>ContrastStretchImage</p>
|
2862
3000
|
</div>
|
2863
3001
|
|
2864
3002
|
<div class="sig">
|
@@ -2895,7 +3033,7 @@ f.colors » 108
|
|
2895
3033
|
<h4>See also</h4>
|
2896
3034
|
|
2897
3035
|
<p><a href="#convolve_channel">convolve_channel</a>. The
|
2898
|
-
<a href="#edge">edge</a>, <a href=
|
3036
|
+
<a href="image2.html#edge">edge</a>, <a href=
|
2899
3037
|
"image2.html#emboss">emboss</a>, <a href=
|
2900
3038
|
"image2.html#gaussian_blur">gaussian_blur</a>, <a href=
|
2901
3039
|
"image2.html#motion_blur">motion_blur</a> and <a href=
|
@@ -2972,7 +3110,7 @@ f.colors » 108
|
|
2972
3110
|
|
2973
3111
|
<div class="desc">
|
2974
3112
|
<h4>Description</h4>Returns a copy of the image. The tainted
|
2975
|
-
state of the original is
|
3113
|
+
state of the original is propogated to the copy.
|
2976
3114
|
|
2977
3115
|
<h4>Example</h4>
|
2978
3116
|
<pre>
|
@@ -3106,13 +3244,21 @@ f2 = f.copy
|
|
3106
3244
|
<dt>gravity</dt>
|
3107
3245
|
|
3108
3246
|
<dd>A <a href=
|
3109
|
-
"constants.html#GravityType">GravityType</a> value
|
3247
|
+
"constants.html#GravityType">GravityType</a> value. If
|
3248
|
+
the argument is NorthEastGravity, EastGravity, or
|
3249
|
+
SouthEastGravity, the <em>x-</em>offset is measured from
|
3250
|
+
the right side of the image. If the argument is
|
3251
|
+
SouthEastGravity, SouthGravity, or SouthWestGravity, the
|
3252
|
+
<em>y-</em>offset is measured from the bottom of the
|
3253
|
+
image. All other values are ignored and the <em>x-</em>
|
3254
|
+
and <em>y-</em>offsets are measured from the upper-left
|
3255
|
+
corner of the image.</dd>
|
3110
3256
|
|
3111
3257
|
<dt>x, y</dt>
|
3112
3258
|
|
3113
|
-
<dd
|
3114
|
-
|
3115
|
-
|
3259
|
+
<dd>The <em>x-</em> and <em>y-</em>offset of the
|
3260
|
+
rectangle from the sides specified by the
|
3261
|
+
<em>gravity</em> argument.</dd>
|
3116
3262
|
|
3117
3263
|
<dt>width, height</dt>
|
3118
3264
|
|
@@ -3159,7 +3305,8 @@ cropped = img.crop(x, y, width, height, true)
|
|
3159
3305
|
|
3160
3306
|
<h4>See also</h4>
|
3161
3307
|
|
3162
|
-
<p><a href="#crop_bang">crop!</a>, <a href="#chop">chop</a
|
3308
|
+
<p><a href="#crop_bang">crop!</a>, <a href="#chop">chop</a>,
|
3309
|
+
<a href="image2.html#excerpt">excerpt</a></p>
|
3163
3310
|
|
3164
3311
|
<h4>Magick API</h4>
|
3165
3312
|
|
@@ -3256,15 +3403,14 @@ cropped = img.crop(x, y, width, height, true)
|
|
3256
3403
|
<img id="cropless" style="display: none" onmouseout=
|
3257
3404
|
"this.style.display='none';cropped.style.display='';" src=
|
3258
3405
|
"ex/images/Flower_Hat.jpg" alt="crop_resize example" title=
|
3259
|
-
"Click to see the example script"
|
3406
|
+
"Click to see the example script" />
|
3260
3407
|
<!-- This img tag displays the framed image when the mouse is not over-->
|
3261
3408
|
<img style=
|
3262
3409
|
"padding-left:62px; padding-right: 62px; padding-top: 87px;padding-bottom:87px;"
|
3263
3410
|
id="cropped" onmouseover=
|
3264
3411
|
"this.style.display='none';cropless.style.display='';" src=
|
3265
|
-
"ex/crop_resized.jpg" alt="frame example" /></a>
|
3266
|
-
|
3267
|
-
"margin-bottom: 230px" title=
|
3412
|
+
"ex/crop_resized.jpg" alt="frame example" /></a> <img src=
|
3413
|
+
"ex/images/spin.gif" alt="" style="margin-bottom: 230px" title=
|
3268
3414
|
"Mouse over the example to see the original image" /></p>
|
3269
3415
|
</div>
|
3270
3416
|
|
@@ -3388,6 +3534,53 @@ cropped = img.crop(x, y, width, height, true)
|
|
3388
3534
|
<p>DespeckleImage</p>
|
3389
3535
|
</div>
|
3390
3536
|
|
3537
|
+
<div class="sig">
|
3538
|
+
<h3 id="destroy_bang">destroy!</h3>
|
3539
|
+
|
3540
|
+
<p><span class="arg">image</span>.destroy! ->
|
3541
|
+
<em>self</em></p>
|
3542
|
+
</div>
|
3543
|
+
|
3544
|
+
<div class="desc">
|
3545
|
+
<h4>Description</h4>
|
3546
|
+
|
3547
|
+
<p>Returns all the memory associated with the image to the
|
3548
|
+
system. After an image has been destroyed, all Image methods
|
3549
|
+
(except <a href="image1.html#destroyed_q">destroyed?</a> and
|
3550
|
+
<a href="image2.html#inspect">inspect</a>) called on the image
|
3551
|
+
will raise a Magick::DestroyedImageError.</p>
|
3552
|
+
|
3553
|
+
<p>It is not possible to recover a destroyed image.</p>
|
3554
|
+
|
3555
|
+
<h4>Returns</h4>
|
3556
|
+
|
3557
|
+
<p>self</p>
|
3558
|
+
|
3559
|
+
<h4>See also</h4>
|
3560
|
+
|
3561
|
+
<p><a href="#check_destroyed">check_destroyed</a>, <a href=
|
3562
|
+
"#destroyed_q">destroyed?</a></p>
|
3563
|
+
</div>
|
3564
|
+
|
3565
|
+
<div class="sig">
|
3566
|
+
<h3 id="destroyed_q">destroyed?</h3>
|
3567
|
+
|
3568
|
+
<p><span class="arg">image</span>.destroyed? ->
|
3569
|
+
<code>true</code> or <code>false</code></p>
|
3570
|
+
</div>
|
3571
|
+
|
3572
|
+
<div class="desc">
|
3573
|
+
<h4>Description</h4>
|
3574
|
+
|
3575
|
+
<p>Returns true if the image has been destroyed, false
|
3576
|
+
otherwise.</p>
|
3577
|
+
|
3578
|
+
<h4>See also</h4>
|
3579
|
+
|
3580
|
+
<p><a href="#check_destroyed">check_destroyed</a>, <a href=
|
3581
|
+
"#destroy_bang">destroy!</a></p>
|
3582
|
+
</div>
|
3583
|
+
|
3391
3584
|
<div class="sig">
|
3392
3585
|
<h3 id="difference">difference</h3>
|
3393
3586
|
|
@@ -3402,7 +3595,7 @@ cropped = img.crop(x, y, width, height, true)
|
|
3402
3595
|
about their difference.</p>
|
3403
3596
|
|
3404
3597
|
<p class="imquote">A small normalized mean square
|
3405
|
-
error...suggests the images are very
|
3598
|
+
error...suggests the images are very similiar in spatial layout
|
3406
3599
|
and color.</p>
|
3407
3600
|
|
3408
3601
|
<h4>Returns</h4>
|
@@ -3491,7 +3684,8 @@ cropped = img.crop(x, y, width, height, true)
|
|
3491
3684
|
<dd>If <code>true</code>, the returned array elements will be
|
3492
3685
|
<code>Float</code> values in the range 0..1. If
|
3493
3686
|
<code>false</code>, the returned array elements will be
|
3494
|
-
<code>Integer</code> values in the range
|
3687
|
+
<code>Integer</code> values in the range
|
3688
|
+
0..QuantumRange.</dd>
|
3495
3689
|
</dl>
|
3496
3690
|
|
3497
3691
|
<h4>Returns</h4>An array
|
@@ -3527,8 +3721,7 @@ exit
|
|
3527
3721
|
|
3528
3722
|
<h4>Magick API</h4>
|
3529
3723
|
|
3530
|
-
<p>
|
3531
|
-
(ImageMagick)</p>
|
3724
|
+
<p>ExportImagePixels</p>
|
3532
3725
|
|
3533
3726
|
<h4>Note</h4>
|
3534
3727
|
|
@@ -3559,7 +3752,7 @@ exit
|
|
3559
3752
|
from <span class="arg">image</span> to the output image.</p>
|
3560
3753
|
|
3561
3754
|
<p>This method corresponds to the -displace option of
|
3562
|
-
|
3755
|
+
ImageMagick's <code>composite</code> command.</p>
|
3563
3756
|
|
3564
3757
|
<h4>Arguments</h4>
|
3565
3758
|
|
@@ -3669,7 +3862,7 @@ exit
|
|
3669
3862
|
<span class="arg">src_percentage</span>.</p>
|
3670
3863
|
|
3671
3864
|
<p>This method corresponds to the -dissolve option of
|
3672
|
-
|
3865
|
+
ImageMagick's <code>composite</code> command.</p>
|
3673
3866
|
|
3674
3867
|
<h4>Arguments</h4>
|
3675
3868
|
|
@@ -3687,7 +3880,7 @@ exit
|
|
3687
3880
|
interpreted as a percentage. Both 0.25 and "25%" mean 25%.
|
3688
3881
|
This argument is required.</dd>
|
3689
3882
|
|
3690
|
-
<dt>dst_percentage
|
3883
|
+
<dt>dst_percentage</dt>
|
3691
3884
|
|
3692
3885
|
<dd>Either a non-negative number a string in the form "NN%".
|
3693
3886
|
If <span class="arg">src_percentage</span> is a number it is
|
@@ -3695,12 +3888,6 @@ exit
|
|
3695
3888
|
This argument may omitted if no other arguments follow it. In
|
3696
3889
|
this case <span class="arg">image</span>'s opacity is
|
3697
3890
|
unchanged.</dd>
|
3698
|
-
|
3699
|
-
<dt>dst_percentage (with GraphicsMagick)</dt>
|
3700
|
-
|
3701
|
-
<dd>With GraphicsMagick, <code>dissolve</code> ignores the
|
3702
|
-
value and uses <code>1.0-<span class=
|
3703
|
-
"arg">src_percentage</span></code> instead.</dd>
|
3704
3891
|
</dl>
|
3705
3892
|
|
3706
3893
|
<p>The <code>dissolve</code> method can be called with or
|
@@ -3740,6 +3927,65 @@ exit
|
|
3740
3927
|
"#composite">composite</a></p>
|
3741
3928
|
</div>
|
3742
3929
|
|
3930
|
+
<div class="sig">
|
3931
|
+
<h3 id="distort">distort</h3>
|
3932
|
+
|
3933
|
+
<p><span class="arg">image</span>.distort(<span class=
|
3934
|
+
"arg">type</span>, <span class="arg">points</span>,
|
3935
|
+
<span class="arg">bestfit</span>=<code>false</code>) ->
|
3936
|
+
<em>anImage</em></p>
|
3937
|
+
</div>
|
3938
|
+
|
3939
|
+
<div class="desc">
|
3940
|
+
<h4>Description</h4>
|
3941
|
+
|
3942
|
+
<p>Distort an image using the specified distortion type and its
|
3943
|
+
required arguments. This method is the equivalent of
|
3944
|
+
ImageMagick's -distort option.</p>
|
3945
|
+
|
3946
|
+
<h4>Arguments</h4>
|
3947
|
+
|
3948
|
+
<p>Specify one of the following values for the distortion
|
3949
|
+
<span class="arg">type</span>:</p>
|
3950
|
+
|
3951
|
+
<ul>
|
3952
|
+
<li>AffineDistortion</li>
|
3953
|
+
|
3954
|
+
<li>AffineProjectionDistortion</li>
|
3955
|
+
|
3956
|
+
<li>ArcDistortion</li>
|
3957
|
+
|
3958
|
+
<li>BilinearDistortion</li>
|
3959
|
+
|
3960
|
+
<li>PerspectiveDistortion</li>
|
3961
|
+
|
3962
|
+
<li>ScaleRotateTranslateDistortion</li>
|
3963
|
+
</ul>
|
3964
|
+
|
3965
|
+
<p>The <span class="arg">points</span> argument is an array of
|
3966
|
+
numbers. The size of the array depends on the distortion
|
3967
|
+
type.</p>
|
3968
|
+
|
3969
|
+
<p class="imquote">If <span class="arg">bestfit</span> is
|
3970
|
+
enabled, and the distortion allows it, the destination image is
|
3971
|
+
adjusted to ensure the whole source image will just fit within
|
3972
|
+
the final destination image, which will be sized and offset
|
3973
|
+
accordingly. Also in many cases the virtual offset of the
|
3974
|
+
source image will be taken into account in the mapping.</p>
|
3975
|
+
|
3976
|
+
<h4>Returns</h4>
|
3977
|
+
|
3978
|
+
<p>A new image</p>
|
3979
|
+
|
3980
|
+
<h4>Note</h4>
|
3981
|
+
|
3982
|
+
<p>See <a href=
|
3983
|
+
"http://www.imagemagick.org/Usage/distorts/#distort">Distortion
|
3984
|
+
Operator</a> in Anthony Thyssen's excellent <a href=
|
3985
|
+
"http://www.imagemagick.org/Usage/">Examples of ImageMagick
|
3986
|
+
Usage</a> for more information about distortion operations.</p>
|
3987
|
+
</div>
|
3988
|
+
|
3743
3989
|
<div class="sig">
|
3744
3990
|
<h3 id="distortion_channel">distortion_channel</h3>
|
3745
3991
|
|
@@ -3786,8 +4032,7 @@ exit
|
|
3786
4032
|
|
3787
4033
|
<h4>Magick API</h4>
|
3788
4034
|
|
3789
|
-
<p>GetImageChannelDistortion
|
3790
|
-
6.2.0)</p>
|
4035
|
+
<p>GetImageChannelDistortion</p>
|
3791
4036
|
|
3792
4037
|
<h4>See also</h4>
|
3793
4038
|
|
@@ -3816,147 +4061,6 @@ exit
|
|
3816
4061
|
<p><a href="#clone">clone</a></p>
|
3817
4062
|
</div>
|
3818
4063
|
|
3819
|
-
<div class="sig">
|
3820
|
-
<h3 id="each_iptc_dataset">each_iptc_dataset</h3>
|
3821
|
-
|
3822
|
-
<p>image.each_iptc_dataset { |<span class="arg">dataset</span>,
|
3823
|
-
<span class="arg">data_field</span>| <span class=
|
3824
|
-
"arg">block</span>} -> <code>nil</code></p>
|
3825
|
-
</div>
|
3826
|
-
|
3827
|
-
<div class="desc">
|
3828
|
-
<h4>Description</h4>
|
3829
|
-
|
3830
|
-
<p>Iterates over the IPTC DataSet constants in Magick::IPTC. If
|
3831
|
-
the image's IPTC profile has the DataSet and the data field has
|
3832
|
-
non-0 length, yields to the block. The IPTC DataSet constants
|
3833
|
-
are listed <a href="image2.html#get_iptc_dataset">here</a>.</p>
|
3834
|
-
|
3835
|
-
<h4>Arguments</h4>
|
3836
|
-
|
3837
|
-
<p>The block arguments are:</p>
|
3838
|
-
|
3839
|
-
<dl>
|
3840
|
-
<dt>dataset</dt>
|
3841
|
-
|
3842
|
-
<dd>The DataSet name</dd>
|
3843
|
-
|
3844
|
-
<dt>data_field</dt>
|
3845
|
-
|
3846
|
-
<dd>The data field</dd>
|
3847
|
-
</dl>
|
3848
|
-
|
3849
|
-
<h4>See also</h4>
|
3850
|
-
|
3851
|
-
<p><a href=
|
3852
|
-
"image2.html#get_iptc_dataset">get_iptc_dataset</a></p>
|
3853
|
-
</div>
|
3854
|
-
|
3855
|
-
<div class="sig">
|
3856
|
-
<h3 id="each_profile">each_profile</h3>
|
3857
|
-
|
3858
|
-
<p><span class="arg">image</span>.each_profile {|<span class=
|
3859
|
-
"arg">name</span>, <span class="arg">value</span>| <span class=
|
3860
|
-
"arg">block</span>} -> <em>???</em> (see Returns)</p>
|
3861
|
-
</div>
|
3862
|
-
|
3863
|
-
<div class="desc">
|
3864
|
-
<h4>Description</h4>Calls <span class="arg">block</span> once
|
3865
|
-
for each profile in the image, passing the profile name and
|
3866
|
-
value as parameters.
|
3867
|
-
|
3868
|
-
<h4>Returns</h4>
|
3869
|
-
|
3870
|
-
<p>the last value returned by the block</p>
|
3871
|
-
|
3872
|
-
<h4>See also</h4>
|
3873
|
-
|
3874
|
-
<p>The <a href=
|
3875
|
-
"imageattrs.html#color_profile">color_profile</a> and <a href=
|
3876
|
-
"imageattrs.html#iptc_profile">iptc_profile</a> attributes
|
3877
|
-
return the ICC and IPTC profiles, respectively.</p>
|
3878
|
-
|
3879
|
-
<h4>Magick API</h4>
|
3880
|
-
|
3881
|
-
<p>GetNextImageProfile</p>
|
3882
|
-
</div>
|
3883
|
-
|
3884
|
-
<div class="sig">
|
3885
|
-
<h3 id="edge">edge</h3>
|
3886
|
-
|
3887
|
-
<p><span class="arg">image</span>.edge(<span class=
|
3888
|
-
"arg">radius</span>=0.0) -> <em>anImage</em></p>
|
3889
|
-
</div>
|
3890
|
-
|
3891
|
-
<div class="desc">
|
3892
|
-
<h4>Description</h4>Finds edges in the image.
|
3893
|
-
|
3894
|
-
<h4>Arguments</h4>The radius of the convolution filter. If the
|
3895
|
-
radius is 0, <code>edge</code> selects a suitable default.
|
3896
|
-
|
3897
|
-
<h4>Returns</h4>
|
3898
|
-
|
3899
|
-
<p>A new image</p>
|
3900
|
-
|
3901
|
-
<h4>Example</h4>
|
3902
|
-
|
3903
|
-
<p class="rollover"><a href=
|
3904
|
-
"javascript:popup('edge.rb.html')"><img onmouseover=
|
3905
|
-
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3906
|
-
"this.src='ex/edge.jpg'" src="ex/edge.jpg" alt="edge example"
|
3907
|
-
title="Click the image to see the example script" /></a>
|
3908
|
-
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
3909
|
-
"Mouse over the example to see the original image" /></p>
|
3910
|
-
|
3911
|
-
<h4>Magick API</h4>
|
3912
|
-
|
3913
|
-
<p>EdgeImage</p>
|
3914
|
-
</div>
|
3915
|
-
|
3916
|
-
<div class="sig">
|
3917
|
-
<h3 id="emboss">emboss</h3>
|
3918
|
-
|
3919
|
-
<p><span class="arg">image</span>.emboss(<span class=
|
3920
|
-
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
|
3921
|
-
-> <em>anImage</em></p>
|
3922
|
-
</div>
|
3923
|
-
|
3924
|
-
<div class="desc">
|
3925
|
-
<h4>Description</h4>Adds a 3-dimensional effect.
|
3926
|
-
|
3927
|
-
<h4>Arguments</h4>
|
3928
|
-
|
3929
|
-
<dl>
|
3930
|
-
<dt>radius</dt>
|
3931
|
-
|
3932
|
-
<dd>The radius of the Gaussian operator.</dd>
|
3933
|
-
|
3934
|
-
<dt>sigma</dt>
|
3935
|
-
|
3936
|
-
<dd>The sigma (standard deviation) of the Gaussian operator.
|
3937
|
-
This value cannot be 0.0.</dd>
|
3938
|
-
</dl>
|
3939
|
-
|
3940
|
-
<h4>Returns</h4>
|
3941
|
-
|
3942
|
-
<p>A new image</p>
|
3943
|
-
|
3944
|
-
<h4>Example</h4>
|
3945
|
-
|
3946
|
-
<p class="rollover"><a href=
|
3947
|
-
"javascript:popup('emboss.rb.html')"><img onmouseover=
|
3948
|
-
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3949
|
-
"this.src='ex/emboss.jpg'" src="ex/emboss.jpg" alt=
|
3950
|
-
"emboss example" title=
|
3951
|
-
"Click the image to see the example script" /></a><img src=
|
3952
|
-
"ex/images/spin.gif" alt="" class="spin" title=
|
3953
|
-
"Mouse over the example to see the original image" /></p>
|
3954
|
-
|
3955
|
-
<h4>Magick API</h4>
|
3956
|
-
|
3957
|
-
<p>EmbossImage</p>
|
3958
|
-
</div>
|
3959
|
-
|
3960
4064
|
<p class="spacer"> </p>
|
3961
4065
|
|
3962
4066
|
<div class="nav">
|