rdp-rmagick 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +769 -0
- data/Doxyfile +1514 -0
- data/README-Mac-OSX.txt +1 -0
- data/README.md +231 -0
- data/build_tarball.rake +215 -0
- data/doc/comtasks.html +287 -0
- data/doc/constants.html +1581 -0
- data/doc/css/doc.css +299 -0
- data/doc/css/popup.css +34 -0
- data/doc/css/ref.css +67 -0
- data/doc/draw.html +3269 -0
- data/doc/ex/InitialCoords.rb +23 -0
- data/doc/ex/NewCoordSys.rb +32 -0
- data/doc/ex/OrigCoordSys.rb +18 -0
- data/doc/ex/PreserveAspectRatio.rb +205 -0
- data/doc/ex/RotateScale.rb +37 -0
- data/doc/ex/Skew.rb +38 -0
- data/doc/ex/Use01.rb +16 -0
- data/doc/ex/Use02.rb +21 -0
- data/doc/ex/Use03.rb +16 -0
- data/doc/ex/ViewBox.rb +33 -0
- data/doc/ex/adaptive_threshold.rb +10 -0
- data/doc/ex/add_noise.rb +17 -0
- data/doc/ex/affine.rb +48 -0
- data/doc/ex/affine_transform.rb +20 -0
- data/doc/ex/arc.rb +49 -0
- data/doc/ex/arcpath.rb +33 -0
- data/doc/ex/arcs01.rb +28 -0
- data/doc/ex/arcs02.rb +61 -0
- data/doc/ex/average.rb +15 -0
- data/doc/ex/axes.rb +64 -0
- data/doc/ex/baseline_shift01.rb +18 -0
- data/doc/ex/bilevel_channel.rb +9 -0
- data/doc/ex/blur_image.rb +12 -0
- data/doc/ex/border.rb +10 -0
- data/doc/ex/bounding_box.rb +44 -0
- data/doc/ex/cbezier1.rb +42 -0
- data/doc/ex/cbezier2.rb +42 -0
- data/doc/ex/cbezier3.rb +42 -0
- data/doc/ex/cbezier4.rb +43 -0
- data/doc/ex/cbezier5.rb +43 -0
- data/doc/ex/cbezier6.rb +53 -0
- data/doc/ex/channel.rb +26 -0
- data/doc/ex/charcoal.rb +12 -0
- data/doc/ex/chop.rb +29 -0
- data/doc/ex/circle.rb +33 -0
- data/doc/ex/circle01.rb +17 -0
- data/doc/ex/clip_path.rb +60 -0
- data/doc/ex/coalesce.rb +60 -0
- data/doc/ex/color_fill_to_border.rb +29 -0
- data/doc/ex/color_floodfill.rb +28 -0
- data/doc/ex/color_histogram.rb +48 -0
- data/doc/ex/color_reset.rb +11 -0
- data/doc/ex/colorize.rb +16 -0
- data/doc/ex/colors.rb +64 -0
- data/doc/ex/compose_mask.rb +23 -0
- data/doc/ex/composite.rb +135 -0
- data/doc/ex/composite_layers.rb +53 -0
- data/doc/ex/composite_tiled.rb +23 -0
- data/doc/ex/contrast.rb +36 -0
- data/doc/ex/crop.rb +31 -0
- data/doc/ex/crop_with_gravity.rb +46 -0
- data/doc/ex/cubic01.rb +45 -0
- data/doc/ex/cubic02.rb +94 -0
- data/doc/ex/cycle_colormap.rb +21 -0
- data/doc/ex/dissolve.rb +13 -0
- data/doc/ex/drawcomp.rb +42 -0
- data/doc/ex/drop_shadow.rb +60 -0
- data/doc/ex/edge.rb +11 -0
- data/doc/ex/ellipse.rb +45 -0
- data/doc/ex/ellipse01.rb +22 -0
- data/doc/ex/emboss.rb +11 -0
- data/doc/ex/enhance.rb +28 -0
- data/doc/ex/equalize.rb +11 -0
- data/doc/ex/evenodd.rb +43 -0
- data/doc/ex/fill_pattern.rb +26 -0
- data/doc/ex/flatten_images.rb +36 -0
- data/doc/ex/flip.rb +11 -0
- data/doc/ex/flop.rb +11 -0
- data/doc/ex/font_styles.rb +34 -0
- data/doc/ex/fonts.rb +20 -0
- data/doc/ex/frame.rb +12 -0
- data/doc/ex/gaussian_blur.rb +11 -0
- data/doc/ex/get_multiline_type_metrics.rb +42 -0
- data/doc/ex/get_pixels.rb +48 -0
- data/doc/ex/get_type_metrics.rb +146 -0
- data/doc/ex/gradientfill.rb +27 -0
- data/doc/ex/grav.rb +46 -0
- data/doc/ex/gravity.rb +79 -0
- data/doc/ex/group.rb +26 -0
- data/doc/ex/hatchfill.rb +27 -0
- data/doc/ex/image.rb +46 -0
- data/doc/ex/images/Apple.miff +0 -0
- data/doc/ex/images/Ballerina.jpg +0 -0
- data/doc/ex/images/Ballerina3.jpg +0 -0
- data/doc/ex/images/Button_0.gif +0 -0
- data/doc/ex/images/Button_1.gif +0 -0
- data/doc/ex/images/Button_2.gif +0 -0
- data/doc/ex/images/Button_3.gif +0 -0
- data/doc/ex/images/Button_4.gif +0 -0
- data/doc/ex/images/Button_5.gif +0 -0
- data/doc/ex/images/Button_6.gif +0 -0
- data/doc/ex/images/Button_7.gif +0 -0
- data/doc/ex/images/Button_8.gif +0 -0
- data/doc/ex/images/Button_9.gif +0 -0
- data/doc/ex/images/Button_A.gif +0 -0
- data/doc/ex/images/Button_B.gif +0 -0
- data/doc/ex/images/Button_C.gif +0 -0
- data/doc/ex/images/Button_D.gif +0 -0
- data/doc/ex/images/Button_E.gif +0 -0
- data/doc/ex/images/Button_F.gif +0 -0
- data/doc/ex/images/Button_G.gif +0 -0
- data/doc/ex/images/Button_H.gif +0 -0
- data/doc/ex/images/Button_I.gif +0 -0
- data/doc/ex/images/Button_J.gif +0 -0
- data/doc/ex/images/Button_K.gif +0 -0
- data/doc/ex/images/Button_L.gif +0 -0
- data/doc/ex/images/Button_M.gif +0 -0
- data/doc/ex/images/Button_N.gif +0 -0
- data/doc/ex/images/Button_O.gif +0 -0
- data/doc/ex/images/Button_P.gif +0 -0
- data/doc/ex/images/Button_Q.gif +0 -0
- data/doc/ex/images/Button_R.gif +0 -0
- data/doc/ex/images/Button_S.gif +0 -0
- data/doc/ex/images/Button_T.gif +0 -0
- data/doc/ex/images/Button_U.gif +0 -0
- data/doc/ex/images/Button_V.gif +0 -0
- data/doc/ex/images/Button_W.gif +0 -0
- data/doc/ex/images/Button_X.gif +0 -0
- data/doc/ex/images/Button_Y.gif +0 -0
- data/doc/ex/images/Button_Z.gif +0 -0
- data/doc/ex/images/Cheetah.jpg +0 -0
- data/doc/ex/images/Coffee.wmf +0 -0
- data/doc/ex/images/Flower_Hat.jpg +0 -0
- data/doc/ex/images/Gold_Statue.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons.jpg +0 -0
- data/doc/ex/images/Hot_Air_Balloons_H.jpg +0 -0
- data/doc/ex/images/Leaf.miff +0 -0
- data/doc/ex/images/No.wmf +0 -0
- data/doc/ex/images/Polynesia.jpg +0 -0
- data/doc/ex/images/Red_Rocks.jpg +0 -0
- data/doc/ex/images/Rocks_On_Beach.miff +0 -0
- data/doc/ex/images/Shorts.jpg +0 -0
- data/doc/ex/images/Snake.wmf +0 -0
- data/doc/ex/images/Violin.jpg +0 -0
- data/doc/ex/images/Yellow_Rose.miff +0 -0
- data/doc/ex/images/big-duck.gif +0 -0
- data/doc/ex/images/duck.gif +0 -0
- data/doc/ex/images/duck0.gif +0 -0
- data/doc/ex/images/duck1.gif +0 -0
- data/doc/ex/images/duck10.gif +0 -0
- data/doc/ex/images/duck11.gif +0 -0
- data/doc/ex/images/duck12.gif +0 -0
- data/doc/ex/images/duck13.gif +0 -0
- data/doc/ex/images/duck14.gif +0 -0
- data/doc/ex/images/duck15.gif +0 -0
- data/doc/ex/images/duck2.gif +0 -0
- data/doc/ex/images/duck3.gif +0 -0
- data/doc/ex/images/duck4.gif +0 -0
- data/doc/ex/images/duck5.gif +0 -0
- data/doc/ex/images/duck6.gif +0 -0
- data/doc/ex/images/duck7.gif +0 -0
- data/doc/ex/images/duck8.gif +0 -0
- data/doc/ex/images/duck9.gif +0 -0
- data/doc/ex/images/graydient230x6.gif +0 -0
- data/doc/ex/images/logo400x83.gif +0 -0
- data/doc/ex/images/model.miff +0 -0
- data/doc/ex/images/notimplemented.gif +0 -0
- data/doc/ex/images/smile.miff +0 -0
- data/doc/ex/images/spin.gif +0 -0
- data/doc/ex/implode.rb +34 -0
- data/doc/ex/level.rb +11 -0
- data/doc/ex/level_colors.rb +11 -0
- data/doc/ex/line.rb +42 -0
- data/doc/ex/line01.rb +23 -0
- data/doc/ex/mask.rb +36 -0
- data/doc/ex/matte_fill_to_border.rb +40 -0
- data/doc/ex/matte_floodfill.rb +33 -0
- data/doc/ex/matte_replace.rb +40 -0
- data/doc/ex/median_filter.rb +28 -0
- data/doc/ex/modulate.rb +11 -0
- data/doc/ex/mono.rb +23 -0
- data/doc/ex/morph.rb +26 -0
- data/doc/ex/mosaic.rb +35 -0
- data/doc/ex/motion_blur.rb +11 -0
- data/doc/ex/negate.rb +11 -0
- data/doc/ex/negate_channel.rb +9 -0
- data/doc/ex/nested_rvg.rb +21 -0
- data/doc/ex/nonzero.rb +43 -0
- data/doc/ex/normalize.rb +11 -0
- data/doc/ex/oil_paint.rb +11 -0
- data/doc/ex/opacity.rb +37 -0
- data/doc/ex/ordered_dither.rb +11 -0
- data/doc/ex/path.rb +64 -0
- data/doc/ex/pattern1.rb +25 -0
- data/doc/ex/pattern2.rb +26 -0
- data/doc/ex/polaroid.rb +28 -0
- data/doc/ex/polygon.rb +24 -0
- data/doc/ex/polygon01.rb +23 -0
- data/doc/ex/polyline.rb +23 -0
- data/doc/ex/polyline01.rb +23 -0
- data/doc/ex/posterize.rb +8 -0
- data/doc/ex/preview.rb +9 -0
- data/doc/ex/qbezierpath.rb +52 -0
- data/doc/ex/quad01.rb +36 -0
- data/doc/ex/quantize-m.rb +25 -0
- data/doc/ex/radial_blur.rb +9 -0
- data/doc/ex/raise.rb +8 -0
- data/doc/ex/random_threshold_channel.rb +13 -0
- data/doc/ex/rect01.rb +15 -0
- data/doc/ex/rect02.rb +22 -0
- data/doc/ex/rectangle.rb +35 -0
- data/doc/ex/reduce_noise.rb +28 -0
- data/doc/ex/remap.rb +12 -0
- data/doc/ex/remap_images.rb +21 -0
- data/doc/ex/resize_to_fill.rb +10 -0
- data/doc/ex/resize_to_fit.rb +10 -0
- data/doc/ex/roll.rb +9 -0
- data/doc/ex/rotate.rb +45 -0
- data/doc/ex/rotate_f.rb +14 -0
- data/doc/ex/roundrect.rb +34 -0
- data/doc/ex/rubyname.rb +30 -0
- data/doc/ex/rvg_clippath.rb +14 -0
- data/doc/ex/rvg_linecap.rb +43 -0
- data/doc/ex/rvg_linejoin.rb +41 -0
- data/doc/ex/rvg_opacity.rb +19 -0
- data/doc/ex/rvg_pattern.rb +26 -0
- data/doc/ex/rvg_stroke_dasharray.rb +12 -0
- data/doc/ex/segment.rb +11 -0
- data/doc/ex/sepiatone.rb +8 -0
- data/doc/ex/shade.rb +11 -0
- data/doc/ex/shadow.rb +31 -0
- data/doc/ex/shave.rb +15 -0
- data/doc/ex/shear.rb +10 -0
- data/doc/ex/sketch.rb +18 -0
- data/doc/ex/skewx.rb +52 -0
- data/doc/ex/skewy.rb +47 -0
- data/doc/ex/smile.rb +125 -0
- data/doc/ex/solarize.rb +11 -0
- data/doc/ex/sparse_color.rb +55 -0
- data/doc/ex/splice.rb +9 -0
- data/doc/ex/spread.rb +11 -0
- data/doc/ex/stegano.rb +55 -0
- data/doc/ex/stroke_dasharray.rb +43 -0
- data/doc/ex/stroke_fill.rb +11 -0
- data/doc/ex/stroke_linecap.rb +44 -0
- data/doc/ex/stroke_linejoin.rb +48 -0
- data/doc/ex/stroke_width.rb +49 -0
- data/doc/ex/swirl.rb +17 -0
- data/doc/ex/text.rb +37 -0
- data/doc/ex/text01.rb +17 -0
- data/doc/ex/text_align.rb +36 -0
- data/doc/ex/text_antialias.rb +38 -0
- data/doc/ex/text_styles.rb +21 -0
- data/doc/ex/text_undercolor.rb +28 -0
- data/doc/ex/texture_fill_to_border.rb +34 -0
- data/doc/ex/texture_floodfill.rb +32 -0
- data/doc/ex/texturefill.rb +25 -0
- data/doc/ex/threshold.rb +13 -0
- data/doc/ex/to_blob.rb +14 -0
- data/doc/ex/translate.rb +39 -0
- data/doc/ex/transparent.rb +38 -0
- data/doc/ex/transpose.rb +9 -0
- data/doc/ex/transverse.rb +9 -0
- data/doc/ex/tref01.rb +25 -0
- data/doc/ex/triangle01.rb +16 -0
- data/doc/ex/trim.rb +24 -0
- data/doc/ex/tspan01.rb +18 -0
- data/doc/ex/tspan02.rb +19 -0
- data/doc/ex/tspan03.rb +21 -0
- data/doc/ex/unsharp_mask.rb +28 -0
- data/doc/ex/viewex.rb +35 -0
- data/doc/ex/vignette.rb +12 -0
- data/doc/ex/watermark.rb +28 -0
- data/doc/ex/wave.rb +9 -0
- data/doc/ex/wet_floor.rb +59 -0
- data/doc/ex/writing_mode01.rb +27 -0
- data/doc/ex/writing_mode02.rb +26 -0
- data/doc/ilist.html +2056 -0
- data/doc/image1.html +4680 -0
- data/doc/image2.html +3665 -0
- data/doc/image3.html +4522 -0
- data/doc/imageattrs.html +1638 -0
- data/doc/imusage.html +514 -0
- data/doc/index.html +416 -0
- data/doc/info.html +1499 -0
- data/doc/magick.html +565 -0
- data/doc/optequiv.html +2435 -0
- data/doc/rvg.html +975 -0
- data/doc/rvgclip.html +248 -0
- data/doc/rvggroup.html +305 -0
- data/doc/rvgimage.html +289 -0
- data/doc/rvgpattern.html +475 -0
- data/doc/rvgshape.html +406 -0
- data/doc/rvgstyle.html +270 -0
- data/doc/rvgtext.html +465 -0
- data/doc/rvgtspan.html +238 -0
- data/doc/rvgtut.html +530 -0
- data/doc/rvguse.html +145 -0
- data/doc/rvgxform.html +294 -0
- data/doc/scripts/doc.js +22 -0
- data/doc/scripts/stripeTables.js +23 -0
- data/doc/struct.html +1339 -0
- data/doc/usage.html +1621 -0
- data/examples/constitute.rb +7 -0
- data/examples/crop_with_gravity.rb +46 -0
- data/examples/demo.rb +324 -0
- data/examples/describe.rb +44 -0
- data/examples/find_similar_region.rb +34 -0
- data/examples/histogram.rb +325 -0
- data/examples/identify.rb +187 -0
- data/examples/image_opacity.rb +29 -0
- data/examples/import_export.rb +31 -0
- data/examples/pattern_fill.rb +38 -0
- data/examples/rotating_text.rb +45 -0
- data/examples/spinner.rb +50 -0
- data/examples/thumbnail.rb +65 -0
- data/examples/vignette.rb +79 -0
- data/ext/RMagick/Makefile +180 -0
- data/ext/RMagick/RMagick2.so +0 -0
- data/ext/RMagick/extconf.h +119 -0
- data/ext/RMagick/extconf.rb +406 -0
- data/ext/RMagick/mkmf.log +3022 -0
- data/ext/RMagick/rmagick.c +394 -0
- data/ext/RMagick/rmagick.h +1307 -0
- data/ext/RMagick/rmagick.o +0 -0
- data/ext/RMagick/rmdraw.c +1991 -0
- data/ext/RMagick/rmdraw.o +0 -0
- data/ext/RMagick/rmenum.c +1224 -0
- data/ext/RMagick/rmenum.o +0 -0
- data/ext/RMagick/rmfill.c +717 -0
- data/ext/RMagick/rmfill.o +0 -0
- data/ext/RMagick/rmilist.c +1217 -0
- data/ext/RMagick/rmilist.o +0 -0
- data/ext/RMagick/rmimage.c +15099 -0
- data/ext/RMagick/rmimage.o +0 -0
- data/ext/RMagick/rminfo.c +2567 -0
- data/ext/RMagick/rminfo.o +0 -0
- data/ext/RMagick/rmmain.c +1705 -0
- data/ext/RMagick/rmmain.o +0 -0
- data/ext/RMagick/rmmontage.c +511 -0
- data/ext/RMagick/rmmontage.o +0 -0
- data/ext/RMagick/rmpixel.c +1103 -0
- data/ext/RMagick/rmpixel.o +0 -0
- data/ext/RMagick/rmstruct.c +1047 -0
- data/ext/RMagick/rmstruct.o +0 -0
- data/ext/RMagick/rmutil.c +1730 -0
- data/ext/RMagick/rmutil.o +0 -0
- data/lib/RMagick.rb +1962 -0
- data/lib/rvg/clippath.rb +48 -0
- data/lib/rvg/container.rb +131 -0
- data/lib/rvg/deep_equal.rb +56 -0
- data/lib/rvg/describable.rb +53 -0
- data/lib/rvg/embellishable.rb +417 -0
- data/lib/rvg/misc.rb +740 -0
- data/lib/rvg/paint.rb +55 -0
- data/lib/rvg/pathdata.rb +131 -0
- data/lib/rvg/rvg.rb +283 -0
- data/lib/rvg/stretchable.rb +168 -0
- data/lib/rvg/stylable.rb +124 -0
- data/lib/rvg/text.rb +187 -0
- data/lib/rvg/to_c.rb +103 -0
- data/lib/rvg/transformable.rb +133 -0
- data/lib/rvg/units.rb +66 -0
- data/metaconfig +7 -0
- data/post-clean.rb +12 -0
- data/post-install.rb +50 -0
- data/post-setup.rb +254 -0
- data/rmagick.gemspec +20 -0
- data/setup.rb +1585 -0
- data/test/Draw.rb +121 -0
- data/test/Image1.rb +762 -0
- data/test/Image2.rb +1308 -0
- data/test/Image3.rb +1001 -0
- data/test/ImageList1.rb +808 -0
- data/test/ImageList2.rb +389 -0
- data/test/Image_attributes.rb +682 -0
- data/test/Import_Export.rb +116 -0
- data/test/Info.rb +349 -0
- data/test/Magick.rb +364 -0
- data/test/Pixel.rb +120 -0
- data/test/Preview.rb +62 -0
- data/test/all_basic.rb +39 -0
- data/test/cmyk.icm +0 -0
- data/test/srgb.icm +0 -0
- data/test/test.0 +0 -0
- data/uninstall.rb +74 -0
- metadata +455 -0
data/doc/image2.html
ADDED
@@ -0,0 +1,3665 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
+
<head>
|
6
|
+
<meta name="generator" content=
|
7
|
+
"HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
|
8
|
+
|
9
|
+
<title>RMagick 0.0.0: class Image (instance methods e-o)</title>
|
10
|
+
<meta http-equiv="Content-Type" content=
|
11
|
+
"text/html; charset=us-ascii" />
|
12
|
+
<meta name="GENERATOR" content="Quanta Plus" />
|
13
|
+
<meta name="Copyright" content=
|
14
|
+
"Copyright (C) 2006 by Timothy P. Hunter" />
|
15
|
+
<link rel="stylesheet" type="text/css" href="css/doc.css" />
|
16
|
+
<script type="text/javascript" src="scripts/doc.js">
|
17
|
+
</script>
|
18
|
+
<script type="text/javascript" src="scripts/stripeTables.js">
|
19
|
+
</script>
|
20
|
+
<script type="text/javascript">
|
21
|
+
//<![CDATA[
|
22
|
+
addLoadEvent(stripeTables);
|
23
|
+
//]]>
|
24
|
+
</script>
|
25
|
+
<script type="text/javascript">
|
26
|
+
//<![CDATA[
|
27
|
+
<!-- Pre-load this image so that the browser knows how big it is. -->
|
28
|
+
<!-- Begin
|
29
|
+
flower_hat = new Image();
|
30
|
+
flower_hat.src = "ex/images/Flower_Hat.jpg";
|
31
|
+
// End -->
|
32
|
+
//]]>
|
33
|
+
</script>
|
34
|
+
<style type="text/css">
|
35
|
+
/*<![CDATA[*/
|
36
|
+
#iptc {
|
37
|
+
border: thin solid black;
|
38
|
+
}
|
39
|
+
#iptc th {
|
40
|
+
background-color: #c0c0c0;
|
41
|
+
}
|
42
|
+
td.ds {
|
43
|
+
text-align: right;
|
44
|
+
}
|
45
|
+
/*]]>*/
|
46
|
+
</style>
|
47
|
+
</head>
|
48
|
+
|
49
|
+
<body>
|
50
|
+
<h6 id="header">RMagick 0.0.0 User's Guide and Reference</h6>
|
51
|
+
|
52
|
+
<div class="nav">
|
53
|
+
« <a href="image1.html">Prev</a> | <a href=
|
54
|
+
"index.html">Contents</a> | <a href=
|
55
|
+
"image3.html">Next</a> »
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<h1>class Image <span class="superclass">< Object</span>
|
59
|
+
(instance methods e-o)<br />
|
60
|
+
<span class="mixin">mixes in Comparable</span></h1>
|
61
|
+
|
62
|
+
<div id="toc">
|
63
|
+
<h2>Table of Contents</h2>
|
64
|
+
|
65
|
+
<h3>instance methods</h3>
|
66
|
+
|
67
|
+
<div>
|
68
|
+
<div class="toccol">
|
69
|
+
<ul>
|
70
|
+
<li><a href=
|
71
|
+
"#each_iptc_dataset">each_iptc_dataset</a></li>
|
72
|
+
|
73
|
+
<li><a href="#each_pixel">each_pixel</a></li>
|
74
|
+
|
75
|
+
<li><a href="#each_profile">each_profile</a></li>
|
76
|
+
|
77
|
+
<li><a href="#edge">edge</a></li>
|
78
|
+
|
79
|
+
<li><a href="#emboss">emboss</a></li>
|
80
|
+
|
81
|
+
<li><a href="#encipher">encipher</a></li>
|
82
|
+
|
83
|
+
<li><a href="#enhance">enhance</a></li>
|
84
|
+
|
85
|
+
<li><a href="#equalize">equalize</a></li>
|
86
|
+
|
87
|
+
<li><a href="#equalize_channel">equalize_channel</a></li>
|
88
|
+
|
89
|
+
<li><a href="#erase_bang">erase!</a></li>
|
90
|
+
|
91
|
+
<li><a href="#excerpt">excerpt</a></li>
|
92
|
+
|
93
|
+
<li><a href="#excerpt_bang">excerpt!</a></li>
|
94
|
+
|
95
|
+
<li><a href="#export_pixels">export_pixels</a></li>
|
96
|
+
|
97
|
+
<li><a href=
|
98
|
+
"#export_pixels_to_str">export_pixels_to_str</a></li>
|
99
|
+
|
100
|
+
<li><a href="#extent">extent</a></li>
|
101
|
+
|
102
|
+
<li><a href=
|
103
|
+
"#find_similar_region">find_similar_region</a></li>
|
104
|
+
|
105
|
+
<li><a href="#flip">flip</a></li>
|
106
|
+
|
107
|
+
<li><a href="#flip_bang">flip!</a></li>
|
108
|
+
|
109
|
+
<li><a href="#flop">flop</a></li>
|
110
|
+
|
111
|
+
<li><a href="#flop_bang">flop!</a></li>
|
112
|
+
|
113
|
+
<li><a href="#frame">frame</a></li>
|
114
|
+
|
115
|
+
<li><a href="#freeze">freeze</a></li>
|
116
|
+
|
117
|
+
<li><a href="#function_channel">function_channel</a></li>
|
118
|
+
</ul>
|
119
|
+
</div>
|
120
|
+
|
121
|
+
<div class="toccol">
|
122
|
+
<ul>
|
123
|
+
<li><a href="#gamma_channel">gamma_channel</a></li>
|
124
|
+
|
125
|
+
<li><a href="#gamma_correct">gamma_correct</a></li>
|
126
|
+
|
127
|
+
<li><a href="#gaussian_blur">gaussian_blur</a></li>
|
128
|
+
|
129
|
+
<li><a href=
|
130
|
+
"#gaussian_blur_channel">gaussian_blur_channel</a></li>
|
131
|
+
|
132
|
+
<li><a href=
|
133
|
+
"#get_exif_by_entry">get_exif_by_entry</a></li>
|
134
|
+
|
135
|
+
<li><a href=
|
136
|
+
"#get_exif_by_number">get_exif_by_number</a></li>
|
137
|
+
|
138
|
+
<li><a href="#get_iptc_dataset">get_iptc_dataset</a></li>
|
139
|
+
|
140
|
+
<li><a href="#get_pixels">get_pixels</a></li>
|
141
|
+
|
142
|
+
<li><a href="#gray_q">gray?</a></li>
|
143
|
+
|
144
|
+
<li><a href="#grey_q">grey?</a></li>
|
145
|
+
|
146
|
+
<li><a href="#histogram_q">histogram?</a></li>
|
147
|
+
|
148
|
+
<li><a href="#implode">implode</a></li>
|
149
|
+
|
150
|
+
<li><a href="#import_pixels">import_pixels</a></li>
|
151
|
+
|
152
|
+
<li><a href="#inspect">inspect</a></li>
|
153
|
+
|
154
|
+
<li><a href="#level">level</a></li>
|
155
|
+
|
156
|
+
<li><a href="#level_channel">level_channel</a></li>
|
157
|
+
|
158
|
+
<li><a href="#level_colors">level_colors</a></li>
|
159
|
+
|
160
|
+
<li><a href="#levelize_channel">levelize_channel</a></li>
|
161
|
+
|
162
|
+
<li><a href="#linear_stretch">linear_stretch</a></li>
|
163
|
+
|
164
|
+
<li><a href="#liquid_rescale">liquid_rescale</a></li>
|
165
|
+
|
166
|
+
<li><a href="#magnify">magnify</a></li>
|
167
|
+
|
168
|
+
<li><a href="#magnify_bang">magnify!</a></li>
|
169
|
+
</ul>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
<div class="toccol">
|
173
|
+
<ul>
|
174
|
+
<li><a href="#mask">mask</a></li>
|
175
|
+
|
176
|
+
<li><a href="#map">map</a></li>
|
177
|
+
|
178
|
+
<li><a href=
|
179
|
+
"#matte_fill_to_border">matte_fill_to_border</a></li>
|
180
|
+
|
181
|
+
<li><a href="#matte_floodfill">matte_floodfill</a></li>
|
182
|
+
|
183
|
+
<li><a href="#matte_point">matte_point</a></li>
|
184
|
+
|
185
|
+
<li><a href="#matte_replace">matte_replace</a></li>
|
186
|
+
|
187
|
+
<li><a href="#matte_reset_bang">matte_reset!</a></li>
|
188
|
+
|
189
|
+
<li><a href="#median_filter">median_filter</a></li>
|
190
|
+
|
191
|
+
<li><a href="#minify">minify</a></li>
|
192
|
+
|
193
|
+
<li><a href="#minify_bang">minify!</a></li>
|
194
|
+
|
195
|
+
<li><a href="#modulate">modulate</a></li>
|
196
|
+
|
197
|
+
<li><a href="#monochrome_q">monochrome?</a></li>
|
198
|
+
|
199
|
+
<li><a href="#motion_blur">motion_blur</a></li>
|
200
|
+
|
201
|
+
<li><a href="#negate">negate</a></li>
|
202
|
+
|
203
|
+
<li><a href="#negate_channel">negate_channel</a></li>
|
204
|
+
|
205
|
+
<li><a href="#normalize">normalize</a></li>
|
206
|
+
|
207
|
+
<li><a href=
|
208
|
+
"#normalize_channel">normalize_channel</a></li>
|
209
|
+
|
210
|
+
<li><a href="#oil_paint">oil_paint</a></li>
|
211
|
+
|
212
|
+
<li><a href="#opaque">opaque</a></li>
|
213
|
+
|
214
|
+
<li><a href="#opaque_channel">opaque_channel</a></li>
|
215
|
+
|
216
|
+
<li><a href="#opaque_q">opaque?</a></li>
|
217
|
+
|
218
|
+
<li><a href="#ordered_dither">ordered_dither</a></li>
|
219
|
+
</ul>
|
220
|
+
</div>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<h2 class="methods">instance methods</h2>
|
225
|
+
|
226
|
+
<div class="sig">
|
227
|
+
<h3 id="each_iptc_dataset">each_iptc_dataset</h3>
|
228
|
+
|
229
|
+
<p><span class="arg">img</span>.each_iptc_dataset {
|
230
|
+
|<span class="arg">dataset</span>, <span class=
|
231
|
+
"arg">data_field</span>| <span class="arg">block</span>} ->
|
232
|
+
<code>nil</code></p>
|
233
|
+
</div>
|
234
|
+
|
235
|
+
<div class="desc">
|
236
|
+
<h4>Description</h4>
|
237
|
+
|
238
|
+
<p>Iterates over the IPTC DataSet constants in Magick::IPTC. If
|
239
|
+
the image's IPTC profile has the DataSet and the data field has
|
240
|
+
non-0 length, yields to the block. The IPTC DataSet constants
|
241
|
+
are listed <a href="image2.html#get_iptc_dataset">here</a>.</p>
|
242
|
+
|
243
|
+
<h4>Arguments</h4>
|
244
|
+
|
245
|
+
<p>The block arguments are:</p>
|
246
|
+
|
247
|
+
<dl>
|
248
|
+
<dt>dataset</dt>
|
249
|
+
|
250
|
+
<dd>The DataSet name</dd>
|
251
|
+
|
252
|
+
<dt>data_field</dt>
|
253
|
+
|
254
|
+
<dd>The data field</dd>
|
255
|
+
</dl>
|
256
|
+
|
257
|
+
<h4>See also</h4>
|
258
|
+
|
259
|
+
<p><a href=
|
260
|
+
"image2.html#get_iptc_dataset">get_iptc_dataset</a></p>
|
261
|
+
</div>
|
262
|
+
|
263
|
+
<div class="sig">
|
264
|
+
<h3 id="each_pixel">each_pixel</h3>
|
265
|
+
|
266
|
+
<p><span class="arg">img</span>.each_pixel {|<span class=
|
267
|
+
"arg">pixel</span>, <span class="arg">c</span>, <span class=
|
268
|
+
"arg">r</span>| <span class="arg">block</span> } ->
|
269
|
+
<em>self</em></p>
|
270
|
+
</div>
|
271
|
+
|
272
|
+
<div class="desc">
|
273
|
+
<h4>Description</h4>
|
274
|
+
|
275
|
+
<p>Calls <span class="arg">block</span> with 3 arguments, a
|
276
|
+
<span class="arg">pixel</span> from <span class=
|
277
|
+
"arg">img</span>, its column number <span class="arg">c</span>,
|
278
|
+
and its row number <span class="arg">r</span>, for all the
|
279
|
+
pixels in the image. The pixels are enumerated from
|
280
|
+
top-to-bottom and left-to-right.</p>
|
281
|
+
|
282
|
+
<h4>Returns</h4>
|
283
|
+
|
284
|
+
<p>self</p>
|
285
|
+
|
286
|
+
<h4>See also</h4>
|
287
|
+
|
288
|
+
<p><a href="image2.html#get_pixels">get_pixels</a></p>
|
289
|
+
</div>
|
290
|
+
|
291
|
+
<div class="sig">
|
292
|
+
<h3 id="each_profile">each_profile</h3>
|
293
|
+
|
294
|
+
<p><span class="arg">img</span>.each_profile {|<span class=
|
295
|
+
"arg">name</span>, <span class="arg">value</span>| <span class=
|
296
|
+
"arg">block</span>} -> <em>???</em> (see Returns)</p>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
<div class="desc">
|
300
|
+
<h4>Description</h4>Calls <span class="arg">block</span> once
|
301
|
+
for each profile in the image, passing the profile name and
|
302
|
+
value as parameters.
|
303
|
+
|
304
|
+
<h4>Returns</h4>
|
305
|
+
|
306
|
+
<p>the last value returned by the block</p>
|
307
|
+
|
308
|
+
<h4>See also</h4>
|
309
|
+
|
310
|
+
<p>The <a href=
|
311
|
+
"imageattrs.html#color_profile">color_profile</a> and <a href=
|
312
|
+
"imageattrs.html#iptc_profile">iptc_profile</a> attributes
|
313
|
+
return the ICC and IPTC profiles, respectively.</p>
|
314
|
+
|
315
|
+
<h4>Magick API</h4>
|
316
|
+
|
317
|
+
<p>GetNextImageProfile</p>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
<div class="sig">
|
321
|
+
<h3 id="edge">edge</h3>
|
322
|
+
|
323
|
+
<p><span class="arg">img</span>.edge(<span class=
|
324
|
+
"arg">radius</span>=0.0) -> <em>image</em></p>
|
325
|
+
</div>
|
326
|
+
|
327
|
+
<div class="desc">
|
328
|
+
<h4>Description</h4>Finds edges in the image.
|
329
|
+
|
330
|
+
<h4>Arguments</h4>The radius of the convolution filter. If the
|
331
|
+
radius is 0, <code>edge</code> selects a suitable default.
|
332
|
+
|
333
|
+
<h4>Returns</h4>
|
334
|
+
|
335
|
+
<p>A new image</p>
|
336
|
+
|
337
|
+
<h4>Example</h4>
|
338
|
+
|
339
|
+
<p class="rollover"><a href=
|
340
|
+
"javascript:popup('edge.rb.html')"><img onmouseover=
|
341
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
342
|
+
"this.src='ex/edge.jpg'" src="ex/edge.jpg" alt="edge example"
|
343
|
+
title="Click the image to see the example script" /></a>
|
344
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
345
|
+
"Mouse over the example to see the original image" /></p>
|
346
|
+
|
347
|
+
<h4>Magick API</h4>
|
348
|
+
|
349
|
+
<p>EdgeImage</p>
|
350
|
+
</div>
|
351
|
+
|
352
|
+
<div class="sig">
|
353
|
+
<h3 id="emboss">emboss</h3>
|
354
|
+
|
355
|
+
<p><span class="arg">img</span>.emboss(<span class=
|
356
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
|
357
|
+
-> <em>image</em></p>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
<div class="desc">
|
361
|
+
<h4>Description</h4>Adds a 3-dimensional effect.
|
362
|
+
|
363
|
+
<h4>Arguments</h4>
|
364
|
+
|
365
|
+
<dl>
|
366
|
+
<dt>radius</dt>
|
367
|
+
|
368
|
+
<dd>The radius of the Gaussian operator.</dd>
|
369
|
+
|
370
|
+
<dt>sigma</dt>
|
371
|
+
|
372
|
+
<dd>The sigma (standard deviation) of the Gaussian operator.
|
373
|
+
This value cannot be 0.0.</dd>
|
374
|
+
</dl>
|
375
|
+
|
376
|
+
<h4>Returns</h4>
|
377
|
+
|
378
|
+
<p>A new image</p>
|
379
|
+
|
380
|
+
<h4>Example</h4>
|
381
|
+
|
382
|
+
<p class="rollover"><a href=
|
383
|
+
"javascript:popup('emboss.rb.html')"><img onmouseover=
|
384
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
385
|
+
"this.src='ex/emboss.jpg'" src="ex/emboss.jpg" alt=
|
386
|
+
"emboss example" title=
|
387
|
+
"Click the image to see the example script" /></a><img src=
|
388
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
389
|
+
"Mouse over the example to see the original image" /></p>
|
390
|
+
|
391
|
+
<h4>Magick API</h4>
|
392
|
+
|
393
|
+
<p>EmbossImage</p>
|
394
|
+
</div>
|
395
|
+
|
396
|
+
<div class="sig">
|
397
|
+
<h3 id="encipher">encipher</h3>
|
398
|
+
|
399
|
+
<p><span class="arg">img</span>.encipher(<span class=
|
400
|
+
"arg">passphrase</span>) -> <em>image</em></p>
|
401
|
+
</div>
|
402
|
+
|
403
|
+
<div class="desc">
|
404
|
+
<h4>Description</h4>
|
405
|
+
|
406
|
+
<p>Encipher an image.</p>
|
407
|
+
|
408
|
+
<h4>Arguments</h4>
|
409
|
+
|
410
|
+
<p>The passphrase.</p>
|
411
|
+
|
412
|
+
<h4>Returns</h4>
|
413
|
+
|
414
|
+
<p>A new image</p>
|
415
|
+
|
416
|
+
<h4>Example</h4>
|
417
|
+
<pre>
|
418
|
+
enciphered_img = img.encipher("magic word")
|
419
|
+
</pre>
|
420
|
+
|
421
|
+
<h4>Magick API</h4>
|
422
|
+
|
423
|
+
<p>EncipherImage</p>
|
424
|
+
|
425
|
+
<h4>See also</h4>
|
426
|
+
|
427
|
+
<p><a href="image1.html#decipher">decipher</a></p>
|
428
|
+
</div>
|
429
|
+
|
430
|
+
<div class="sig">
|
431
|
+
<h3 id="enhance">enhance</h3>
|
432
|
+
|
433
|
+
<p><span class="arg">img</span>.enhance ->
|
434
|
+
<em>image</em></p>
|
435
|
+
</div>
|
436
|
+
|
437
|
+
<div class="desc">
|
438
|
+
<h4>Description</h4>
|
439
|
+
|
440
|
+
<p class="imquote">Applies a digital filter that improves the
|
441
|
+
quality of a noisy image.</p>
|
442
|
+
|
443
|
+
<h4>Returns</h4>
|
444
|
+
|
445
|
+
<p>A new image</p>
|
446
|
+
|
447
|
+
<h4>Example</h4>
|
448
|
+
|
449
|
+
<p>The left-hand side has had noise added by <code><a href=
|
450
|
+
"#add_noise">add_noise</a></code>. The right-hand side is the
|
451
|
+
result after using <code>enhance</code>.</p>
|
452
|
+
|
453
|
+
<p><a href="javascript:popup('enhance.rb.html')"><img src=
|
454
|
+
"ex/enhance.jpg" alt="enhance example" title=
|
455
|
+
"Click to see the example script" /></a></p>
|
456
|
+
|
457
|
+
<h4>See also</h4>
|
458
|
+
|
459
|
+
<p><a href="image2.html#median_filter">median_filter</a>,
|
460
|
+
<a href="image3.html#reduce_noise">reduce_noise</a>, <a href=
|
461
|
+
"image3.html#unsharp_mask">unsharp_mask</a></p>
|
462
|
+
|
463
|
+
<h4>Magick API</h4>
|
464
|
+
|
465
|
+
<p>EnhanceImage</p>
|
466
|
+
</div>
|
467
|
+
|
468
|
+
<div class="sig">
|
469
|
+
<h3 id="equalize">equalize</h3>
|
470
|
+
|
471
|
+
<p><span class="arg">img</span>.equalize ->
|
472
|
+
<em>image</em></p>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
<div class="desc">
|
476
|
+
<h4>Description</h4>
|
477
|
+
|
478
|
+
<p class="imquote">Applies a histogram equalization to the
|
479
|
+
image.</p>
|
480
|
+
|
481
|
+
<h4>Returns</h4>
|
482
|
+
|
483
|
+
<p>A new image</p>
|
484
|
+
|
485
|
+
<h4>Example</h4>
|
486
|
+
|
487
|
+
<p class="rollover"><a href=
|
488
|
+
"javascript:popup('equalize.rb.html')"><img onmouseover=
|
489
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
490
|
+
"this.src='ex/equalize.jpg'" src="ex/equalize.jpg" alt=
|
491
|
+
"equalize example" title=
|
492
|
+
"Click to see the example script" /></a> <img src=
|
493
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
494
|
+
"Mouse over the example to see the original image" /></p>
|
495
|
+
|
496
|
+
<h4>Magick API</h4>
|
497
|
+
|
498
|
+
<p>EqualizeImage</p>
|
499
|
+
|
500
|
+
<h4>See also</h4>
|
501
|
+
|
502
|
+
<p><a href="#equalize_channel">equalize_channel</a></p>
|
503
|
+
</div>
|
504
|
+
|
505
|
+
<div class="sig">
|
506
|
+
<h3 id="equalize_channel">equalize_chanel</h3>
|
507
|
+
|
508
|
+
<p><span class="arg">img</span>.equalize_channel(<span class=
|
509
|
+
"arg">[channel...]</span>) -> <em>image</em></p>
|
510
|
+
</div>
|
511
|
+
|
512
|
+
<div class="desc">
|
513
|
+
<h4>Description</h4>
|
514
|
+
|
515
|
+
<p><span class="imquote">Applies a histogram equalization to
|
516
|
+
the image.</span> Only the specified channels are
|
517
|
+
equalized.</p>
|
518
|
+
|
519
|
+
<h4>Arguments</h4>
|
520
|
+
|
521
|
+
<dl>
|
522
|
+
<dt>channel...</dt>
|
523
|
+
|
524
|
+
<dd>0 or more <a href=
|
525
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
526
|
+
channels are specified, all the channels are normalized.
|
527
|
+
Specifying no channel arguments has the same effect as the
|
528
|
+
equalize method, above.</dd>
|
529
|
+
</dl>
|
530
|
+
|
531
|
+
<h4>Returns</h4>
|
532
|
+
|
533
|
+
<p>A new image</p>
|
534
|
+
|
535
|
+
<h4>Magick API</h4>
|
536
|
+
|
537
|
+
<p>EqualizeImageChannel</p>
|
538
|
+
|
539
|
+
<h4>See also</h4>
|
540
|
+
|
541
|
+
<p><a href="#equalize">equalize</a></p>
|
542
|
+
</div>
|
543
|
+
|
544
|
+
<div class="sig">
|
545
|
+
<h3 id="erase_bang">erase!</h3>
|
546
|
+
|
547
|
+
<p><span class="arg">img</span>.erase! -> <em>self</em></p>
|
548
|
+
</div>
|
549
|
+
|
550
|
+
<div class="desc">
|
551
|
+
<h4>Description</h4>
|
552
|
+
|
553
|
+
<p>Sets the entire image to the <a href=
|
554
|
+
"imageattrs.html#background_color">background color</a>.</p>
|
555
|
+
|
556
|
+
<h4>Returns</h4>self
|
557
|
+
|
558
|
+
<h4>See also</h4>
|
559
|
+
|
560
|
+
<p><a href="image1.html#color_reset_bang">color_reset!</a></p>
|
561
|
+
|
562
|
+
<h4>Magick API</h4>
|
563
|
+
|
564
|
+
<p>SetImage</p>
|
565
|
+
</div>
|
566
|
+
|
567
|
+
<div class="sig">
|
568
|
+
<h3 id="excerpt">excerpt</h3>
|
569
|
+
|
570
|
+
<p><span class="arg">img</span>.excerpt(<span class=
|
571
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
572
|
+
"arg">width</span>, <span class="arg">height</span>) ->
|
573
|
+
image</p>
|
574
|
+
</div>
|
575
|
+
|
576
|
+
<div class="desc">
|
577
|
+
<h4>Description</h4>
|
578
|
+
|
579
|
+
<p>This method is very similar to <a href=
|
580
|
+
"image1.html#crop">crop</a>. It extracts the rectangle
|
581
|
+
specified by its arguments from the image and returns it as a
|
582
|
+
new image. However, excerpt <span class="imquote">does not
|
583
|
+
respect the virtual page offset and does not update the page
|
584
|
+
offset and is more efficient than cropping.</span></p>
|
585
|
+
|
586
|
+
<p>It is the caller's responsibility to ensure that the
|
587
|
+
rectangle lies entirely within the original image.</p>
|
588
|
+
|
589
|
+
<h4>Arguments</h4>
|
590
|
+
|
591
|
+
<dl>
|
592
|
+
<dt>x, y</dt>
|
593
|
+
|
594
|
+
<dd>The position of the upper-left corner of the excerpted
|
595
|
+
rectangle.</dd>
|
596
|
+
|
597
|
+
<dt>width, height</dt>
|
598
|
+
|
599
|
+
<dd>The width and height of the excerpted rectangle. The
|
600
|
+
resulting image will always be <span class=
|
601
|
+
"arg">width</span>x<span class="arg">height</span> in
|
602
|
+
size.</dd>
|
603
|
+
</dl>
|
604
|
+
|
605
|
+
<h4>Returns</h4>
|
606
|
+
|
607
|
+
<p>A new image</p>
|
608
|
+
|
609
|
+
<h4>See Also</h4>
|
610
|
+
|
611
|
+
<p><a href="image1.html#crop">crop</a>, <a href=
|
612
|
+
"#excerpt_bang">excerpt!</a></p>
|
613
|
+
|
614
|
+
<h4>Magick API</h4>
|
615
|
+
|
616
|
+
<p>ExcerptImage</p>
|
617
|
+
</div>
|
618
|
+
|
619
|
+
<div class="sig">
|
620
|
+
<h3 id="excerpt_bang">excerpt!</h3>
|
621
|
+
|
622
|
+
<p><span class="arg">img</span>.excerpt!(<span class=
|
623
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
624
|
+
"arg">width</span>, <span class="arg">height</span>) ->
|
625
|
+
<span class="arg">img</span></p>
|
626
|
+
</div>
|
627
|
+
|
628
|
+
<div class="desc">
|
629
|
+
<h4>Description</h4>
|
630
|
+
|
631
|
+
<p>In-place form of <a href="#excerpt">excerpt</a>.</p>
|
632
|
+
</div>
|
633
|
+
|
634
|
+
<div class="sig">
|
635
|
+
<h3 id="export_pixels">export_pixels</h3>
|
636
|
+
|
637
|
+
<p><span class="arg">img</span>.export_pixels(<span class=
|
638
|
+
"arg">x</span>=0, <span class="arg">y</span>=0, <span class=
|
639
|
+
"arg">columns</span>=<span class="arg">img</span>.columns,
|
640
|
+
<span class="arg">rows</span>=<span class=
|
641
|
+
"arg">img</span>.rows, <span class="arg">map</span>="RGB")
|
642
|
+
-> <em>array</em></p>
|
643
|
+
</div>
|
644
|
+
|
645
|
+
<div class="desc">
|
646
|
+
<h4>Description</h4>
|
647
|
+
|
648
|
+
<p>Extracts the pixel data from the specified rectangle and
|
649
|
+
returns it as an array of <code>Integer</code> values.</p>
|
650
|
+
|
651
|
+
<p>The array returned by <code>export_pixels</code> is suitable
|
652
|
+
for use as an argument to <code>import_pixels</code>.</p>
|
653
|
+
|
654
|
+
<h4>Arguments</h4>
|
655
|
+
|
656
|
+
<dl>
|
657
|
+
<dt>x, y</dt>
|
658
|
+
|
659
|
+
<dd>The offset of the rectangle from the upper-left corner of
|
660
|
+
the image.</dd>
|
661
|
+
|
662
|
+
<dt>columns, rows</dt>
|
663
|
+
|
664
|
+
<dd>The width and height of the rectangle.</dd>
|
665
|
+
|
666
|
+
<dt>map</dt>
|
667
|
+
|
668
|
+
<dd>A string that describes which pixel channel data is
|
669
|
+
desired and the order in which it should be stored.
|
670
|
+
<span class="imquote">It can be any combination or order of R
|
671
|
+
= red, G = green, B = blue, A = alpha, C = cyan, Y = yellow,
|
672
|
+
M = magenta, K = black, I = intensity (for grayscale), or P =
|
673
|
+
pad.</span></dd>
|
674
|
+
</dl>
|
675
|
+
|
676
|
+
<h4>Returns</h4>An array
|
677
|
+
|
678
|
+
<h4>Example</h4>
|
679
|
+
<pre>
|
680
|
+
# Export the r'th scanline from an image in red-green-blue order
|
681
|
+
scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
|
682
|
+
</pre>
|
683
|
+
|
684
|
+
<h4>See also</h4>
|
685
|
+
|
686
|
+
<p><a href="image1.html#dispatch">dispatch</a>, <a href=
|
687
|
+
"#export_pixels_to_str">export_pixels_to_str</a>, <a href=
|
688
|
+
"#import_pixels">import_pixels</a>, <a href=
|
689
|
+
"#get_pixels">get_pixels</a></p>
|
690
|
+
|
691
|
+
<h4>Magick API</h4>
|
692
|
+
|
693
|
+
<p>ExportImagePixels</p>
|
694
|
+
|
695
|
+
<h4>Note</h4>
|
696
|
+
|
697
|
+
<p>This method replaces the <code>dispatch</code> method.</p>
|
698
|
+
</div>
|
699
|
+
|
700
|
+
<div class="sig">
|
701
|
+
<h3 id="export_pixels_to_str">export_pixels_to_str</h3>
|
702
|
+
|
703
|
+
<p><span class=
|
704
|
+
"arg">img</span>.export_pixels_to_str(<span class=
|
705
|
+
"arg">x</span>=0, <span class="arg">y</span>=0, <span class=
|
706
|
+
"arg">columns</span>=<span class="arg">img</span>.columns,
|
707
|
+
<span class="arg">rows</span>=<span class=
|
708
|
+
"arg">img</span>.rows, <span class="arg">map</span>="RGB",
|
709
|
+
<span class="arg">type</span>=<code>CharPixel</code>) ->
|
710
|
+
<em>string</em></p>
|
711
|
+
</div>
|
712
|
+
|
713
|
+
<div class="desc">
|
714
|
+
<h4>Description</h4>
|
715
|
+
|
716
|
+
<p>Extracts the pixel data from the specified rectangle and
|
717
|
+
returns it as a string. If you need to get the pixel data in a
|
718
|
+
memory buffer (as input to another application, for example),
|
719
|
+
this method is much, much faster than <a href=
|
720
|
+
"#export_pixels">export_pixels</a> or <a href=
|
721
|
+
"#get_pixels">get_pixels</a>.</p>
|
722
|
+
|
723
|
+
<p>The string returned by <code>export_pixels_to_str</code> is
|
724
|
+
suitable for use as an argument to
|
725
|
+
<code>import_pixels</code>.</p>
|
726
|
+
|
727
|
+
<p><strong>Note:</strong> You can also use <a href=
|
728
|
+
"image3.html#to_blob">to_blob</a> to convert an image into a
|
729
|
+
string.</p>
|
730
|
+
|
731
|
+
<h4>Arguments</h4>
|
732
|
+
|
733
|
+
<dl>
|
734
|
+
<dt>x, y</dt>
|
735
|
+
|
736
|
+
<dd>The offset of the rectangle from the upper-left corner of
|
737
|
+
the image.</dd>
|
738
|
+
|
739
|
+
<dt>columns, rows</dt>
|
740
|
+
|
741
|
+
<dd>The width and height of the rectangle.</dd>
|
742
|
+
|
743
|
+
<dt>map</dt>
|
744
|
+
|
745
|
+
<dd>A string that describes which pixel channel data is
|
746
|
+
desired and the order in which it should be stored.
|
747
|
+
<span class="imquote">It can be any combination or order of R
|
748
|
+
= red, G = green, B = blue, A = alpha, C = cyan, Y = yellow,
|
749
|
+
M = magenta, K = black, I = intensity (for grayscale), or P =
|
750
|
+
pad.</span></dd>
|
751
|
+
|
752
|
+
<dt>type</dt>
|
753
|
+
|
754
|
+
<dd>A <a href="constants.html#StorageType">StorageType</a>
|
755
|
+
value that specifies the C datatype to which the pixel data
|
756
|
+
will be converted. The default is <code>CharPixel</code>,
|
757
|
+
which means that the pixel values will be stored as C
|
758
|
+
<code>unsigned char</code>s.</dd>
|
759
|
+
</dl>
|
760
|
+
|
761
|
+
<h4>Returns</h4>
|
762
|
+
|
763
|
+
<p>a string</p>
|
764
|
+
|
765
|
+
<h4>See also</h4>
|
766
|
+
|
767
|
+
<p><a href="image1.html#dispatch">dispatch</a>, <a href=
|
768
|
+
"#export_pixels">export_pixels</a>, <a href=
|
769
|
+
"#import_pixels">import_pixels</a>, <a href=
|
770
|
+
"#get_pixels">get_pixels</a></p>
|
771
|
+
|
772
|
+
<h4>Magick API</h4>
|
773
|
+
|
774
|
+
<p>ExportImagePixels</p>
|
775
|
+
</div>
|
776
|
+
|
777
|
+
<div class="sig">
|
778
|
+
<h3 id="extent">extent</h3>
|
779
|
+
|
780
|
+
<p><span class="arg">img</span>.extent(<span class=
|
781
|
+
"arg">width</span>, <span class="arg">height</span>,
|
782
|
+
<span class="arg">x</span>=0, <span class="arg">y</span>=0)
|
783
|
+
-> <em>image</em></p>
|
784
|
+
</div>
|
785
|
+
|
786
|
+
<div class="desc">
|
787
|
+
<h4>Description</h4>
|
788
|
+
|
789
|
+
<p>If <span class="arg">width</span> or <span class=
|
790
|
+
"arg">height</span> is greater than the target image's width or
|
791
|
+
height, extends the width and height of the target image to the
|
792
|
+
specified values. The new pixels are set to the background
|
793
|
+
color. If <span class="arg">width</span> or <span class=
|
794
|
+
"arg">height</span> is less than the target image's width or
|
795
|
+
height, crops the target image.</p>
|
796
|
+
|
797
|
+
<h4>Arguments</h4>
|
798
|
+
|
799
|
+
<dl>
|
800
|
+
<dt>width</dt>
|
801
|
+
|
802
|
+
<dd>The width of the new image</dd>
|
803
|
+
|
804
|
+
<dt>height</dt>
|
805
|
+
|
806
|
+
<dd>The height of the new image</dd>
|
807
|
+
|
808
|
+
<dt>x, y</dt>
|
809
|
+
|
810
|
+
<dd>The upper-left corner of the new image is positioned at
|
811
|
+
-<span class="arg">x</span>, -<span class=
|
812
|
+
"arg">y</span>.</dd>
|
813
|
+
</dl>
|
814
|
+
|
815
|
+
<h4>Returns</h4>
|
816
|
+
|
817
|
+
<p>A new image</p>
|
818
|
+
|
819
|
+
<h4>Notes</h4>
|
820
|
+
|
821
|
+
<p>The new image is composed over the background using the
|
822
|
+
composite operator specified by target image's <a href=
|
823
|
+
"imageattrs.html#compose">compose</a> attribute.</p>
|
824
|
+
|
825
|
+
<h4>Magick API</h4>
|
826
|
+
|
827
|
+
<p>ExtentImage</p>
|
828
|
+
</div>
|
829
|
+
|
830
|
+
<div class="sig">
|
831
|
+
<h3 id="find_similar_region">find_similar_region</h3>
|
832
|
+
|
833
|
+
<p><span class=
|
834
|
+
"arg">img</span>.find_similar_region(<span class="arg">target</span>,
|
835
|
+
<span class="arg">x</span>=0, <span class="arg">y</span>=0)
|
836
|
+
-> <em>[rx, ry]</em></p>
|
837
|
+
</div>
|
838
|
+
|
839
|
+
<div class="desc">
|
840
|
+
<h4>Description</h4>
|
841
|
+
|
842
|
+
<p>This interesting method searches for a rectangle in the
|
843
|
+
image that is <em>similar</em> to the target. For the rectangle
|
844
|
+
to be <em>similar</em> each pixel in the rectangle must match
|
845
|
+
the corresponding pixel in the target image within the range
|
846
|
+
specified by the <code>fuzz</code> attributes of the image and
|
847
|
+
the target image.</p>
|
848
|
+
|
849
|
+
<h4>Arguments</h4>
|
850
|
+
|
851
|
+
<dl>
|
852
|
+
<dt>target</dt>
|
853
|
+
|
854
|
+
<dd>An image that forms the target of the search. This image
|
855
|
+
can be any size.</dd>
|
856
|
+
|
857
|
+
<dt>x, y</dt>
|
858
|
+
|
859
|
+
<dd>The starting <em>x-</em> and <em>y-</em>offsets for the
|
860
|
+
search. If omitted both <span class="arg">x</span> and
|
861
|
+
<span class="arg">y</span> default to 0.</dd>
|
862
|
+
</dl>
|
863
|
+
|
864
|
+
<h4>Returns</h4>
|
865
|
+
|
866
|
+
<p>If the search succeeds, the return value is an array with 2
|
867
|
+
elements. These elements are the <em>x-</em> and
|
868
|
+
<em>y-</em>offsets of the matching rectangle. If the search
|
869
|
+
fails the return value is <code>nil</code>.</p>
|
870
|
+
|
871
|
+
<h4>Magick API</h4>
|
872
|
+
|
873
|
+
<p>IsImageSimilar</p>
|
874
|
+
</div>
|
875
|
+
|
876
|
+
<div class="sig">
|
877
|
+
<h3 id="flip">flip</h3>
|
878
|
+
|
879
|
+
<p><span class="arg">img</span>.flip -> <em>image</em></p>
|
880
|
+
</div>
|
881
|
+
|
882
|
+
<div class="desc">
|
883
|
+
<h4>Description</h4>
|
884
|
+
|
885
|
+
<p>Create a vertical mirror image of the receiver.</p>
|
886
|
+
|
887
|
+
<h4>Returns</h4>
|
888
|
+
|
889
|
+
<p>A new image</p>
|
890
|
+
|
891
|
+
<h4>Example</h4>
|
892
|
+
|
893
|
+
<p class="rollover"><a href=
|
894
|
+
"javascript:popup('flip.rb.html')"><img onmouseover=
|
895
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
896
|
+
"this.src='ex/flip.jpg'" src="ex/flip.jpg" alt="flip example"
|
897
|
+
title="Click to see the example script" /></a> <img src=
|
898
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
899
|
+
"Mouse over the example to see the original image" /></p>
|
900
|
+
|
901
|
+
<h4>See also</h4>
|
902
|
+
|
903
|
+
<p><a href="image1.html#affine_transform">affine_transform</a>,
|
904
|
+
<a href="#flip_bang">flip!</a>, <a href="#flop">flop</a>,
|
905
|
+
<a href="image3.html#rotate">rotate</a>, <a href=
|
906
|
+
"image3.html#transpose">transpose</a>, <a href=
|
907
|
+
"image3.html#transverse">transverse</a></p>
|
908
|
+
|
909
|
+
<h4>Magick API</h4>
|
910
|
+
|
911
|
+
<p>FlipImage</p>
|
912
|
+
</div>
|
913
|
+
|
914
|
+
<div class="sig">
|
915
|
+
<h3 id="flip_bang">flip!</h3>
|
916
|
+
|
917
|
+
<p><span class="arg">img</span>.flip! -> <em>self</em></p>
|
918
|
+
</div>
|
919
|
+
|
920
|
+
<div class="desc">
|
921
|
+
<h4>Description</h4>
|
922
|
+
|
923
|
+
<p>In-place form of <a href="#flip">flip</a>.</p>
|
924
|
+
|
925
|
+
<h4>Returns</h4>
|
926
|
+
|
927
|
+
<p>self</p>
|
928
|
+
</div>
|
929
|
+
|
930
|
+
<div class="sig">
|
931
|
+
<h3 id="flop">flop</h3>
|
932
|
+
|
933
|
+
<p><span class="arg">img</span>.flop -> <em>image</em></p>
|
934
|
+
</div>
|
935
|
+
|
936
|
+
<div class="desc">
|
937
|
+
<h4>Description</h4>
|
938
|
+
|
939
|
+
<p>Create a horizontal mirror image of the receiver.</p>
|
940
|
+
|
941
|
+
<h4>Returns</h4>
|
942
|
+
|
943
|
+
<p>A new image</p>
|
944
|
+
|
945
|
+
<h4>Example</h4>
|
946
|
+
|
947
|
+
<p class="rollover"><a href=
|
948
|
+
"javascript:popup('flop.rb.html')"><img onmouseover=
|
949
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
950
|
+
"this.src='ex/flop.jpg'" src="ex/flop.jpg" alt="flop example"
|
951
|
+
title="Click to see the example script" /></a> <img src=
|
952
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
953
|
+
"Mouse over the example to see the original image" /></p>
|
954
|
+
|
955
|
+
<h4>See also</h4>
|
956
|
+
|
957
|
+
<p><a href="image1.html#affine_transform">affine_transform</a>,
|
958
|
+
<a href="#flip">flip</a>, <a href="#flop_bang">flop!</a>,
|
959
|
+
<a href="image3.html#rotate">rotate</a>, <a href=
|
960
|
+
"image3.html#transpose">transpose</a>, <a href=
|
961
|
+
"image3.html#transverse">transverse</a></p>
|
962
|
+
|
963
|
+
<h4>Magick API</h4>
|
964
|
+
|
965
|
+
<p>FlopImage</p>
|
966
|
+
</div>
|
967
|
+
|
968
|
+
<div class="sig">
|
969
|
+
<h3 id="flop_bang">flop!</h3>
|
970
|
+
|
971
|
+
<p><span class="arg">img</span>.flop! -> <em>self</em></p>
|
972
|
+
</div>
|
973
|
+
|
974
|
+
<div class="desc">
|
975
|
+
<h4>Description</h4>
|
976
|
+
|
977
|
+
<p>In-place form of <a href="#flop">flop</a>.</p>
|
978
|
+
|
979
|
+
<h4>Returns</h4>
|
980
|
+
|
981
|
+
<p>self</p>
|
982
|
+
</div>
|
983
|
+
|
984
|
+
<div class="sig">
|
985
|
+
<h3 id="frame">frame</h3>
|
986
|
+
|
987
|
+
<p><span class="arg">img</span>.frame(<span class=
|
988
|
+
"arg">width</span>=25, <span class="arg">height</span>=25,
|
989
|
+
<span class="arg">x</span>=25, <span class="arg">y</span>=25,
|
990
|
+
<span class="arg">inner_bevel</span>=6, <span class=
|
991
|
+
"arg">outer_bevel</span>=6, <span class=
|
992
|
+
"arg">color</span>=<code><a href=
|
993
|
+
"imageattrs.html#matte_color">matte_color</a></code>) ->
|
994
|
+
<em>image</em></p>
|
995
|
+
</div>
|
996
|
+
|
997
|
+
<div class="desc">
|
998
|
+
<h4>Description</h4>
|
999
|
+
|
1000
|
+
<p>Adds a simulated 3D border.</p>
|
1001
|
+
|
1002
|
+
<h4>Arguments</h4>
|
1003
|
+
|
1004
|
+
<dl>
|
1005
|
+
<dt>width</dt>
|
1006
|
+
|
1007
|
+
<dd>The width of the left and right sides.</dd>
|
1008
|
+
|
1009
|
+
<dt>height</dt>
|
1010
|
+
|
1011
|
+
<dd>The height of the top and bottom sides.</dd>
|
1012
|
+
|
1013
|
+
<dt>x, y</dt>
|
1014
|
+
|
1015
|
+
<dd>The image does not have to be centered in the border.
|
1016
|
+
These two arguments specify the offset of the image from the
|
1017
|
+
upper-left outside corner of the border.</dd>
|
1018
|
+
|
1019
|
+
<dt>inner_bevel, outer_bevel</dt>
|
1020
|
+
|
1021
|
+
<dd>The width of the inner and outer shadows of the border.
|
1022
|
+
These values should be much smaller than the width and height
|
1023
|
+
and cannot be greater than 1/2 the lesser of the width or
|
1024
|
+
height.</dd>
|
1025
|
+
|
1026
|
+
<dt>color</dt>
|
1027
|
+
|
1028
|
+
<dd>The border color. By default the color is the <a href=
|
1029
|
+
"imageattrs.html#matte_color">matte color</a>.</dd>
|
1030
|
+
</dl>
|
1031
|
+
|
1032
|
+
<h4>Returns</h4>
|
1033
|
+
|
1034
|
+
<p>A new image</p>
|
1035
|
+
|
1036
|
+
<h4>Example</h4>
|
1037
|
+
|
1038
|
+
<p class="rollover"><a href=
|
1039
|
+
"javascript:popup('frame.rb.html')">
|
1040
|
+
<!-- This img tag displays the original image when moused over -->
|
1041
|
+
<img style="padding:25px; display:none" id="frameless"
|
1042
|
+
onmouseout="this.style.display='none';framed.style.display='';"
|
1043
|
+
src="ex/images/Flower_Hat.jpg" alt="frame example" title=
|
1044
|
+
"Click to see the example script" />
|
1045
|
+
<!-- This img tag displays the framed image when the mouse is not over -->
|
1046
|
+
<img onmouseover=
|
1047
|
+
"this.style.display='none';frameless.style.display='';" src=
|
1048
|
+
"ex/frame.jpg" alt="frame example" /></a> <img src=
|
1049
|
+
"ex/images/spin.gif" alt="" style="margin-bottom: 280px" title=
|
1050
|
+
"Mouse over the example to see the original image" /></p>
|
1051
|
+
|
1052
|
+
<h4>See also</h4>
|
1053
|
+
|
1054
|
+
<p><a href="image1.html#border">border</a></p>
|
1055
|
+
|
1056
|
+
<h4>Magick API</h4>
|
1057
|
+
|
1058
|
+
<p>FrameImage</p>
|
1059
|
+
</div>
|
1060
|
+
|
1061
|
+
<div class="sig">
|
1062
|
+
<h3 id="freeze">freeze</h3>
|
1063
|
+
|
1064
|
+
<p><span class="arg">img</span>.freeze -> <em>self</em></p>
|
1065
|
+
</div>
|
1066
|
+
|
1067
|
+
<div class="desc">
|
1068
|
+
<h4>Description</h4>
|
1069
|
+
|
1070
|
+
<p>Prevent further modifications to the image.</p>
|
1071
|
+
|
1072
|
+
<h4>Returns</h4>
|
1073
|
+
|
1074
|
+
<p>self</p>
|
1075
|
+
</div>
|
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
|
+
|
1149
|
+
<div class="sig">
|
1150
|
+
<h3 id="gamma_channel">gamma_channel</h3>
|
1151
|
+
|
1152
|
+
<p><span class="arg">img</span>.gamma_channel(<span class=
|
1153
|
+
"arg">gamma</span>, [<span class="arg">channel</span>...]) =
|
1154
|
+
<em>image</em></p>
|
1155
|
+
</div>
|
1156
|
+
|
1157
|
+
<div class="desc">
|
1158
|
+
<h4>Description</h4>
|
1159
|
+
|
1160
|
+
<p class="imquote">Gamma-correct a particular image channel.
|
1161
|
+
The same image viewed on different devices will have perceptual
|
1162
|
+
differences in the way the image's intensities are represented
|
1163
|
+
on the screen.</p>
|
1164
|
+
|
1165
|
+
<h4>Arguments</h4>
|
1166
|
+
|
1167
|
+
<dl>
|
1168
|
+
<dt>gamma</dt>
|
1169
|
+
|
1170
|
+
<dd class="imquote">Values typically range from 0.8 to 2.3.
|
1171
|
+
You can also reduce the influence of a particular channel
|
1172
|
+
with a gamma value of 0.</dd>
|
1173
|
+
|
1174
|
+
<dt>channel...</dt>
|
1175
|
+
|
1176
|
+
<dd>0 or more <a href=
|
1177
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1178
|
+
channels are specified, all the channels are corrected using
|
1179
|
+
the <span class="arg">gamma</span> value.</dd>
|
1180
|
+
</dl>
|
1181
|
+
|
1182
|
+
<h4>Returns</h4>
|
1183
|
+
|
1184
|
+
<p>A new image</p>
|
1185
|
+
|
1186
|
+
<h4>See also</h4>
|
1187
|
+
|
1188
|
+
<p>The older <a href="#gamma_correct">gamma_correct</a> method
|
1189
|
+
is implemented in terms of <code>gamma_channel</code>.</p>
|
1190
|
+
|
1191
|
+
<h4>Magick API</h4>
|
1192
|
+
|
1193
|
+
<p>GammaImageChannel</p>
|
1194
|
+
</div>
|
1195
|
+
|
1196
|
+
<div class="sig">
|
1197
|
+
<h3 id="gamma_correct">gamma_correct</h3>
|
1198
|
+
|
1199
|
+
<p><span class="arg">img</span>.gamma_correct(<span class=
|
1200
|
+
"arg">red_gamma</span>[,<span class="arg">green_gamma</span>[,
|
1201
|
+
<span class="arg">blue_gamma</span>]]) -> <em>image</em></p>
|
1202
|
+
</div>
|
1203
|
+
|
1204
|
+
<div class="desc">
|
1205
|
+
<h4>Description</h4>
|
1206
|
+
|
1207
|
+
<p>Gamma-correct an image. The same image viewed on different
|
1208
|
+
devices will have perceptual differences in the way the image's
|
1209
|
+
intensities are represented on the screen.</p>
|
1210
|
+
|
1211
|
+
<h4>Arguments</h4>
|
1212
|
+
|
1213
|
+
<p>You must specify at least <code>red_gamma</code>. Omitted
|
1214
|
+
arguments take on the value of the last specified argument.
|
1215
|
+
<span class="imquote">Values typically range from 0.8 to
|
1216
|
+
2.3.</span></p>
|
1217
|
+
|
1218
|
+
<h4>Returns</h4>
|
1219
|
+
|
1220
|
+
<p>A new image</p>
|
1221
|
+
|
1222
|
+
<h4>See also</h4>
|
1223
|
+
|
1224
|
+
<p><a href="#gamma_channel">gamma_channel</a></p>
|
1225
|
+
|
1226
|
+
<h4>Magick API</h4>
|
1227
|
+
|
1228
|
+
<p>GammaImage</p>
|
1229
|
+
</div>
|
1230
|
+
|
1231
|
+
<div class="sig">
|
1232
|
+
<h3 id="gaussian_blur">gaussian_blur</h3>
|
1233
|
+
|
1234
|
+
<p><span class="arg">img</span>.gaussian_blur(<span class=
|
1235
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0)
|
1236
|
+
-> <em>image</em></p>
|
1237
|
+
</div>
|
1238
|
+
|
1239
|
+
<div class="desc">
|
1240
|
+
<h4>Description</h4>
|
1241
|
+
|
1242
|
+
<p class="imquote">Blurs an image. We convolve the image with a
|
1243
|
+
Gaussian operator of the given radius and standard deviation
|
1244
|
+
(sigma).</p>
|
1245
|
+
|
1246
|
+
<h4>Arguments</h4>
|
1247
|
+
|
1248
|
+
<dl>
|
1249
|
+
<dt>radius</dt>
|
1250
|
+
|
1251
|
+
<dd>A <code>Float</code> value representing <span class=
|
1252
|
+
"imquote">the radius of the Gaussian, in pixels, not counting
|
1253
|
+
the center pixel.</span></dd>
|
1254
|
+
|
1255
|
+
<dt>sigma</dt>
|
1256
|
+
|
1257
|
+
<dd>A <code>Float</code> value representing the standard
|
1258
|
+
deviation of the Gaussian operator, in pixels. This argument
|
1259
|
+
must be > 0.0.</dd>
|
1260
|
+
</dl>
|
1261
|
+
|
1262
|
+
<h4>Returns</h4>
|
1263
|
+
|
1264
|
+
<p>A new image</p>
|
1265
|
+
|
1266
|
+
<h4>Example</h4>
|
1267
|
+
|
1268
|
+
<p><code>gaussian_blur(0.0, 3.0)</code></p>
|
1269
|
+
|
1270
|
+
<p class="rollover"><a href=
|
1271
|
+
"javascript:popup('gaussian_blur.rb.html')"><img onmouseover=
|
1272
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
1273
|
+
"this.src='ex/gaussian_blur.jpg'" src="ex/gaussian_blur.jpg"
|
1274
|
+
alt="gaussian_blur example" title=
|
1275
|
+
"Click to see the example script" /></a> <img src=
|
1276
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
1277
|
+
"Mouse over the example to see the original image" /></p>
|
1278
|
+
|
1279
|
+
<h4>See also</h4>
|
1280
|
+
|
1281
|
+
<p><a href="image1.html#blur_image">blur_image</a>, <a href=
|
1282
|
+
"#motion_blur">motion_blur</a>, <a href=
|
1283
|
+
"image3.html#radial_blur">radial_blur</a>, <a href=
|
1284
|
+
"image3.html#selective_blur_channel">selective_blur_channel</a></p>
|
1285
|
+
|
1286
|
+
<h4>Magick API</h4>
|
1287
|
+
|
1288
|
+
<p>GaussianBlurImage</p>
|
1289
|
+
</div>
|
1290
|
+
|
1291
|
+
<div class="sig">
|
1292
|
+
<h3 id="gaussian_blur_channel">gaussian_blur_channel</h3>
|
1293
|
+
|
1294
|
+
<p><span class=
|
1295
|
+
"arg">img</span>.gaussian_blur_channel(<span class=
|
1296
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0[,
|
1297
|
+
<span class="arg">channel</span>...]) -> <em>image</em></p>
|
1298
|
+
</div>
|
1299
|
+
|
1300
|
+
<div class="desc">
|
1301
|
+
<h4>Description</h4>
|
1302
|
+
|
1303
|
+
<p>Blurs the selected channel or channels using a Gaussian
|
1304
|
+
operator of the specified radius and standard deviation.</p>
|
1305
|
+
|
1306
|
+
<h4>Arguments</h4>
|
1307
|
+
|
1308
|
+
<dl>
|
1309
|
+
<dt>radius</dt>
|
1310
|
+
|
1311
|
+
<dd>A <code>Float</code> value representing <span class=
|
1312
|
+
"imquote">the radius of the Gaussian, in pixels, not counting
|
1313
|
+
the center pixel.</span></dd>
|
1314
|
+
|
1315
|
+
<dt>sigma</dt>
|
1316
|
+
|
1317
|
+
<dd>A <code>Float</code> value representing the standard
|
1318
|
+
deviation of the Gaussian operator, in pixels. This argument
|
1319
|
+
must be > 0.0.</dd>
|
1320
|
+
|
1321
|
+
<dt>channel...</dt>
|
1322
|
+
|
1323
|
+
<dd>0 or more <a href=
|
1324
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
1325
|
+
channels are specified, all the channels are blurred. This is
|
1326
|
+
the same as using <a href=
|
1327
|
+
"#gaussian_blur">gaussian_blur</a>.</dd>
|
1328
|
+
</dl>
|
1329
|
+
|
1330
|
+
<h4>Returns</h4>
|
1331
|
+
|
1332
|
+
<p>A new image</p>
|
1333
|
+
|
1334
|
+
<h4>See also</h4>
|
1335
|
+
|
1336
|
+
<p><a href="image1.html#blur_channel">blur_channel</a>,
|
1337
|
+
<a href="#motion_blur">motion_blur</a>, <a href=
|
1338
|
+
"image3.html#radial_blur">radial_blur</a>, <a href=
|
1339
|
+
"image3.html#selective_blur_channel">selective_blur_channel</a></p>
|
1340
|
+
|
1341
|
+
<h4>Magick API</h4>
|
1342
|
+
|
1343
|
+
<p>GaussianBlurImageChannel</p>
|
1344
|
+
</div>
|
1345
|
+
|
1346
|
+
<div class="sig">
|
1347
|
+
<h3 id="get_exif_by_entry">get_exif_by_entry</h3>
|
1348
|
+
|
1349
|
+
<p><span class="arg">img</span>.get_exif_by_entry(<span class=
|
1350
|
+
"arg">[name]*</span>) -> <em>array</em></p>
|
1351
|
+
</div>
|
1352
|
+
|
1353
|
+
<div class="desc">
|
1354
|
+
<h4>Description</h4>
|
1355
|
+
|
1356
|
+
<p>Returns the value associated with the specified EXIF entry
|
1357
|
+
name or names. If no names are specified, returns all the
|
1358
|
+
entries. The return value is an array containing one or more
|
1359
|
+
[name, value] elements.</p>
|
1360
|
+
|
1361
|
+
<h4>Arguments</h4>
|
1362
|
+
|
1363
|
+
<p>Zero or more EXIF entry names.</p>
|
1364
|
+
|
1365
|
+
<h4>Returns</h4>
|
1366
|
+
|
1367
|
+
<p>The elements in the returned array are 2-element arrays in
|
1368
|
+
the form [name, value]. If ImageMagick does not know the name
|
1369
|
+
for an entry it uses "unknown." There may be more than one
|
1370
|
+
entry for "unknown" in the returned array. If there is no entry
|
1371
|
+
with the specified name the value is set to
|
1372
|
+
<code>nil</code>.</p>
|
1373
|
+
|
1374
|
+
<h4>Example</h4>
|
1375
|
+
<pre>
|
1376
|
+
image.get_exif_by_entry('Make') » [["Make", "Canon"]]
|
1377
|
+
image.get_exif_by_entry("ShutterSpeedValue") »
|
1378
|
+
[["ShutterSpeedValue", "189/32"]]
|
1379
|
+
image.get_exif_by_entry() »
|
1380
|
+
[["Make", "Canon"], ["ShutterSpeedValue", "189/32"] ...]
|
1381
|
+
</pre>
|
1382
|
+
|
1383
|
+
<h4>See also</h4>
|
1384
|
+
|
1385
|
+
<p><a href="#get_exif_by_number">get_exif_by_number</a></p>
|
1386
|
+
</div>
|
1387
|
+
|
1388
|
+
<div class="sig">
|
1389
|
+
<h3 id="get_exif_by_number">get_exif_by_number</h3>
|
1390
|
+
|
1391
|
+
<p><span class="arg">img</span>.get_exif_by_number(<span class=
|
1392
|
+
"arg">[tag]*</span>) -> <em>hash</em></p>
|
1393
|
+
</div>
|
1394
|
+
|
1395
|
+
<div class="desc">
|
1396
|
+
<h4>Description</h4>
|
1397
|
+
|
1398
|
+
<p>Returns the value associated with the specified EXIF tag
|
1399
|
+
number or numbers. If no numbers are specified, returns all the
|
1400
|
+
tags. The return value is a hash. The hash keys are EXIF tag
|
1401
|
+
numbers. The values are the values associated with the
|
1402
|
+
tags.</p>
|
1403
|
+
|
1404
|
+
<h4>Arguments</h4>
|
1405
|
+
|
1406
|
+
<p>Zero or more EXIF tag numbers.</p>
|
1407
|
+
|
1408
|
+
<h4>Returns</h4>
|
1409
|
+
|
1410
|
+
<p>A hash. If there is no tag with the specified number the
|
1411
|
+
value is set to <code>nil</code>.</p>
|
1412
|
+
|
1413
|
+
<h4>Example</h4>
|
1414
|
+
<pre>
|
1415
|
+
image.get_exif_by_number(271) » {271=>"Canon"}
|
1416
|
+
image.get_exif_by_number(37377) » {37377=>"189/32"}
|
1417
|
+
image.get_exif_by_number() »
|
1418
|
+
{271=>"Canon", 37377=>"189/32" ...}
|
1419
|
+
</pre>
|
1420
|
+
|
1421
|
+
<h4>See also</h4>
|
1422
|
+
|
1423
|
+
<p><a href="#get_exif_by_entry">get_exif_by_entry</a></p>
|
1424
|
+
</div>
|
1425
|
+
|
1426
|
+
<div class="sig">
|
1427
|
+
<h3 id="get_iptc_dataset">get_iptc_dataset</h3>
|
1428
|
+
|
1429
|
+
<p><span class="arg">img</span>.get_iptc_dataset(<span class=
|
1430
|
+
"arg">ds</span>) -> <em>string</em></p>
|
1431
|
+
</div>
|
1432
|
+
|
1433
|
+
<div class="desc">
|
1434
|
+
<h4>Description</h4>
|
1435
|
+
|
1436
|
+
<p>Retrieves the data field for the specified DataSet, or
|
1437
|
+
<code>nil</code> if the DataSet is not used or the data field
|
1438
|
+
has length 0.</p>
|
1439
|
+
|
1440
|
+
<h4>Arguments</h4>
|
1441
|
+
|
1442
|
+
<p>RMagick defines the following constants for use as arguments
|
1443
|
+
to this method. All the constants are in the Magick::IPTC
|
1444
|
+
namespace. Notice that some DataSets have two names.</p>
|
1445
|
+
|
1446
|
+
<table id="iptc" class="striped" summary=
|
1447
|
+
"IPTC dataset constants">
|
1448
|
+
<tr>
|
1449
|
+
<th>Constant</th>
|
1450
|
+
|
1451
|
+
<th>Record:DataSet</th>
|
1452
|
+
</tr>
|
1453
|
+
|
1454
|
+
<tr>
|
1455
|
+
<td>Envelope::Model_Version</td>
|
1456
|
+
|
1457
|
+
<td class="ds">1:00</td>
|
1458
|
+
</tr>
|
1459
|
+
|
1460
|
+
<tr>
|
1461
|
+
<td>Envelope::Destination</td>
|
1462
|
+
|
1463
|
+
<td class="ds">1:05</td>
|
1464
|
+
</tr>
|
1465
|
+
|
1466
|
+
<tr>
|
1467
|
+
<td>Envelope::UNO</td>
|
1468
|
+
|
1469
|
+
<td class="ds">1:100</td>
|
1470
|
+
</tr>
|
1471
|
+
|
1472
|
+
<tr>
|
1473
|
+
<td>Envelope::Unique_Name_of_Object</td>
|
1474
|
+
|
1475
|
+
<td class="ds">1:100</td>
|
1476
|
+
</tr>
|
1477
|
+
|
1478
|
+
<tr>
|
1479
|
+
<td>Envelope::ARM_Identifier</td>
|
1480
|
+
|
1481
|
+
<td class="ds">1:120</td>
|
1482
|
+
</tr>
|
1483
|
+
|
1484
|
+
<tr>
|
1485
|
+
<td>Envelope::ARM_Version</td>
|
1486
|
+
|
1487
|
+
<td class="ds">1:122</td>
|
1488
|
+
</tr>
|
1489
|
+
|
1490
|
+
<tr>
|
1491
|
+
<td>Envelope::File_Format</td>
|
1492
|
+
|
1493
|
+
<td class="ds">1:20</td>
|
1494
|
+
</tr>
|
1495
|
+
|
1496
|
+
<tr>
|
1497
|
+
<td>Envelope::File_Format_Version</td>
|
1498
|
+
|
1499
|
+
<td class="ds">1:22</td>
|
1500
|
+
</tr>
|
1501
|
+
|
1502
|
+
<tr>
|
1503
|
+
<td>Envelope::Service_Identifier</td>
|
1504
|
+
|
1505
|
+
<td class="ds">1:30</td>
|
1506
|
+
</tr>
|
1507
|
+
|
1508
|
+
<tr>
|
1509
|
+
<td>Envelope::Envelope_Number</td>
|
1510
|
+
|
1511
|
+
<td class="ds">1:40</td>
|
1512
|
+
</tr>
|
1513
|
+
|
1514
|
+
<tr>
|
1515
|
+
<td>Envelope::Product_ID</td>
|
1516
|
+
|
1517
|
+
<td class="ds">1:50</td>
|
1518
|
+
</tr>
|
1519
|
+
|
1520
|
+
<tr>
|
1521
|
+
<td>Envelope::Envelope_Priority</td>
|
1522
|
+
|
1523
|
+
<td class="ds">1:60</td>
|
1524
|
+
</tr>
|
1525
|
+
|
1526
|
+
<tr>
|
1527
|
+
<td>Envelope::Date_Sent</td>
|
1528
|
+
|
1529
|
+
<td class="ds">1:70</td>
|
1530
|
+
</tr>
|
1531
|
+
|
1532
|
+
<tr>
|
1533
|
+
<td>Envelope::Time_Sent</td>
|
1534
|
+
|
1535
|
+
<td class="ds">1:80</td>
|
1536
|
+
</tr>
|
1537
|
+
|
1538
|
+
<tr>
|
1539
|
+
<td>Envelope::Coded_Character_Set</td>
|
1540
|
+
|
1541
|
+
<td class="ds">1:90</td>
|
1542
|
+
</tr>
|
1543
|
+
|
1544
|
+
<tr>
|
1545
|
+
<td>Application::Object_Type_Reference</td>
|
1546
|
+
|
1547
|
+
<td class="ds">2:03</td>
|
1548
|
+
</tr>
|
1549
|
+
|
1550
|
+
<tr>
|
1551
|
+
<td>Application::Object_Name</td>
|
1552
|
+
|
1553
|
+
<td class="ds">2:05</td>
|
1554
|
+
</tr>
|
1555
|
+
|
1556
|
+
<tr>
|
1557
|
+
<td>Application::Title</td>
|
1558
|
+
|
1559
|
+
<td class="ds">2:05</td>
|
1560
|
+
</tr>
|
1561
|
+
|
1562
|
+
<tr>
|
1563
|
+
<td>Application::Edit_Status</td>
|
1564
|
+
|
1565
|
+
<td class="ds">2:07</td>
|
1566
|
+
</tr>
|
1567
|
+
|
1568
|
+
<tr>
|
1569
|
+
<td>Application::Editorial_Update</td>
|
1570
|
+
|
1571
|
+
<td class="ds">2:08</td>
|
1572
|
+
</tr>
|
1573
|
+
|
1574
|
+
<tr>
|
1575
|
+
<td>Application::Urgency</td>
|
1576
|
+
|
1577
|
+
<td class="ds">2:10</td>
|
1578
|
+
</tr>
|
1579
|
+
|
1580
|
+
<tr>
|
1581
|
+
<td>Application::Country_Primary_Location_Code</td>
|
1582
|
+
|
1583
|
+
<td class="ds">2:100</td>
|
1584
|
+
</tr>
|
1585
|
+
|
1586
|
+
<tr>
|
1587
|
+
<td>Application::Country_Primary_Location_Name</td>
|
1588
|
+
|
1589
|
+
<td class="ds">2:101</td>
|
1590
|
+
</tr>
|
1591
|
+
|
1592
|
+
<tr>
|
1593
|
+
<td>Application::Original_Transmission_Reference</td>
|
1594
|
+
|
1595
|
+
<td class="ds">2:103</td>
|
1596
|
+
</tr>
|
1597
|
+
|
1598
|
+
<tr>
|
1599
|
+
<td>Application::Headline</td>
|
1600
|
+
|
1601
|
+
<td class="ds">2:105</td>
|
1602
|
+
</tr>
|
1603
|
+
|
1604
|
+
<tr>
|
1605
|
+
<td>Application::Credit</td>
|
1606
|
+
|
1607
|
+
<td class="ds">2:110</td>
|
1608
|
+
</tr>
|
1609
|
+
|
1610
|
+
<tr>
|
1611
|
+
<td>Application::Source</td>
|
1612
|
+
|
1613
|
+
<td class="ds">2:115</td>
|
1614
|
+
</tr>
|
1615
|
+
|
1616
|
+
<tr>
|
1617
|
+
<td>Application::Copyright_Notice</td>
|
1618
|
+
|
1619
|
+
<td class="ds">2:116</td>
|
1620
|
+
</tr>
|
1621
|
+
|
1622
|
+
<tr>
|
1623
|
+
<td>Application::Contact</td>
|
1624
|
+
|
1625
|
+
<td class="ds">2:118</td>
|
1626
|
+
</tr>
|
1627
|
+
|
1628
|
+
<tr>
|
1629
|
+
<td>Application::Subject_Reference</td>
|
1630
|
+
|
1631
|
+
<td class="ds">2:12</td>
|
1632
|
+
</tr>
|
1633
|
+
|
1634
|
+
<tr>
|
1635
|
+
<td>Application::Abstract</td>
|
1636
|
+
|
1637
|
+
<td class="ds">2:120</td>
|
1638
|
+
</tr>
|
1639
|
+
|
1640
|
+
<tr>
|
1641
|
+
<td>Application::Caption</td>
|
1642
|
+
|
1643
|
+
<td class="ds">2:120</td>
|
1644
|
+
</tr>
|
1645
|
+
|
1646
|
+
<tr>
|
1647
|
+
<td>Application::Caption_Writer</td>
|
1648
|
+
|
1649
|
+
<td class="ds">2:122</td>
|
1650
|
+
</tr>
|
1651
|
+
|
1652
|
+
<tr>
|
1653
|
+
<td>Application::Editor</td>
|
1654
|
+
|
1655
|
+
<td class="ds">2:122</td>
|
1656
|
+
</tr>
|
1657
|
+
|
1658
|
+
<tr>
|
1659
|
+
<td>Application::Rasterized_Caption</td>
|
1660
|
+
|
1661
|
+
<td class="ds">2:125</td>
|
1662
|
+
</tr>
|
1663
|
+
|
1664
|
+
<tr>
|
1665
|
+
<td>Application::Image_Type</td>
|
1666
|
+
|
1667
|
+
<td class="ds">2:130</td>
|
1668
|
+
</tr>
|
1669
|
+
|
1670
|
+
<tr>
|
1671
|
+
<td>Application::Image_Orientation</td>
|
1672
|
+
|
1673
|
+
<td class="ds">2:131</td>
|
1674
|
+
</tr>
|
1675
|
+
|
1676
|
+
<tr>
|
1677
|
+
<td>Application::Language_Identifier</td>
|
1678
|
+
|
1679
|
+
<td class="ds">2:135</td>
|
1680
|
+
</tr>
|
1681
|
+
|
1682
|
+
<tr>
|
1683
|
+
<td>Application::Category</td>
|
1684
|
+
|
1685
|
+
<td class="ds">2:15</td>
|
1686
|
+
</tr>
|
1687
|
+
|
1688
|
+
<tr>
|
1689
|
+
<td>Application::Audio_Type</td>
|
1690
|
+
|
1691
|
+
<td class="ds">2:150</td>
|
1692
|
+
</tr>
|
1693
|
+
|
1694
|
+
<tr>
|
1695
|
+
<td>Application::Audio_Sampling_Rate</td>
|
1696
|
+
|
1697
|
+
<td class="ds">2:151</td>
|
1698
|
+
</tr>
|
1699
|
+
|
1700
|
+
<tr>
|
1701
|
+
<td>Application::Audio_Sampling_Resolution</td>
|
1702
|
+
|
1703
|
+
<td class="ds">2:152</td>
|
1704
|
+
</tr>
|
1705
|
+
|
1706
|
+
<tr>
|
1707
|
+
<td>Application::Audio_Duration</td>
|
1708
|
+
|
1709
|
+
<td class="ds">2:153</td>
|
1710
|
+
</tr>
|
1711
|
+
|
1712
|
+
<tr>
|
1713
|
+
<td>Application::Audio_Outcue</td>
|
1714
|
+
|
1715
|
+
<td class="ds">2:154</td>
|
1716
|
+
</tr>
|
1717
|
+
|
1718
|
+
<tr>
|
1719
|
+
<td>Application::Supplemental_Category</td>
|
1720
|
+
|
1721
|
+
<td class="ds">2:20</td>
|
1722
|
+
</tr>
|
1723
|
+
|
1724
|
+
<tr>
|
1725
|
+
<td>Application::ObjectData_Preview_File_Format</td>
|
1726
|
+
|
1727
|
+
<td class="ds">2:200</td>
|
1728
|
+
</tr>
|
1729
|
+
|
1730
|
+
<tr>
|
1731
|
+
<td>
|
1732
|
+
Application::ObjectData_Preview_File_Format_Version</td>
|
1733
|
+
|
1734
|
+
<td class="ds">2:201</td>
|
1735
|
+
</tr>
|
1736
|
+
|
1737
|
+
<tr>
|
1738
|
+
<td>Application::ObjectData_Preview_Data</td>
|
1739
|
+
|
1740
|
+
<td class="ds">2:202</td>
|
1741
|
+
</tr>
|
1742
|
+
|
1743
|
+
<tr>
|
1744
|
+
<td>Application::Fixture_Identifier</td>
|
1745
|
+
|
1746
|
+
<td class="ds">2:22</td>
|
1747
|
+
</tr>
|
1748
|
+
|
1749
|
+
<tr>
|
1750
|
+
<td>Application::Keywords</td>
|
1751
|
+
|
1752
|
+
<td class="ds">2:25</td>
|
1753
|
+
</tr>
|
1754
|
+
|
1755
|
+
<tr>
|
1756
|
+
<td>Application::Content_Location_Code</td>
|
1757
|
+
|
1758
|
+
<td class="ds">2:26</td>
|
1759
|
+
</tr>
|
1760
|
+
|
1761
|
+
<tr>
|
1762
|
+
<td>Application::Content_Location_Name</td>
|
1763
|
+
|
1764
|
+
<td class="ds">2:27</td>
|
1765
|
+
</tr>
|
1766
|
+
|
1767
|
+
<tr>
|
1768
|
+
<td>Application::Release_Date</td>
|
1769
|
+
|
1770
|
+
<td class="ds">2:30</td>
|
1771
|
+
</tr>
|
1772
|
+
|
1773
|
+
<tr>
|
1774
|
+
<td>Application::Release_Time</td>
|
1775
|
+
|
1776
|
+
<td class="ds">2:35</td>
|
1777
|
+
</tr>
|
1778
|
+
|
1779
|
+
<tr>
|
1780
|
+
<td>Application::Expiration_Time</td>
|
1781
|
+
|
1782
|
+
<td class="ds">2:35</td>
|
1783
|
+
</tr>
|
1784
|
+
|
1785
|
+
<tr>
|
1786
|
+
<td>Application::Expiration_Date</td>
|
1787
|
+
|
1788
|
+
<td class="ds">2:37</td>
|
1789
|
+
</tr>
|
1790
|
+
|
1791
|
+
<tr>
|
1792
|
+
<td>Application::Special_Instructions</td>
|
1793
|
+
|
1794
|
+
<td class="ds">2:40</td>
|
1795
|
+
</tr>
|
1796
|
+
|
1797
|
+
<tr>
|
1798
|
+
<td>Application::Action_Advised</td>
|
1799
|
+
|
1800
|
+
<td class="ds">2:42</td>
|
1801
|
+
</tr>
|
1802
|
+
|
1803
|
+
<tr>
|
1804
|
+
<td>Application::Reference_Service</td>
|
1805
|
+
|
1806
|
+
<td class="ds">2:45</td>
|
1807
|
+
</tr>
|
1808
|
+
|
1809
|
+
<tr>
|
1810
|
+
<td>Application::Reference_Date</td>
|
1811
|
+
|
1812
|
+
<td class="ds">2:47</td>
|
1813
|
+
</tr>
|
1814
|
+
|
1815
|
+
<tr>
|
1816
|
+
<td>Application::Reference_Number</td>
|
1817
|
+
|
1818
|
+
<td class="ds">2:50</td>
|
1819
|
+
</tr>
|
1820
|
+
|
1821
|
+
<tr>
|
1822
|
+
<td>Application::Date_Created</td>
|
1823
|
+
|
1824
|
+
<td class="ds">2:55</td>
|
1825
|
+
</tr>
|
1826
|
+
|
1827
|
+
<tr>
|
1828
|
+
<td>Application::Time_Created</td>
|
1829
|
+
|
1830
|
+
<td class="ds">2:60</td>
|
1831
|
+
</tr>
|
1832
|
+
|
1833
|
+
<tr>
|
1834
|
+
<td>Application::Digital_Creation_Date</td>
|
1835
|
+
|
1836
|
+
<td class="ds">2:62</td>
|
1837
|
+
</tr>
|
1838
|
+
|
1839
|
+
<tr>
|
1840
|
+
<td>Application::Digital_Creation_Time</td>
|
1841
|
+
|
1842
|
+
<td class="ds">2:63</td>
|
1843
|
+
</tr>
|
1844
|
+
|
1845
|
+
<tr>
|
1846
|
+
<td>Application::Originating_Program</td>
|
1847
|
+
|
1848
|
+
<td class="ds">2:65</td>
|
1849
|
+
</tr>
|
1850
|
+
|
1851
|
+
<tr>
|
1852
|
+
<td>Application::Program_Version</td>
|
1853
|
+
|
1854
|
+
<td class="ds">2:70</td>
|
1855
|
+
</tr>
|
1856
|
+
|
1857
|
+
<tr>
|
1858
|
+
<td>Application::Object_Cycle</td>
|
1859
|
+
|
1860
|
+
<td class="ds">2:75</td>
|
1861
|
+
</tr>
|
1862
|
+
|
1863
|
+
<tr>
|
1864
|
+
<td>Application::Author</td>
|
1865
|
+
|
1866
|
+
<td class="ds">2:80</td>
|
1867
|
+
</tr>
|
1868
|
+
|
1869
|
+
<tr>
|
1870
|
+
<td>Application::By_Line</td>
|
1871
|
+
|
1872
|
+
<td class="ds">2:80</td>
|
1873
|
+
</tr>
|
1874
|
+
|
1875
|
+
<tr>
|
1876
|
+
<td>Application::Author_Position</td>
|
1877
|
+
|
1878
|
+
<td class="ds">2:85</td>
|
1879
|
+
</tr>
|
1880
|
+
|
1881
|
+
<tr>
|
1882
|
+
<td>Application::By_Line_Title</td>
|
1883
|
+
|
1884
|
+
<td class="ds">2:85</td>
|
1885
|
+
</tr>
|
1886
|
+
|
1887
|
+
<tr>
|
1888
|
+
<td>Application::City</td>
|
1889
|
+
|
1890
|
+
<td class="ds">2:90</td>
|
1891
|
+
</tr>
|
1892
|
+
|
1893
|
+
<tr>
|
1894
|
+
<td>Application::Sub_Location</td>
|
1895
|
+
|
1896
|
+
<td class="ds">2:92</td>
|
1897
|
+
</tr>
|
1898
|
+
|
1899
|
+
<tr>
|
1900
|
+
<td>Application::Province</td>
|
1901
|
+
|
1902
|
+
<td class="ds">2:95</td>
|
1903
|
+
</tr>
|
1904
|
+
|
1905
|
+
<tr>
|
1906
|
+
<td>Application::State</td>
|
1907
|
+
|
1908
|
+
<td class="ds">2:95</td>
|
1909
|
+
</tr>
|
1910
|
+
|
1911
|
+
<tr>
|
1912
|
+
<td>Pre_ObjectData_Descriptor::Size_Mode</td>
|
1913
|
+
|
1914
|
+
<td class="ds">7:10</td>
|
1915
|
+
</tr>
|
1916
|
+
|
1917
|
+
<tr>
|
1918
|
+
<td>Pre_ObjectData_Descriptor::Max_Subfile_Size</td>
|
1919
|
+
|
1920
|
+
<td class="ds">7:20</td>
|
1921
|
+
</tr>
|
1922
|
+
|
1923
|
+
<tr>
|
1924
|
+
<td>
|
1925
|
+
Pre_ObjectData_Descriptor::ObjectData_Size_Announced</td>
|
1926
|
+
|
1927
|
+
<td class="ds">7:90</td>
|
1928
|
+
</tr>
|
1929
|
+
|
1930
|
+
<tr>
|
1931
|
+
<td>Pre_ObjectData_Descriptor::Maximum_ObjectData_Size</td>
|
1932
|
+
|
1933
|
+
<td class="ds">7:95</td>
|
1934
|
+
</tr>
|
1935
|
+
|
1936
|
+
<tr>
|
1937
|
+
<td>ObjectData::Subfile</td>
|
1938
|
+
|
1939
|
+
<td class="ds">8:10</td>
|
1940
|
+
</tr>
|
1941
|
+
|
1942
|
+
<tr>
|
1943
|
+
<td>
|
1944
|
+
Post_ObjectData_Descriptor::Confirmed_ObjectData_Size</td>
|
1945
|
+
|
1946
|
+
<td class="ds">9:10</td>
|
1947
|
+
</tr>
|
1948
|
+
</table>
|
1949
|
+
|
1950
|
+
<h4>Example</h4>
|
1951
|
+
<pre>
|
1952
|
+
img.get_iptc_dataset(Magick::IPTC::Application::Keywords)
|
1953
|
+
</pre>
|
1954
|
+
|
1955
|
+
<h4>Returns</h4>
|
1956
|
+
|
1957
|
+
<p>The data field or nil</p>
|
1958
|
+
|
1959
|
+
<h4>See also</h4>
|
1960
|
+
|
1961
|
+
<p><a href=
|
1962
|
+
"image1.html#each_iptc_dataset">each_iptc_dataset</a>, <a href=
|
1963
|
+
"imageattrs.html#iptc_profile">iptc_profile</a></p>
|
1964
|
+
</div>
|
1965
|
+
|
1966
|
+
<div class="sig">
|
1967
|
+
<h3 id="get_pixels">get_pixels</h3>
|
1968
|
+
|
1969
|
+
<p><span class="arg">img</span>.get_pixels(<span class=
|
1970
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
1971
|
+
"arg">columns</span>, <span class="arg">rows</span>) ->
|
1972
|
+
<em>array</em></p>
|
1973
|
+
</div>
|
1974
|
+
|
1975
|
+
<div class="desc">
|
1976
|
+
<h4>Description</h4>
|
1977
|
+
|
1978
|
+
<p>Gets the pixels from the specified rectangle within the
|
1979
|
+
image.</p>
|
1980
|
+
|
1981
|
+
<h4>Arguments</h4>
|
1982
|
+
|
1983
|
+
<dl>
|
1984
|
+
<dt>x, y</dt>
|
1985
|
+
|
1986
|
+
<dd>The x- and y-offset of the rectangle within the
|
1987
|
+
image.</dd>
|
1988
|
+
|
1989
|
+
<dt>columns, rows</dt>
|
1990
|
+
|
1991
|
+
<dd>The width and height of the rectangle.</dd>
|
1992
|
+
</dl>
|
1993
|
+
|
1994
|
+
<h4>Returns</h4>
|
1995
|
+
|
1996
|
+
<p>An array of <a href="struct.html#Pixel">pixels</a>. There
|
1997
|
+
will be <code>columns*rows</code> elements in the array.</p>
|
1998
|
+
|
1999
|
+
<h4>Example</h4>
|
2000
|
+
|
2001
|
+
<p>This example <a href="image1.html#composite">composites</a>
|
2002
|
+
a black-and-white version of an image over the same image in
|
2003
|
+
its original colors. It uses <code>get_pixels</code> and
|
2004
|
+
<a href="image3.html#store_pixels">store_pixels</a> to make
|
2005
|
+
each column of pixels in the black-and-white image slightly
|
2006
|
+
more opaque than the column on its left, so that the resulting
|
2007
|
+
composite changes smoothly from color on the left to
|
2008
|
+
black-and-white on the right.</p><!--
|
2009
|
+
Reduce the size of the original image by specifying
|
2010
|
+
the size of the example image.
|
2011
|
+
-->
|
2012
|
+
|
2013
|
+
<p class="rollover"><a href=
|
2014
|
+
"javascript:popup('get_pixels.rb.html')"><img width="384"
|
2015
|
+
height="249" onmouseover="this.src='ex/images/Red_Rocks.jpg'"
|
2016
|
+
onmouseout="this.src='ex/get_pixels.jpg'" src=
|
2017
|
+
"ex/get_pixels.jpg" title="Click to see the example script"
|
2018
|
+
alt="get_pixels example" /></a> <img src="ex/images/spin.gif"
|
2019
|
+
alt="" class="spin" style="left:388px" title=
|
2020
|
+
"Mouse over the example to see the original image" /></p>
|
2021
|
+
|
2022
|
+
<h4>See also</h4>
|
2023
|
+
|
2024
|
+
<p><a href="image3.html#store_pixels">store_pixels</a>,
|
2025
|
+
<a href="image3.html#view">view</a></p>
|
2026
|
+
|
2027
|
+
<h4>Magick API</h4>
|
2028
|
+
|
2029
|
+
<p>AcquireImagePixels</p>
|
2030
|
+
</div>
|
2031
|
+
|
2032
|
+
<div class="sig">
|
2033
|
+
<h3 id="gray_q">gray?</h3>
|
2034
|
+
|
2035
|
+
<p><span class="arg">img</span>.gray? -> <code>true</code>
|
2036
|
+
or <code>false</code></p>
|
2037
|
+
</div>
|
2038
|
+
|
2039
|
+
<div class="desc">
|
2040
|
+
<h4>Description</h4>
|
2041
|
+
|
2042
|
+
<p>Returns <code>true</code> if all the pixels in the image
|
2043
|
+
have the same red, green, and blue intensities.</p>
|
2044
|
+
|
2045
|
+
<h4>Returns</h4>
|
2046
|
+
|
2047
|
+
<p><code>true</code> or <code>false</code></p>
|
2048
|
+
|
2049
|
+
<h4>See also</h4>
|
2050
|
+
|
2051
|
+
<p><a href="#monochrome_q">monochrome?</a></p>
|
2052
|
+
|
2053
|
+
<h4>Magick API</h4>
|
2054
|
+
|
2055
|
+
<p>IsGrayImage</p>
|
2056
|
+
</div>
|
2057
|
+
|
2058
|
+
<div class="sig">
|
2059
|
+
<h3 id="grey_q">grey?</h3>
|
2060
|
+
|
2061
|
+
<p><span class="arg">img</span>.grey? -> <code>true</code>
|
2062
|
+
or <code>false</code></p>
|
2063
|
+
</div>
|
2064
|
+
|
2065
|
+
<div class="desc">
|
2066
|
+
<h4>Description</h4>
|
2067
|
+
|
2068
|
+
<p>Synonym for <a href="#gray_q">gray?</a></p>
|
2069
|
+
</div>
|
2070
|
+
|
2071
|
+
<div class="sig">
|
2072
|
+
<h3 id="histogram_q">histogram?</h3>
|
2073
|
+
|
2074
|
+
<p><span class="arg">img</span>.histogram? ->
|
2075
|
+
<code>true</code> or <code>false</code></p>
|
2076
|
+
</div>
|
2077
|
+
|
2078
|
+
<div class="desc">
|
2079
|
+
<h4>Description</h4>
|
2080
|
+
|
2081
|
+
<p>Returns <code>true</code> if the image has 1024 unique
|
2082
|
+
colors or less.</p>
|
2083
|
+
|
2084
|
+
<h4>Returns</h4>
|
2085
|
+
|
2086
|
+
<p><code>true</code> or <code>false</code></p>
|
2087
|
+
|
2088
|
+
<h4>Magick API</h4>
|
2089
|
+
|
2090
|
+
<p>IsHistogramImage</p>
|
2091
|
+
</div>
|
2092
|
+
|
2093
|
+
<div class="sig">
|
2094
|
+
<h3 id="implode">implode</h3>
|
2095
|
+
|
2096
|
+
<p><span class="arg">img</span>.implode(<span class=
|
2097
|
+
"arg">amount</span>=0.50) -> <em>image</em></p>
|
2098
|
+
</div>
|
2099
|
+
|
2100
|
+
<div class="desc">
|
2101
|
+
<h4>Description</h4>
|
2102
|
+
|
2103
|
+
<p>A funhouse mirror effect. See the example below.</p>
|
2104
|
+
|
2105
|
+
<h4>Arguments</h4>
|
2106
|
+
|
2107
|
+
<p>A <code>Float</code> value. Increasing the absolute value of
|
2108
|
+
the argument increases the effect. The value may be positive
|
2109
|
+
for implosion, or negative for explosion. The default is
|
2110
|
+
0.50.</p>
|
2111
|
+
|
2112
|
+
<h4>Returns</h4>
|
2113
|
+
|
2114
|
+
<p>A new image</p>
|
2115
|
+
|
2116
|
+
<h4>Example</h4>
|
2117
|
+
|
2118
|
+
<p>This example is an animated image. Mouse over the image to
|
2119
|
+
start the animation.</p>
|
2120
|
+
|
2121
|
+
<p class="rollover"><a href=
|
2122
|
+
"javascript:popup('implode.rb.html')"><img onmouseover=
|
2123
|
+
"this.src='ex/implode.gif'" onmouseout=
|
2124
|
+
"this.src='ex/images/Flower_Hat.jpg'" src=
|
2125
|
+
"ex/images/Flower_Hat.jpg" alt="implode example" title=
|
2126
|
+
"Click the image to see the example script" /></a><img src=
|
2127
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
2128
|
+
"Mouse over the example to see the animation" /></p>
|
2129
|
+
|
2130
|
+
<h4>Magick API</h4>
|
2131
|
+
|
2132
|
+
<p>ImplodeImage</p>
|
2133
|
+
</div>
|
2134
|
+
|
2135
|
+
<div class="sig">
|
2136
|
+
<h3 id="import_pixels">import_pixels</h3>
|
2137
|
+
|
2138
|
+
<p><span class="arg">img</span>.import_pixels(<span class=
|
2139
|
+
"arg">x</span>, <span class="arg">y</span>, <span class=
|
2140
|
+
"arg">columns</span>, <span class="arg">rows</span>,
|
2141
|
+
<span class="arg">map</span>, <span class="arg">pixels</span>,
|
2142
|
+
<span class="arg">type</span>=CharPixel) ->
|
2143
|
+
<em>image</em></p>
|
2144
|
+
</div>
|
2145
|
+
|
2146
|
+
<div class="desc">
|
2147
|
+
<h4>Description</h4>
|
2148
|
+
|
2149
|
+
<p>Replaces the pixels in the specified rectangle with pixel
|
2150
|
+
data from the supplied array or string. When the <span class=
|
2151
|
+
"arg">pixels</span> argument is an array of pixel data, this
|
2152
|
+
method is the reverse of <code>export_pixels</code>. When the
|
2153
|
+
<span class="arg">pixels</span> argument is a string,
|
2154
|
+
<code>import_pixels</code> is ideal for loading very large
|
2155
|
+
amounts of binary pixel data.</p>
|
2156
|
+
|
2157
|
+
<h4>Arguments</h4>
|
2158
|
+
|
2159
|
+
<dl>
|
2160
|
+
<dt>x, y</dt>
|
2161
|
+
|
2162
|
+
<dd>The offset of the rectangle from the upper-left corner of
|
2163
|
+
the image</dd>
|
2164
|
+
|
2165
|
+
<dt>columns, rows</dt>
|
2166
|
+
|
2167
|
+
<dd>The width and height of the rectangle</dd>
|
2168
|
+
|
2169
|
+
<dt>map</dt>
|
2170
|
+
|
2171
|
+
<dd>A string describing <span class="imquote">the expected
|
2172
|
+
ordering of the pixel array. It can be any combination or
|
2173
|
+
order of R = red, G = green, B = blue, A = alpha, C = cyan, Y
|
2174
|
+
= yellow, M = magenta, K = black, or I = intensity (for
|
2175
|
+
grayscale).</span></dd>
|
2176
|
+
|
2177
|
+
<dt>pixels</dt>
|
2178
|
+
|
2179
|
+
<dd>
|
2180
|
+
The pixel data. Pixel data can be supplied as an array or
|
2181
|
+
as a string.
|
2182
|
+
|
2183
|
+
<dl>
|
2184
|
+
<dt>If <span class="arg">pixels</span> responds to
|
2185
|
+
<code>:to_str</code></dt>
|
2186
|
+
|
2187
|
+
<dd><code>import_pixels</code> assumes that <span class=
|
2188
|
+
"arg">pixels</span> can be converted to a string by
|
2189
|
+
<code>to_str</code> and that the result is a C array of
|
2190
|
+
the type specified by <span class="arg">type</span>
|
2191
|
+
containing binary pixel data in the order specified by
|
2192
|
+
<span class="arg">map</span>. The elements in the buffer
|
2193
|
+
must be in the range specified by <span class=
|
2194
|
+
"arg">type</span>.</dd>
|
2195
|
+
|
2196
|
+
<dt>Otherwise</dt>
|
2197
|
+
|
2198
|
+
<dd><code>import_pixels</code> assumes that <span class=
|
2199
|
+
"arg">pixels</span> is an array or an object that can be
|
2200
|
+
converted to an array by the <code>Kernel::Array</code>
|
2201
|
+
method. The elements in the array must be
|
2202
|
+
<code>Numeric</code> values in the range
|
2203
|
+
[0..QuantumRange]. In either case, the pixel data must be
|
2204
|
+
stored in scanline order: left-to-right and
|
2205
|
+
top-to-bottom.</dd>
|
2206
|
+
</dl>
|
2207
|
+
</dd>
|
2208
|
+
|
2209
|
+
<dt>type</dt>
|
2210
|
+
|
2211
|
+
<dd>A <a href="constants.html#StorageType">StorageType</a>
|
2212
|
+
value that specifies the type and range of the pixel data
|
2213
|
+
when <span class="arg">pixels</span> is a string.</dd>
|
2214
|
+
</dl>
|
2215
|
+
|
2216
|
+
<h4>Returns</h4>
|
2217
|
+
|
2218
|
+
<p>The image as transformed by the pixel data.</p>
|
2219
|
+
|
2220
|
+
<h4>Example</h4>
|
2221
|
+
<pre>
|
2222
|
+
# Replace the r'th scanline of the image using
|
2223
|
+
# pixel data stored in red-green-blue order.
|
2224
|
+
img.import_pixels(0, r, img.columns, 1, "RGB", scanline);
|
2225
|
+
</pre>
|
2226
|
+
|
2227
|
+
<h4>Example</h4>
|
2228
|
+
|
2229
|
+
<p>This example is contrived since there's no need to convert
|
2230
|
+
the <code>pixels</code> array into a string by calling
|
2231
|
+
<code>pack</code>, but it does demonstrate the use of a string
|
2232
|
+
<span class="arg">pixels</span> argument. Note that this
|
2233
|
+
example assumes that ImageMagick is configured with
|
2234
|
+
QuantumDepth=8.</p>
|
2235
|
+
<pre>
|
2236
|
+
hat = Image.read("Flower_Hat.jpg").first
|
2237
|
+
pixels = hat.export_pixels(0, 0, hat.columns, hat.rows, "RGB")
|
2238
|
+
char_buffer = pixels.pack("C*")
|
2239
|
+
img = Image.new(hat.columns, hat.rows)
|
2240
|
+
img.import_pixels(0, 0, hat.columns, hat.rows, "RGB", char_buffer, CharPixel)
|
2241
|
+
</pre>
|
2242
|
+
|
2243
|
+
<h4>See also</h4>
|
2244
|
+
|
2245
|
+
<p><a href="image1.html#constitute">constitute</a>, <a href=
|
2246
|
+
"image2.html#export_pixels">export_pixels</a>, <a href=
|
2247
|
+
"image3.html#store_pixels">store_pixels</a></p>
|
2248
|
+
|
2249
|
+
<h4>Magick API</h4>
|
2250
|
+
|
2251
|
+
<p>ImportImagePixels</p>
|
2252
|
+
|
2253
|
+
<h4>Note</h4>
|
2254
|
+
|
2255
|
+
<p>This method replaces the <code>constitute</code> method.</p>
|
2256
|
+
</div>
|
2257
|
+
|
2258
|
+
<div class="sig">
|
2259
|
+
<h3 id="inspect">inspect</h3>
|
2260
|
+
|
2261
|
+
<p><span class="arg">img</span>.inspect ->
|
2262
|
+
<em>string</em></p>
|
2263
|
+
</div>
|
2264
|
+
|
2265
|
+
<div class="desc">
|
2266
|
+
<h4>Description</h4>
|
2267
|
+
|
2268
|
+
<p>Constructs a description of the image as a string. The
|
2269
|
+
string contains some or all of the following fields:</p>
|
2270
|
+
|
2271
|
+
<dl>
|
2272
|
+
<dt>original_filename=></dt>
|
2273
|
+
|
2274
|
+
<dd>if different from the current filename.</dd>
|
2275
|
+
|
2276
|
+
<dt>filename</dt>
|
2277
|
+
|
2278
|
+
<dd>the current filename</dd>
|
2279
|
+
|
2280
|
+
<dt>[scene]</dt>
|
2281
|
+
|
2282
|
+
<dd>the scene number, if the image is part of an image
|
2283
|
+
sequence</dd>
|
2284
|
+
|
2285
|
+
<dt>format</dt>
|
2286
|
+
|
2287
|
+
<dd>the image format (GIF or JPEG, for example)</dd>
|
2288
|
+
|
2289
|
+
<dt>original width x height</dt>
|
2290
|
+
|
2291
|
+
<dd>if different from the current width x height</dd>
|
2292
|
+
|
2293
|
+
<dt>page width x height + x-offset + y-offset</dt>
|
2294
|
+
|
2295
|
+
<dd>if any of these fields is non-zero</dd>
|
2296
|
+
|
2297
|
+
<dt>storage class</dt>
|
2298
|
+
|
2299
|
+
<dd><em>DirectClass</em> or <em>PseudoClass</em></dd>
|
2300
|
+
|
2301
|
+
<dt>number of colors</dt>
|
2302
|
+
|
2303
|
+
<dd>total number of colors used in the image</dd>
|
2304
|
+
|
2305
|
+
<dt>mean error per pixel/normalized mean error/normalized
|
2306
|
+
maximum error</dt>
|
2307
|
+
|
2308
|
+
<dd>for PseudoClass images, if present</dd>
|
2309
|
+
|
2310
|
+
<dt><em>N</em>-bit</dt>
|
2311
|
+
|
2312
|
+
<dd>bit depth</dd>
|
2313
|
+
|
2314
|
+
<dt>blob size</dt>
|
2315
|
+
|
2316
|
+
<dd>if present</dd>
|
2317
|
+
</dl>
|
2318
|
+
|
2319
|
+
<h4>Example</h4>
|
2320
|
+
<pre>
|
2321
|
+
f.inspect » "images/Flower_Hat.jpg JPEG 200x250 DirectClass 8-bit 9kb"
|
2322
|
+
</pre>
|
2323
|
+
</div>
|
2324
|
+
|
2325
|
+
<div class="sig">
|
2326
|
+
<h3 id="level">level</h3>
|
2327
|
+
|
2328
|
+
<p><span class="arg">img</span>.level(<span class=
|
2329
|
+
"arg">black_point</span>=<code>0.0</code>, <span class=
|
2330
|
+
"arg">white_point</span>=<code>QuantumRange</code>,
|
2331
|
+
<span class="arg">gamma</span>=<code>1.0</code>) ->
|
2332
|
+
<em>image</em></p>
|
2333
|
+
</div>
|
2334
|
+
|
2335
|
+
<div class="desc">
|
2336
|
+
<h4>Description</h4>
|
2337
|
+
|
2338
|
+
<p class="imquote">Adjusts the levels of an image by scaling
|
2339
|
+
the colors falling between specified white and black points to
|
2340
|
+
the full available quantum range. The parameters provided
|
2341
|
+
represent the black, mid, and white points. The black point
|
2342
|
+
specifies the darkest color in the image. Colors darker than
|
2343
|
+
the black point are set to zero. Gamma specifies a gamma
|
2344
|
+
correction to apply to the image. White point specifies the
|
2345
|
+
lightest color in the image. Colors brighter than the white
|
2346
|
+
point are set to the maximum quantum value</p>
|
2347
|
+
|
2348
|
+
<h4>Arguments</h4>
|
2349
|
+
|
2350
|
+
<dl>
|
2351
|
+
<dt>black_point</dt>
|
2352
|
+
|
2353
|
+
<dd>A black point level in the range 0-<a href=
|
2354
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>.
|
2355
|
+
The default is 0.0.</dd>
|
2356
|
+
|
2357
|
+
<dt>mid_point</dt>
|
2358
|
+
|
2359
|
+
<dd>A white point level in the range 0..QuantumRange. The
|
2360
|
+
default is <a href=
|
2361
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a> -
|
2362
|
+
<span class="arg">black_point</span>.</dd>
|
2363
|
+
|
2364
|
+
<dt>gamma</dt>
|
2365
|
+
|
2366
|
+
<dd>A gamma correction in the range 0.0-10.0 The default is
|
2367
|
+
1.0.</dd>
|
2368
|
+
</dl>
|
2369
|
+
|
2370
|
+
<h4>Returns</h4>
|
2371
|
+
|
2372
|
+
<p>A new image</p>
|
2373
|
+
|
2374
|
+
<h4>Example</h4>
|
2375
|
+
|
2376
|
+
<p><code>level(0,1.50)</code></p>
|
2377
|
+
|
2378
|
+
<p class="rollover"><a href=
|
2379
|
+
"javascript:popup('level.rb.html')"><img onmouseover=
|
2380
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
2381
|
+
"this.src='ex/level.jpg'" src="ex/level.jpg" title=
|
2382
|
+
"Click to see the example script" alt="level example" /></a>
|
2383
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
2384
|
+
"Mouse over the image to see the original image" /></p>
|
2385
|
+
|
2386
|
+
<h4>Compatibility notes</h4>
|
2387
|
+
|
2388
|
+
<p>Prior to version 1.11.0 RMagick defined the signature for
|
2389
|
+
<code>level</code> incorrectly:</p>
|
2390
|
+
<pre>
|
2391
|
+
img.level(white_point, gamma, black_point) -> image # wrong!
|
2392
|
+
</pre>
|
2393
|
+
|
2394
|
+
<p>That is, the <code>gamma</code> and <code>white_point</code>
|
2395
|
+
arguments were swapped. In an effort to maintain compatibility
|
2396
|
+
with older scripts that expect that signature,
|
2397
|
+
<code>level</code> inspects its arguments and will interchange
|
2398
|
+
<code>white_point</code> and gamma if they "look" incorrect.
|
2399
|
+
That is, if <code>gamma</code> is > 10.0, or if
|
2400
|
+
<code>white_point</code> is < 10.0, or if <code>gamma</code>
|
2401
|
+
> <code>white_point</code>, then <code>level</code> will
|
2402
|
+
swap them.</p>
|
2403
|
+
|
2404
|
+
<p>If you want to avoid this behavior, use the
|
2405
|
+
<code>level2</code> method instead. The <code>level2</code>
|
2406
|
+
method is exactly the same as <code>level</code> except that it
|
2407
|
+
never swaps the arguments.</p>
|
2408
|
+
|
2409
|
+
<h4>See also</h4>
|
2410
|
+
|
2411
|
+
<p><a href="#level_channel">level_channel</a></p>
|
2412
|
+
|
2413
|
+
<h4>Magick API</h4>
|
2414
|
+
|
2415
|
+
<p>LevelImage</p>
|
2416
|
+
</div>
|
2417
|
+
|
2418
|
+
<div class="sig">
|
2419
|
+
<h3 id="level_channel">level_channel</h3>
|
2420
|
+
|
2421
|
+
<p><span class="arg">img</span>.level_channel(<span class=
|
2422
|
+
"arg">channel</span>, <span class="arg">black_point</span>=0,
|
2423
|
+
<span class="arg">white_point</span>=QuantumRange -
|
2424
|
+
black_point, <span class="arg">gamma</span>=1.0) ->
|
2425
|
+
<em>image</em></p>
|
2426
|
+
</div>
|
2427
|
+
|
2428
|
+
<div class="desc">
|
2429
|
+
<h4>Description</h4>Same as level but operates only on the
|
2430
|
+
specified channel.
|
2431
|
+
|
2432
|
+
<h4>Arguments</h4>
|
2433
|
+
|
2434
|
+
<dl>
|
2435
|
+
<dt>channel</dt>
|
2436
|
+
|
2437
|
+
<dd>A <a href="constants.html#ChannelType">ChannelType</a>
|
2438
|
+
value.</dd>
|
2439
|
+
|
2440
|
+
<dt>black_point</dt>
|
2441
|
+
|
2442
|
+
<dd>A black point level in the range 0-<a href=
|
2443
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>.
|
2444
|
+
The default is 0.0.</dd>
|
2445
|
+
|
2446
|
+
<dt>white_point</dt>
|
2447
|
+
|
2448
|
+
<dd>A white point level in the range 0..QuantumRange. The
|
2449
|
+
default is <a href=
|
2450
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a> -
|
2451
|
+
<span class="arg">black_point</span>.</dd>
|
2452
|
+
|
2453
|
+
<dt>gamma</dt>
|
2454
|
+
|
2455
|
+
<dd>A gamma correction in the range 0.0-10.0 The default is
|
2456
|
+
1.0.</dd>
|
2457
|
+
</dl>
|
2458
|
+
|
2459
|
+
<h4>Returns</h4>
|
2460
|
+
|
2461
|
+
<p>A new image</p>
|
2462
|
+
|
2463
|
+
<h4>See also</h4>
|
2464
|
+
|
2465
|
+
<p><a href="#level">level</a>, <a href=
|
2466
|
+
"#levelize_channel">levelize_channel</a></p>
|
2467
|
+
|
2468
|
+
<h4>Magick API</h4>
|
2469
|
+
|
2470
|
+
<p>LevelImageChannel</p>
|
2471
|
+
</div>
|
2472
|
+
|
2473
|
+
<div class="sig">
|
2474
|
+
<h3 id="level_colors">level_colors</h3>
|
2475
|
+
|
2476
|
+
<p><span class="arg">img</span>.level_colors(<span class=
|
2477
|
+
"arg">black_color</span>="black", <span class=
|
2478
|
+
"arg">white_color</span>="white", <span class=
|
2479
|
+
"arg">invert</span>=<code>true</code>) -> <em>image</em></p>
|
2480
|
+
</div>
|
2481
|
+
|
2482
|
+
<div class="desc">
|
2483
|
+
<h4>Description</h4>
|
2484
|
+
|
2485
|
+
<p>When <span class="arg">invert</span> is true, black and
|
2486
|
+
white will be mapped to the <span class=
|
2487
|
+
"arg">black_color</span> and <span class=
|
2488
|
+
"arg">white_color</span> colors, compressing all other colors
|
2489
|
+
linearly. When <span class="arg">invert</span> is false, black
|
2490
|
+
and white will be mapped to the <span class=
|
2491
|
+
"arg">black_color</span> and <span class=
|
2492
|
+
"arg">white_color</span> colors, stretching all other colors
|
2493
|
+
linearly. The default is <code>true</code>.</p>
|
2494
|
+
|
2495
|
+
<h4>Arguments</h4>
|
2496
|
+
|
2497
|
+
<dl>
|
2498
|
+
<dt>black_color</dt>
|
2499
|
+
|
2500
|
+
<dd>The color to be mapped to black. The default is
|
2501
|
+
"black".</dd>
|
2502
|
+
|
2503
|
+
<dt>white_color</dt>
|
2504
|
+
|
2505
|
+
<dd>The color to be mapped to white. The default is
|
2506
|
+
"white".</dd>
|
2507
|
+
|
2508
|
+
<dt>invert</dt>
|
2509
|
+
|
2510
|
+
<dd>See the description above.</dd>
|
2511
|
+
</dl>
|
2512
|
+
|
2513
|
+
<h4>Returns</h4>
|
2514
|
+
|
2515
|
+
<p>A new image</p>
|
2516
|
+
|
2517
|
+
<h4>Example</h4>
|
2518
|
+
|
2519
|
+
<p class="rollover"><a href=
|
2520
|
+
"javascript:popup('level_colors.rb.html')"><img onmouseover=
|
2521
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
2522
|
+
"this.src='ex/level_colors.jpg'" src="ex/level_colors.jpg"
|
2523
|
+
title="Click to see the example script" alt=
|
2524
|
+
"level_colors example" /></a> <img src="ex/images/spin.gif"
|
2525
|
+
alt="" class="spin" title=
|
2526
|
+
"Mouse over the image to see the original image" /></p>
|
2527
|
+
|
2528
|
+
<h4>See also</h4>
|
2529
|
+
|
2530
|
+
<p>This method corresponds to the +level-colors option. See
|
2531
|
+
<a href=
|
2532
|
+
"http://www.imagemagick.org/Usage/color/#level-colors">Examples
|
2533
|
+
of ImageMagick Usage</a> for more information.</p>
|
2534
|
+
|
2535
|
+
<h4>Magick API</h4>
|
2536
|
+
|
2537
|
+
<p>LevelImageColors</p>
|
2538
|
+
</div>
|
2539
|
+
|
2540
|
+
<div class="sig">
|
2541
|
+
<h3 id="levelize_channel">levelize_channel</h3>
|
2542
|
+
|
2543
|
+
<p><span class="arg">img</span>.levelize_channel(<span class=
|
2544
|
+
"arg">black_point</span>, <span class="arg">white_point</span>,
|
2545
|
+
<span class="arg">gamma</span>=1.0 [, <span class=
|
2546
|
+
"arg">channel</span>...]) -> <em>image</em></p>
|
2547
|
+
</div>
|
2548
|
+
|
2549
|
+
<div class="desc">
|
2550
|
+
<h4>Description</h4>
|
2551
|
+
|
2552
|
+
<p>Maps black and white to the specified points. The reverse of
|
2553
|
+
<a href="#level_channel">level_channel</a>.</p>
|
2554
|
+
|
2555
|
+
<h4>Arguments</h4>
|
2556
|
+
|
2557
|
+
<dl>
|
2558
|
+
<dt>black_point</dt>
|
2559
|
+
|
2560
|
+
<dd>A black point level in the range 0..<a href=
|
2561
|
+
"constants.html#Miscellaneous_constants">QuantumRange</a>.
|
2562
|
+
This argument is required.</dd>
|
2563
|
+
|
2564
|
+
<dt>white_point</dt>
|
2565
|
+
|
2566
|
+
<dd>A white point level in the range 0..QuantumRange. The
|
2567
|
+
default is QuantumRange - <span class=
|
2568
|
+
"arg">black_point</span>.</dd>
|
2569
|
+
|
2570
|
+
<dt>gamma</dt>
|
2571
|
+
|
2572
|
+
<dd>A gamma correction in the range 0.0-10.0 The default is
|
2573
|
+
1.0.</dd>
|
2574
|
+
|
2575
|
+
<dt>channel...</dt>
|
2576
|
+
|
2577
|
+
<dd>0 or more <a href=
|
2578
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
2579
|
+
channels are specified, the default channels are the red,
|
2580
|
+
green, and blue channels.</dd>
|
2581
|
+
</dl>
|
2582
|
+
|
2583
|
+
<h4>Returns</h4>
|
2584
|
+
|
2585
|
+
<p>A new image</p>
|
2586
|
+
|
2587
|
+
<h4>See also</h4>
|
2588
|
+
|
2589
|
+
<p><a href="#level">level</a>, <a href=
|
2590
|
+
"#level_channel">level_channel</a></p>
|
2591
|
+
|
2592
|
+
<p>This method corresponds to the +level option. See <a href=
|
2593
|
+
"http://www.imagemagick.org/Usage/color/#level_plus">Examples
|
2594
|
+
of ImageMagick Usage</a> for more information.</p>
|
2595
|
+
|
2596
|
+
<h4>Magick API</h4>
|
2597
|
+
|
2598
|
+
<p>LevelizeImageChannel</p>
|
2599
|
+
</div>
|
2600
|
+
|
2601
|
+
<div class="sig">
|
2602
|
+
<h3 id="linear_stretch">linear_stretch</h3>
|
2603
|
+
|
2604
|
+
<p><span class="arg">img</span>.linear_stretch(<span class=
|
2605
|
+
"arg">black_point</span>[, <span class=
|
2606
|
+
"arg">white_point</span>]) -> <em>image</em></p>
|
2607
|
+
</div>
|
2608
|
+
|
2609
|
+
<div class="desc">
|
2610
|
+
<h4>Description</h4>
|
2611
|
+
|
2612
|
+
<p class="imquote">Linear with saturation stretch.</p>
|
2613
|
+
|
2614
|
+
<h4>Arguments</h4>
|
2615
|
+
|
2616
|
+
<dl>
|
2617
|
+
<dt>black_point</dt>
|
2618
|
+
|
2619
|
+
<dd>black out at most this many pixels. Specify an absolute
|
2620
|
+
number of pixels as a numeric value, or a percentage as a
|
2621
|
+
string in the form 'NN%'.</dd>
|
2622
|
+
|
2623
|
+
<dt>white_point</dt>
|
2624
|
+
|
2625
|
+
<dd>burn at most this many pixels. Specify an absolute number
|
2626
|
+
of pixels as a numeric value, or a percentage as a string in
|
2627
|
+
the form 'NN%'. This argument is optional. If not specified
|
2628
|
+
the default is <code>all pixels - black_point
|
2629
|
+
pixels</code>.</dd>
|
2630
|
+
</dl>
|
2631
|
+
|
2632
|
+
<h4>Returns</h4>
|
2633
|
+
|
2634
|
+
<p>A new image</p>
|
2635
|
+
|
2636
|
+
<h4>Magick API</h4>
|
2637
|
+
|
2638
|
+
<p>LinearStretchImage</p>
|
2639
|
+
</div>
|
2640
|
+
|
2641
|
+
<div class="sig">
|
2642
|
+
<h3 id="liquid_rescale">liquid_rescale</h3>
|
2643
|
+
|
2644
|
+
<p><span class="arg">img</span>.liquid_rescale(<span class=
|
2645
|
+
"arg">new_width</span>, <span class="arg">new_height</span>,
|
2646
|
+
<span class="arg">delta_x</span>=0.0, <span class=
|
2647
|
+
"arg">rigidity</span>=0.0) -> <em>image</em></p>
|
2648
|
+
</div>
|
2649
|
+
|
2650
|
+
<div class="desc">
|
2651
|
+
<h4>Description</h4>
|
2652
|
+
|
2653
|
+
<p><span class="imquote">Rescale image with seam
|
2654
|
+
carving.</span> To use this method, you must have installed and
|
2655
|
+
configured ImageMagick to use the <a href=
|
2656
|
+
"http://liblqr.wikidot.com/">Liquid Rescale Library</a>.</p>
|
2657
|
+
|
2658
|
+
<h4>Arguments</h4>
|
2659
|
+
|
2660
|
+
<dl>
|
2661
|
+
<dt>new_width, new_height</dt>
|
2662
|
+
|
2663
|
+
<dd>
|
2664
|
+
<p>The desired width and height. Should not exceed 200% of
|
2665
|
+
the original dimension.</p>
|
2666
|
+
</dd>
|
2667
|
+
|
2668
|
+
<dt>delta_x</dt>
|
2669
|
+
|
2670
|
+
<dd>
|
2671
|
+
<p class="imquote">Maximum seam transversal step (0 means
|
2672
|
+
straight seams).</p>
|
2673
|
+
</dd>
|
2674
|
+
|
2675
|
+
<dt>rigidity</dt>
|
2676
|
+
|
2677
|
+
<dd>
|
2678
|
+
<p class="imquote">Introduce a bias for non-straight seams
|
2679
|
+
(typically 0).</p>
|
2680
|
+
</dd>
|
2681
|
+
</dl>
|
2682
|
+
|
2683
|
+
<h4>Returns</h4>
|
2684
|
+
|
2685
|
+
<p>A new image</p>
|
2686
|
+
|
2687
|
+
<h4>Magick API</h4>
|
2688
|
+
|
2689
|
+
<p>LiquidRescaleImage</p>
|
2690
|
+
</div>
|
2691
|
+
|
2692
|
+
<div class="sig">
|
2693
|
+
<h3 id="magnify">magnify</h3>
|
2694
|
+
|
2695
|
+
<p><span class="arg">img</span>.magnify ->
|
2696
|
+
<em>image</em></p>
|
2697
|
+
</div>
|
2698
|
+
|
2699
|
+
<div class="desc">
|
2700
|
+
<h4>Description</h4>
|
2701
|
+
|
2702
|
+
<p>A convenience method that scales the receiver to twice its
|
2703
|
+
size.</p>
|
2704
|
+
|
2705
|
+
<h4>Returns</h4>
|
2706
|
+
|
2707
|
+
<p>A new image</p>
|
2708
|
+
|
2709
|
+
<h4>See also</h4>
|
2710
|
+
|
2711
|
+
<p><a href="#magnify_bang">magnify!</a>, <a href=
|
2712
|
+
"#minify">minify</a>, <a href="image3.html#resize">resize</a>,
|
2713
|
+
<a href="image3.html#scale">scale</a></p>
|
2714
|
+
|
2715
|
+
<h4>Magick API</h4>
|
2716
|
+
|
2717
|
+
<p>MagnifyImage</p>
|
2718
|
+
</div>
|
2719
|
+
|
2720
|
+
<div class="sig">
|
2721
|
+
<h3 id="magnify_bang">magnify!</h3>
|
2722
|
+
|
2723
|
+
<p><span class="arg">img</span>.magnify! ->
|
2724
|
+
<em>self</em></p>
|
2725
|
+
</div>
|
2726
|
+
|
2727
|
+
<div class="desc">
|
2728
|
+
<h4>Description</h4>
|
2729
|
+
|
2730
|
+
<p>In-place form of <a href="#magnify">magnify</a></p>
|
2731
|
+
|
2732
|
+
<h4>Returns</h4>self
|
2733
|
+
</div>
|
2734
|
+
|
2735
|
+
<div class="sig">
|
2736
|
+
<h3 id="map">map</h3>
|
2737
|
+
|
2738
|
+
<p><span class="arg">img</span>.map(<span class=
|
2739
|
+
"arg">img</span>, <span class="arg">dither</span>=false) ->
|
2740
|
+
<em>image</em></p>
|
2741
|
+
</div>
|
2742
|
+
|
2743
|
+
<div class="desc">
|
2744
|
+
<h4>Description</h4>
|
2745
|
+
|
2746
|
+
<p class="imquote">Replaces the colors of an image with the
|
2747
|
+
closest color from a reference image.</p>
|
2748
|
+
|
2749
|
+
<h4>Arguments</h4>
|
2750
|
+
|
2751
|
+
<dl>
|
2752
|
+
<dt>img</dt>
|
2753
|
+
|
2754
|
+
<dd>The reference image. May be either another image or an
|
2755
|
+
Image object.</dd>
|
2756
|
+
|
2757
|
+
<dt>dither</dt>
|
2758
|
+
|
2759
|
+
<dd>If true, dithers the mapped image.</dd>
|
2760
|
+
</dl>
|
2761
|
+
|
2762
|
+
<h4>Returns</h4>
|
2763
|
+
|
2764
|
+
<p>A new image</p>
|
2765
|
+
|
2766
|
+
<h4>Notes</h4>
|
2767
|
+
|
2768
|
+
<p>This method is deprecated when using ImageMagick 6.4.3-6 and
|
2769
|
+
later. Use <a href="image3.html#remap">remap</a> instead.</p>
|
2770
|
+
|
2771
|
+
<h4>See also</h4>
|
2772
|
+
|
2773
|
+
<p><a href="ilist.html#map">ImageList#map</a></p>
|
2774
|
+
|
2775
|
+
<h4>Magick API</h4>
|
2776
|
+
|
2777
|
+
<p>MapImage</p>
|
2778
|
+
</div>
|
2779
|
+
|
2780
|
+
<div class="sig">
|
2781
|
+
<h3 id="mask">mask</h3>
|
2782
|
+
|
2783
|
+
<p><span class="arg">img</span>.mask([<span class=
|
2784
|
+
"arg">image</span> or <code>nil</code>]) ->
|
2785
|
+
<em>mask_image</em></p>
|
2786
|
+
</div>
|
2787
|
+
|
2788
|
+
<div class="desc">
|
2789
|
+
<h4>Description</h4>
|
2790
|
+
|
2791
|
+
<p>Sets an image clip mask created from the specified mask
|
2792
|
+
image. <span class="imquote">The mask image must have the same
|
2793
|
+
dimensions as the image being masked.</span> If not, the mask
|
2794
|
+
image is resized to match. <span class="imquote">If the mask
|
2795
|
+
image has an alpha channel the opacity of each pixel is used to
|
2796
|
+
define the mask. Otherwise, the intensity (gray level) of each
|
2797
|
+
pixel is used.</span></p>
|
2798
|
+
|
2799
|
+
<p>In general, if the mask image does not have an alpha
|
2800
|
+
channel, a white pixel in the mask prevents changes to the
|
2801
|
+
corresponding pixel in the image being masked, while a black
|
2802
|
+
pixel allows changes. A pixel that is neither black nor white
|
2803
|
+
will allow partial changes depending on its intensity.</p>
|
2804
|
+
|
2805
|
+
<p>Use <a href="image1.html#alpha">alpha</a> to specify whether
|
2806
|
+
or not the mask image has an alpha channel.</p>
|
2807
|
+
|
2808
|
+
<h4>Arguments</h4>
|
2809
|
+
|
2810
|
+
<p>If the value is an imagelist, uses the current image as the
|
2811
|
+
mask image. To remove the mask, pass <code>nil</code> instead
|
2812
|
+
of an image.</p>
|
2813
|
+
|
2814
|
+
<p>To get a copy of the current mask, omit the argument
|
2815
|
+
entirely.</p>
|
2816
|
+
|
2817
|
+
<h4>Example</h4>
|
2818
|
+
|
2819
|
+
<p class="rollover"><a href=
|
2820
|
+
"javascript:popup('mask.rb.html')"><img src="ex/mask.jpg" alt=
|
2821
|
+
"mask example" title="Click to see the example script"
|
2822
|
+
onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
2823
|
+
"this.src='ex/mask.jpg'" /></a> <img src="ex/images/spin.gif"
|
2824
|
+
alt="" class="spin" title=
|
2825
|
+
"Mouse over the example to see the original image" /></p>
|
2826
|
+
|
2827
|
+
<h4>Returns</h4>
|
2828
|
+
|
2829
|
+
<p>A copy of the current mask, or <code>nil</code> if no mask
|
2830
|
+
is defined.</p>
|
2831
|
+
|
2832
|
+
<h4>Notes</h4>
|
2833
|
+
|
2834
|
+
<p>This method makes a copy of the image to use as the mask.
|
2835
|
+
This means that if you want to change the mask you must call
|
2836
|
+
this method to establish the changed image as the mask.</p>
|
2837
|
+
</div>
|
2838
|
+
|
2839
|
+
<div class="sig">
|
2840
|
+
<h3 id="matte_fill_to_border">matte_fill_to_border</h3>
|
2841
|
+
|
2842
|
+
<p><span class=
|
2843
|
+
"arg">img</span>.matte_fill_to_border(<span class=
|
2844
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
2845
|
+
<em>image</em></p>
|
2846
|
+
</div>
|
2847
|
+
|
2848
|
+
<div class="desc">
|
2849
|
+
<h4>Description</h4>
|
2850
|
+
|
2851
|
+
<p>Makes transparent all the pixels that are neighbors of the
|
2852
|
+
pixel at <span class="arg">x</span>,<span class="arg">y</span>
|
2853
|
+
and are not the border color.</p>
|
2854
|
+
|
2855
|
+
<h4>Arguments</h4>
|
2856
|
+
|
2857
|
+
<p>The x- and y- coordinates of the target pixel.</p>
|
2858
|
+
|
2859
|
+
<h4>Returns</h4>
|
2860
|
+
|
2861
|
+
<p>A new image</p>
|
2862
|
+
|
2863
|
+
<h4>Example</h4>
|
2864
|
+
|
2865
|
+
<p>In this example the border color is black. The fill starts
|
2866
|
+
in the center and makes all the pixels transparent until it
|
2867
|
+
reaches a black pixel. The resulting image has been composited
|
2868
|
+
over a plasma background, which shows through the transparent
|
2869
|
+
pixels.</p>
|
2870
|
+
|
2871
|
+
<p class="rollover"><a href=
|
2872
|
+
"javascript:popup('matte_fill_to_border.rb.html')"><img src=
|
2873
|
+
"ex/matte_fill_to_border_after.gif" onmouseover=
|
2874
|
+
"this.src='ex/matte_fill_to_border_before.gif'" onmouseout=
|
2875
|
+
"this.src='ex/matte_fill_to_border_after.gif'" alt=
|
2876
|
+
"matte_fill_to_border example" title=
|
2877
|
+
"Click to see the example script" /></a> <img src=
|
2878
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
2879
|
+
"Mouse over the image to see the original image" /></p>
|
2880
|
+
|
2881
|
+
<h4>See also</h4>
|
2882
|
+
|
2883
|
+
<p><a href="#matte_floodfill">matte_floodfill</a>, <a href=
|
2884
|
+
"draw.html#matte">Draw#matte</a></p>
|
2885
|
+
|
2886
|
+
<h4>Magick API</h4>
|
2887
|
+
|
2888
|
+
<p>MatteFloodfillImage</p>
|
2889
|
+
</div>
|
2890
|
+
|
2891
|
+
<div class="sig">
|
2892
|
+
<h3 id="matte_floodfill">matte_floodfill</h3>
|
2893
|
+
|
2894
|
+
<p><span class="arg">img</span>.matte_floodfill(<span class=
|
2895
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
2896
|
+
<em>image</em></p>
|
2897
|
+
</div>
|
2898
|
+
|
2899
|
+
<div class="desc">
|
2900
|
+
<h4>Description</h4>
|
2901
|
+
|
2902
|
+
<p>Makes transparent all the pixels that are the same color as
|
2903
|
+
the pixel at <span class="arg">x</span>, <span class=
|
2904
|
+
"arg">y</span>, and are neighbors.</p>
|
2905
|
+
|
2906
|
+
<h4>Arguments</h4>
|
2907
|
+
|
2908
|
+
<p>The x- and y-coordinates of the target pixel.</p>
|
2909
|
+
|
2910
|
+
<h4>Returns</h4>
|
2911
|
+
|
2912
|
+
<p>A new image</p>
|
2913
|
+
|
2914
|
+
<h4>Example</h4>
|
2915
|
+
|
2916
|
+
<p>In this example the fill starts at the center pixel and
|
2917
|
+
replaces all the yellow pixels - the color of the center pixel.
|
2918
|
+
The resulting image has been composited over a plasma
|
2919
|
+
background, which shows through the transparent pixels.</p>
|
2920
|
+
|
2921
|
+
<p class="rollover"><a href=
|
2922
|
+
"javascript:popup('matte_floodfill.rb.html')"><img src=
|
2923
|
+
"ex/matte_floodfill_after.gif" onmouseover=
|
2924
|
+
"this.src='ex/matte_floodfill_before.gif'" onmouseout=
|
2925
|
+
"this.src='ex/matte_floodfill_after.gif'" alt=
|
2926
|
+
"matte_floodfill example" title=
|
2927
|
+
"Click to see the example script" /></a> <img src=
|
2928
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
2929
|
+
"Mouse over the image to see the original image" /></p>
|
2930
|
+
|
2931
|
+
<h4>See also</h4>
|
2932
|
+
|
2933
|
+
<p><a href="#matte_replace">matte_replace</a>, <a href=
|
2934
|
+
"draw.html#matte">Draw#matte</a></p>
|
2935
|
+
|
2936
|
+
<h4>Magick API</h4>
|
2937
|
+
|
2938
|
+
<p>MatteFloodfilImage</p>
|
2939
|
+
</div>
|
2940
|
+
|
2941
|
+
<div class="sig">
|
2942
|
+
<h3 id="matte_point">matte_point</h3>
|
2943
|
+
|
2944
|
+
<p><span class="arg">img</span>.matte_point(<span class=
|
2945
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
2946
|
+
<em>image</em></p>
|
2947
|
+
</div>
|
2948
|
+
|
2949
|
+
<div class="desc">
|
2950
|
+
<h4>Description</h4>
|
2951
|
+
|
2952
|
+
<p>Makes the pixel at <span class="arg">x</span>, <span class=
|
2953
|
+
"arg">y</span> transparent. This method makes a copy of the
|
2954
|
+
image, just to make one pixel transparent. I recommend using
|
2955
|
+
the Draw#matte method instead.</p>
|
2956
|
+
|
2957
|
+
<h4>Arguments</h4>
|
2958
|
+
|
2959
|
+
<p>The x- and y-coordinates of the target pixel.</p>
|
2960
|
+
|
2961
|
+
<h4>Returns</h4>
|
2962
|
+
|
2963
|
+
<p>A new image</p>
|
2964
|
+
|
2965
|
+
<h4>See also</h4>
|
2966
|
+
|
2967
|
+
<p><a href="draw.html#matte">Draw#matte</a></p>
|
2968
|
+
</div>
|
2969
|
+
|
2970
|
+
<div class="sig">
|
2971
|
+
<h3 id="matte_replace">matte_replace</h3>
|
2972
|
+
|
2973
|
+
<p><span class="arg">img</span>.matte_replace(<span class=
|
2974
|
+
"arg">x</span>, <span class="arg">y</span>) ->
|
2975
|
+
<em>image</em></p>
|
2976
|
+
</div>
|
2977
|
+
|
2978
|
+
<div class="desc">
|
2979
|
+
<h4>Description</h4>
|
2980
|
+
|
2981
|
+
<p>Makes transparent all the pixels that are the same color as
|
2982
|
+
the pixel at <span class="arg">x</span>, <span class=
|
2983
|
+
"arg">y</span>.</p>
|
2984
|
+
|
2985
|
+
<h4>Arguments</h4>The x- and y-coordinates of the target pixel.
|
2986
|
+
|
2987
|
+
<h4>Returns</h4>
|
2988
|
+
|
2989
|
+
<p>A new image</p>
|
2990
|
+
|
2991
|
+
<h4>Example</h4>
|
2992
|
+
|
2993
|
+
<p>In this example the target pixel is a black pixel in the
|
2994
|
+
center of the uppermost circle. The matte_replace method makes
|
2995
|
+
all the black pixels in the image transparent. The resulting
|
2996
|
+
image has been composited over a plasma background, which shows
|
2997
|
+
through the transparent pixels.</p>
|
2998
|
+
|
2999
|
+
<p class="rollover"><a href=
|
3000
|
+
"javascript:popup('matte_replace.rb.html')"><img onmouseover=
|
3001
|
+
"this.src='ex/matte_replace_before.gif'" onmouseout=
|
3002
|
+
"this.src='ex/matte_replace_after.gif'" src=
|
3003
|
+
"ex/matte_replace_after.gif" alt="matte_replace example" title=
|
3004
|
+
"Click to see the example script" /></a> <img src=
|
3005
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3006
|
+
"Mouse over the image to see the original image" /></p>
|
3007
|
+
|
3008
|
+
<h4>See also</h4>
|
3009
|
+
|
3010
|
+
<p><a href="image3.html#transparent">transparent</a>, <a href=
|
3011
|
+
"draw.html#matte">Draw#matte</a></p>
|
3012
|
+
|
3013
|
+
<h4>Magick API</h4>
|
3014
|
+
|
3015
|
+
<p>TransparentImage</p>
|
3016
|
+
</div>
|
3017
|
+
|
3018
|
+
<div class="sig">
|
3019
|
+
<h3 id="matte_reset_bang">matte_reset!</h3>
|
3020
|
+
|
3021
|
+
<p><span class="arg">img</span>.matte_reset! ->
|
3022
|
+
<em>self</em></p>
|
3023
|
+
</div>
|
3024
|
+
|
3025
|
+
<div class="desc">
|
3026
|
+
<h4>Description</h4>
|
3027
|
+
|
3028
|
+
<p>Makes all the pixels in the image transparent.</p>
|
3029
|
+
|
3030
|
+
<h4>Returns</h4>
|
3031
|
+
|
3032
|
+
<p>self</p>
|
3033
|
+
|
3034
|
+
<h4>See also</h4>
|
3035
|
+
|
3036
|
+
<p><a href="imageattrs.html#opacity">opacity=</a></p>
|
3037
|
+
|
3038
|
+
<h4>Magick API</h4>SetImageOpacity
|
3039
|
+
</div>
|
3040
|
+
|
3041
|
+
<div class="sig">
|
3042
|
+
<h3 id="median_filter">median_filter</h3>
|
3043
|
+
|
3044
|
+
<p><span class="arg">img</span>.median_filter(<span class=
|
3045
|
+
"arg">radius</span>=1.0) -> <em>image</em></p>
|
3046
|
+
</div>
|
3047
|
+
|
3048
|
+
<div class="desc">
|
3049
|
+
<h4>Description</h4>
|
3050
|
+
|
3051
|
+
<p class="imquote">Applies a digital filter that improves the
|
3052
|
+
quality of a noisy image. Each pixel is replaced by the median
|
3053
|
+
in a set of neighboring pixels as defined by radius.</p>
|
3054
|
+
|
3055
|
+
<h4>Arguments</h4>
|
3056
|
+
|
3057
|
+
<p>The filter radius. The larger the value, the longer it takes
|
3058
|
+
to render. Values larger than 8 or 9 may take longer than you
|
3059
|
+
want to wait, and will not have significantly better results
|
3060
|
+
than much smaller values.</p>
|
3061
|
+
|
3062
|
+
<h4>Returns</h4>
|
3063
|
+
|
3064
|
+
<p>A new image</p>
|
3065
|
+
|
3066
|
+
<h4>Example</h4>
|
3067
|
+
|
3068
|
+
<p>The left side of the image has been modified by <a href=
|
3069
|
+
"image1.html#add_noise">add_noise</a>. The right side has been
|
3070
|
+
filtered by median_filter(0.05).</p>
|
3071
|
+
|
3072
|
+
<p><a href=
|
3073
|
+
"javascript:popup('median_filter.rb.html')"><img src="ex/median_filter.jpg"
|
3074
|
+
alt="median_filter example" /></a></p>
|
3075
|
+
|
3076
|
+
<h4>See also</h4>
|
3077
|
+
|
3078
|
+
<p><a href="#enhance">enhance</a>, <a href=
|
3079
|
+
"image3.html#reduce_noise">reduce_noise</a>, <a href=
|
3080
|
+
"image3.html#unsharp_mask">unsharp_mask</a></p>
|
3081
|
+
|
3082
|
+
<h4>Magick API</h4>
|
3083
|
+
|
3084
|
+
<p>MedianFilterImage</p>
|
3085
|
+
</div>
|
3086
|
+
|
3087
|
+
<div class="sig">
|
3088
|
+
<h3 id="minify">minify</h3>
|
3089
|
+
|
3090
|
+
<p><span class="arg">img</span>.minify -> <em>image</em></p>
|
3091
|
+
</div>
|
3092
|
+
|
3093
|
+
<div class="desc">
|
3094
|
+
<h4>Description</h4>
|
3095
|
+
|
3096
|
+
<p>A convenience method that scales the receiver to half its
|
3097
|
+
size.</p>
|
3098
|
+
|
3099
|
+
<h4>Returns</h4>
|
3100
|
+
|
3101
|
+
<p>A new image</p>
|
3102
|
+
|
3103
|
+
<h4>See also</h4>
|
3104
|
+
|
3105
|
+
<p><a href="#minify_bang">minify!</a> <a href=
|
3106
|
+
"#magnify">magnify</a>, <a href=
|
3107
|
+
"image3.html#resize">resize</a>, <a href=
|
3108
|
+
"image3.html#sample">sample</a>, <a href=
|
3109
|
+
"image3.html#scale">scale</a>, <a href=
|
3110
|
+
"image3.html#thumbnail">thumbnail</a></p>
|
3111
|
+
|
3112
|
+
<h4>Magick API</h4>
|
3113
|
+
|
3114
|
+
<p>MinifyImage</p>
|
3115
|
+
</div>
|
3116
|
+
|
3117
|
+
<div class="sig">
|
3118
|
+
<h3 id="minify_bang">minify!</h3>
|
3119
|
+
|
3120
|
+
<p><span class="arg">img</span>.minify! -> <em>self</em></p>
|
3121
|
+
</div>
|
3122
|
+
|
3123
|
+
<div class="desc">
|
3124
|
+
<h4>Description</h4>
|
3125
|
+
|
3126
|
+
<p>In-place form of <a href="#minify">minify</a>.</p>
|
3127
|
+
|
3128
|
+
<h4>Returns</h4>
|
3129
|
+
|
3130
|
+
<p>self</p>
|
3131
|
+
</div>
|
3132
|
+
|
3133
|
+
<div class="sig">
|
3134
|
+
<h3 id="modulate">modulate</h3>
|
3135
|
+
|
3136
|
+
<p><span class="arg">img</span>.modulate(<span class=
|
3137
|
+
"arg">brightness</span>=1.0, <span class=
|
3138
|
+
"arg">saturation</span>=1.0, <span class="arg">hue</span>=1.0)
|
3139
|
+
-> <em>image</em></p>
|
3140
|
+
</div>
|
3141
|
+
|
3142
|
+
<div class="desc">
|
3143
|
+
<h4>Description</h4>
|
3144
|
+
|
3145
|
+
<p>Changes the brightness, saturation, and hue.</p>
|
3146
|
+
|
3147
|
+
<h4>Arguments</h4>
|
3148
|
+
|
3149
|
+
<p>The percent change in the brightness, saturation, and hue,
|
3150
|
+
represented as Float numbers. For example, 0.25 means "25%".
|
3151
|
+
All three arguments may be omitted. The default value of each
|
3152
|
+
argument is 1.0, that is, 100%.</p>
|
3153
|
+
|
3154
|
+
<h4>Returns</h4>
|
3155
|
+
|
3156
|
+
<p>A new image</p>
|
3157
|
+
|
3158
|
+
<h4>Example</h4>
|
3159
|
+
|
3160
|
+
<p>modulate(0.85)</p>
|
3161
|
+
|
3162
|
+
<p class="rollover"><a href=
|
3163
|
+
"javascript:popup('modulate.rb.html')"><img src=
|
3164
|
+
"ex/modulate.jpg" alt="modulate example" onmouseover=
|
3165
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3166
|
+
"this.src='ex/modulate.jpg'" title=
|
3167
|
+
"Click to see the example script" /></a> <img src=
|
3168
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3169
|
+
"Mouse over the example to see the original image" /></p>
|
3170
|
+
|
3171
|
+
<h4>Magick API</h4>
|
3172
|
+
|
3173
|
+
<p>ModulateImage</p>
|
3174
|
+
</div>
|
3175
|
+
|
3176
|
+
<div class="sig">
|
3177
|
+
<h3 id="monochrome_q">monochrome?</h3>
|
3178
|
+
|
3179
|
+
<p><span class="arg">img</span>.monochrome? -> true or
|
3180
|
+
false</p>
|
3181
|
+
</div>
|
3182
|
+
|
3183
|
+
<div class="desc">
|
3184
|
+
<h4>Description</h4>
|
3185
|
+
|
3186
|
+
<p>Returns true if all the pixels have the same red, green, and
|
3187
|
+
blue values and the values are either 0 or QuantumRange. That
|
3188
|
+
is, the image is black-and-white.</p>
|
3189
|
+
|
3190
|
+
<h4>See also</h4>
|
3191
|
+
|
3192
|
+
<p><a href="#gray_q">gray?</a></p>
|
3193
|
+
|
3194
|
+
<h4>Magick API</h4>
|
3195
|
+
|
3196
|
+
<p>IsMonochromeImage</p>
|
3197
|
+
</div>
|
3198
|
+
|
3199
|
+
<div class="sig">
|
3200
|
+
<h3 id="motion_blur">motion_blur</h3>
|
3201
|
+
|
3202
|
+
<p><span class="arg">img</span>.motion_blur(<span class=
|
3203
|
+
"arg">radius</span>=0.0, <span class="arg">sigma</span>=1.0,
|
3204
|
+
<span class="arg">angle</span>=0.0) -> <em>image</em></p>
|
3205
|
+
</div>
|
3206
|
+
|
3207
|
+
<div class="desc">
|
3208
|
+
<h4>Description</h4>
|
3209
|
+
|
3210
|
+
<p class="imquote">Simulates motion blur. We convolve the image
|
3211
|
+
with a Gaussian operator of the given <span class=
|
3212
|
+
"arg">radius</span> and standard deviation (<span class=
|
3213
|
+
"arg">sigma</span>). Use a radius of 0 and motion_blur selects
|
3214
|
+
a suitable radius for you. <span class="arg">Angle</span> gives
|
3215
|
+
the angle of the blurring motion.</p>
|
3216
|
+
|
3217
|
+
<h4>Arguments</h4>
|
3218
|
+
|
3219
|
+
<dl>
|
3220
|
+
<dt>radius</dt>
|
3221
|
+
|
3222
|
+
<dd>The radius of the Gaussian operator.</dd>
|
3223
|
+
|
3224
|
+
<dt>sigma</dt>
|
3225
|
+
|
3226
|
+
<dd>The standard deviation of the Gaussian operator. Must be
|
3227
|
+
non-0.</dd>
|
3228
|
+
|
3229
|
+
<dt>angle</dt>
|
3230
|
+
|
3231
|
+
<dd>The angle (in degrees) of the blurring motion.</dd>
|
3232
|
+
</dl>
|
3233
|
+
|
3234
|
+
<h4>Returns</h4>
|
3235
|
+
|
3236
|
+
<p>A new image</p>
|
3237
|
+
|
3238
|
+
<h4>Example</h4>
|
3239
|
+
|
3240
|
+
<p class="rollover"><a href=
|
3241
|
+
"javascript:popup('motion_blur.rb.html')"><img src=
|
3242
|
+
"ex/motion_blur.jpg" alt="motion_blur example" title=
|
3243
|
+
"Click to see the example script" onmouseover=
|
3244
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3245
|
+
"this.src='ex/motion_blur.jpg'" /></a> <img src=
|
3246
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3247
|
+
"Mouse over the example to see the original image" /></p>
|
3248
|
+
|
3249
|
+
<h4>See also</h4>
|
3250
|
+
|
3251
|
+
<p><a href="image1.html#blur_image">blur_image</a>, <a href=
|
3252
|
+
"#gaussian_blur">gaussian_blur</a>, <a href=
|
3253
|
+
"image3.html#radial_blur">radial_blur</a>, <a href=
|
3254
|
+
"image3.html#selective_blur_channel">selective_blur_channel</a></p>
|
3255
|
+
|
3256
|
+
<h4>Magick API</h4>
|
3257
|
+
|
3258
|
+
<p>MotionBlurImage</p>
|
3259
|
+
</div>
|
3260
|
+
|
3261
|
+
<div class="sig">
|
3262
|
+
<h3 id="negate">negate</h3>
|
3263
|
+
|
3264
|
+
<p><span class="arg">img</span>.negate(<span class=
|
3265
|
+
"arg">grayscale</span>=false) -> <em>image</em></p>
|
3266
|
+
</div>
|
3267
|
+
|
3268
|
+
<div class="desc">
|
3269
|
+
<h4>Description</h4>
|
3270
|
+
|
3271
|
+
<p>Negates the colors in the receiver.</p>
|
3272
|
+
|
3273
|
+
<h4>Arguments</h4>If the <span class="arg">grayscale</span>
|
3274
|
+
argument is true, only the grayscale values are negated.
|
3275
|
+
|
3276
|
+
<h4>Returns</h4>
|
3277
|
+
|
3278
|
+
<p>A new image</p>
|
3279
|
+
|
3280
|
+
<h4>Example</h4>
|
3281
|
+
|
3282
|
+
<p class="rollover"><a href=
|
3283
|
+
"javascript:popup('negate.rb.html')"><img src="ex/negate.jpg"
|
3284
|
+
alt="negate example" onmouseover=
|
3285
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3286
|
+
"this.src='ex/negate.jpg'" title=
|
3287
|
+
"Click to see the example script" /></a> <img src=
|
3288
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3289
|
+
"Mouse over the example to see the original image" /></p>
|
3290
|
+
|
3291
|
+
<h4>See also</h4>
|
3292
|
+
|
3293
|
+
<p><a href="#negate_channel">negate_channel</a></p>
|
3294
|
+
|
3295
|
+
<h4>Magick API</h4>
|
3296
|
+
|
3297
|
+
<p>NegateImage</p>
|
3298
|
+
</div>
|
3299
|
+
|
3300
|
+
<div class="sig">
|
3301
|
+
<h3 id="negate_channel">negate_channel</h3>
|
3302
|
+
|
3303
|
+
<p><span class="arg">img</span>.negate_channel(<span class=
|
3304
|
+
"arg">grayscale</span>=false, [<span class=
|
3305
|
+
"arg">channel</span>...]) = <em>image</em></p>
|
3306
|
+
</div>
|
3307
|
+
|
3308
|
+
<div class="desc">
|
3309
|
+
<h4>Description</h4>
|
3310
|
+
|
3311
|
+
<p>Negate a particular image channel or channels.</p>
|
3312
|
+
|
3313
|
+
<h4>Arguments</h4>
|
3314
|
+
|
3315
|
+
<dl>
|
3316
|
+
<dt>grayscale</dt>
|
3317
|
+
|
3318
|
+
<dd class="imquote">if true, only negate grayscale pixels
|
3319
|
+
within the image</dd>
|
3320
|
+
|
3321
|
+
<dt>channel...</dt>
|
3322
|
+
|
3323
|
+
<dd>0 or more <a href=
|
3324
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
3325
|
+
channels are specified, all the channels are negated.
|
3326
|
+
Specifying no channel arguments has the same effect as the
|
3327
|
+
negate method, above.</dd>
|
3328
|
+
</dl>
|
3329
|
+
|
3330
|
+
<h4>Returns</h4>
|
3331
|
+
|
3332
|
+
<p>A new image</p>
|
3333
|
+
|
3334
|
+
<h4>Example</h4>
|
3335
|
+
|
3336
|
+
<p>negate_channel(false, GreenChannel)</p>
|
3337
|
+
|
3338
|
+
<p class="rollover"><a href=
|
3339
|
+
"javascript:popup('negate_channel.rb.html')"><img src=
|
3340
|
+
"ex/negate_channel.jpg" alt="negate_channel example"
|
3341
|
+
onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3342
|
+
"this.src='ex/negate_channel.jpg'" title=
|
3343
|
+
"Click to see the example script" /></a> <img src=
|
3344
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3345
|
+
"Mouse over the example to see the original image" /></p>
|
3346
|
+
|
3347
|
+
<h4>See also</h4>
|
3348
|
+
|
3349
|
+
<p><a href="#negate">negate</a></p>.
|
3350
|
+
|
3351
|
+
<h4>Magick API</h4>
|
3352
|
+
|
3353
|
+
<p>NegateImageChannel</p>
|
3354
|
+
</div>
|
3355
|
+
|
3356
|
+
<div class="sig">
|
3357
|
+
<h3 id="normalize">normalize</h3>
|
3358
|
+
|
3359
|
+
<p><span class="arg">img</span>.normalize ->
|
3360
|
+
<em>image</em></p>
|
3361
|
+
</div>
|
3362
|
+
|
3363
|
+
<div class="desc">
|
3364
|
+
<h4>Description</h4>
|
3365
|
+
|
3366
|
+
<p class="imquote">Enhances the contrast of a color image by
|
3367
|
+
adjusting the pixel color to span the entire range of colors
|
3368
|
+
available.</p>
|
3369
|
+
|
3370
|
+
<h4>Returns</h4>
|
3371
|
+
|
3372
|
+
<p>A new image</p>
|
3373
|
+
|
3374
|
+
<h4>Example</h4>
|
3375
|
+
|
3376
|
+
<p class="rollover"><a href=
|
3377
|
+
"javascript:popup('normalize.rb.html')"><img src=
|
3378
|
+
"ex/normalize.jpg" alt="normalize example" title=
|
3379
|
+
"Click to see the example script" onmouseover=
|
3380
|
+
"this.src='ex/images/Hot_Air_Balloons.jpg'" onmouseout=
|
3381
|
+
"this.src='ex/normalize.jpg'" /></a> <img src=
|
3382
|
+
"ex/images/spin.gif" alt="" class="spin" style="left: 191px;"
|
3383
|
+
title="Mouse over the example to see the original image" /></p>
|
3384
|
+
|
3385
|
+
<h4>Magick API</h4>
|
3386
|
+
|
3387
|
+
<p>NormalizeImage</p>
|
3388
|
+
|
3389
|
+
<h4>See also</h4>
|
3390
|
+
|
3391
|
+
<p><a href="#normalize_channel">normalize_channel</a></p>
|
3392
|
+
</div>
|
3393
|
+
|
3394
|
+
<div class="sig">
|
3395
|
+
<h3 id="normalize_channel">normalize_channel</h3>
|
3396
|
+
|
3397
|
+
<p><span class="arg">img</span>.normalize_channel([<span class=
|
3398
|
+
"arg">channel</span>...]) = <em>image</em></p>
|
3399
|
+
</div>
|
3400
|
+
|
3401
|
+
<div class="desc">
|
3402
|
+
<h4>Description</h4>
|
3403
|
+
|
3404
|
+
<p><span class="imquote">Enhances the contrast of a color image
|
3405
|
+
by adjusting the pixel color to span the entire range of colors
|
3406
|
+
available.</span> Only the specified channels are
|
3407
|
+
normalized.</p>
|
3408
|
+
|
3409
|
+
<h4>Arguments</h4>
|
3410
|
+
|
3411
|
+
<dl>
|
3412
|
+
<dt>channel...</dt>
|
3413
|
+
|
3414
|
+
<dd>0 or more <a href=
|
3415
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
3416
|
+
channels are specified, all the channels are normalized.
|
3417
|
+
Specifying no channel arguments has the same effect as the
|
3418
|
+
normalize method, above.</dd>
|
3419
|
+
</dl>
|
3420
|
+
|
3421
|
+
<h4>Returns</h4>
|
3422
|
+
|
3423
|
+
<p>A new image</p>
|
3424
|
+
|
3425
|
+
<h4>Magick API</h4>
|
3426
|
+
|
3427
|
+
<p>NormalizeImageChannel</p>
|
3428
|
+
|
3429
|
+
<h4>See also</h4>
|
3430
|
+
|
3431
|
+
<p><a href="#normalize">normalize</a></p>
|
3432
|
+
</div>
|
3433
|
+
|
3434
|
+
<div class="sig">
|
3435
|
+
<h3 id="oil_paint">oil_paint</h3>
|
3436
|
+
|
3437
|
+
<p><span class="arg">img</span>.oil_paint(<span class=
|
3438
|
+
"arg">radius</span>=3.0) -> <em>image</em></p>
|
3439
|
+
</div>
|
3440
|
+
|
3441
|
+
<div class="desc">
|
3442
|
+
<h4>Description</h4>
|
3443
|
+
|
3444
|
+
<p class="imquote">Applies a special effect filter that
|
3445
|
+
simulates an oil painting. Each pixel is replaced by the most
|
3446
|
+
frequent color occurring in a circular region defined by
|
3447
|
+
<span class="arg">radius</span>.</p>
|
3448
|
+
|
3449
|
+
<h4>Returns</h4>
|
3450
|
+
|
3451
|
+
<p>A new image</p>
|
3452
|
+
|
3453
|
+
<h4>Example</h4>
|
3454
|
+
|
3455
|
+
<p class="rollover"><a href=
|
3456
|
+
"javascript:('oil_paint.rb.html')"><img src="ex/oil_paint.jpg"
|
3457
|
+
title="Click to see the example script" onmouseover=
|
3458
|
+
"this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3459
|
+
"this.src='ex/oil_paint.jpg'" alt="oil_paint example" /></a>
|
3460
|
+
<img src="ex/images/spin.gif" alt="" class="spin" title=
|
3461
|
+
"Mouse over the example to see the original image" /></p>
|
3462
|
+
|
3463
|
+
<h4>Magick API</h4>
|
3464
|
+
|
3465
|
+
<p>OilPaintImage</p>
|
3466
|
+
</div>
|
3467
|
+
|
3468
|
+
<div class="sig">
|
3469
|
+
<h3 id="opaque">opaque</h3>
|
3470
|
+
|
3471
|
+
<p><span class="arg">img</span>.opaque(<span class=
|
3472
|
+
"arg">target</span>, <span class="arg">fill</span>) ->
|
3473
|
+
<em>image</em></p>
|
3474
|
+
</div>
|
3475
|
+
|
3476
|
+
<div class="desc">
|
3477
|
+
<h4>Description</h4>
|
3478
|
+
|
3479
|
+
<p>Changes all pixels having the target color to the fill
|
3480
|
+
color.</p>
|
3481
|
+
|
3482
|
+
<h4>Arguments</h4>
|
3483
|
+
|
3484
|
+
<dl>
|
3485
|
+
<dt>target</dt>
|
3486
|
+
|
3487
|
+
<dd>The color to be replaced. May be a color name or a
|
3488
|
+
<a href="struct.html#Pixel">Pixel</a></dd>
|
3489
|
+
|
3490
|
+
<dt>fill</dt>
|
3491
|
+
|
3492
|
+
<dd>The replacement color. May be a color name or a <a href=
|
3493
|
+
"struct.html#Pixel">Pixel</a></dd>
|
3494
|
+
</dl>
|
3495
|
+
|
3496
|
+
<h4>Returns</h4>
|
3497
|
+
|
3498
|
+
<p>A new image</p>
|
3499
|
+
|
3500
|
+
<h4>Example</h4>
|
3501
|
+
<pre>
|
3502
|
+
img.fuzz = 25
|
3503
|
+
img = img.opaque('white', 'red')
|
3504
|
+
</pre>
|
3505
|
+
|
3506
|
+
<h4>See also</h4>
|
3507
|
+
|
3508
|
+
<p><a href="image1.html#color_floodfill">color_floodfill</a>,
|
3509
|
+
<a href="#opaque_channel">opaque_channel</a></p>
|
3510
|
+
|
3511
|
+
<h4>Magick API</h4>
|
3512
|
+
|
3513
|
+
<p>OpaquePaintImageChannel</p>
|
3514
|
+
</div>
|
3515
|
+
|
3516
|
+
<div class="sig">
|
3517
|
+
<h3 id="opaque_channel">opaque_channel</h3>
|
3518
|
+
|
3519
|
+
<p><span class="arg">img</span>.opaque_channel(<span class=
|
3520
|
+
"arg">target</span>, <span class="arg">fill</span>,
|
3521
|
+
<span class="arg">invert</span>=false, <span class=
|
3522
|
+
"arg">fuzz</span>=<span class="arg">img</span>.fuzz [,
|
3523
|
+
<span class="arg">channel</span>...]) -> <em>image</em></p>
|
3524
|
+
</div>
|
3525
|
+
|
3526
|
+
<div class="desc">
|
3527
|
+
<h4>Description</h4>
|
3528
|
+
|
3529
|
+
<p>Changes all pixels having the target color to the fill
|
3530
|
+
color. If <span class="arg">invert</span> is true, changes all
|
3531
|
+
the pixels that are <em>not</em> the target color to the fill
|
3532
|
+
color.</p>
|
3533
|
+
|
3534
|
+
<h4>Arguments</h4>
|
3535
|
+
|
3536
|
+
<dl>
|
3537
|
+
<dt>target</dt>
|
3538
|
+
|
3539
|
+
<dd>The color to be replaced. May be a color name or a
|
3540
|
+
<a href="struct.html#Pixel">Pixel</a></dd>
|
3541
|
+
|
3542
|
+
<dt>fill</dt>
|
3543
|
+
|
3544
|
+
<dd>The replacement color. May be a color name or a <a href=
|
3545
|
+
"struct.html#Pixel">Pixel</a></dd>
|
3546
|
+
|
3547
|
+
<dt>invert</dt>
|
3548
|
+
|
3549
|
+
<dd>If true, the target pixels are all the pixels that are
|
3550
|
+
not the target color. The default is the value of the target
|
3551
|
+
image's <code>fuzz</code> attribute</dd>
|
3552
|
+
|
3553
|
+
<dt>fuzz</dt>
|
3554
|
+
|
3555
|
+
<dd>Colors within this distance are considered equal to the
|
3556
|
+
target color.</dd>
|
3557
|
+
|
3558
|
+
<dt>channel...</dt>
|
3559
|
+
|
3560
|
+
<dd>0 or more <a href=
|
3561
|
+
"constants.html#ChannelType">ChannelType</a> arguments. If no
|
3562
|
+
channels are specified, the default is <a href=
|
3563
|
+
"constants.html#ChannelType">DefaultChannels</a>.</dd>
|
3564
|
+
</dl>
|
3565
|
+
|
3566
|
+
<h4>Returns</h4>
|
3567
|
+
|
3568
|
+
<p>A new image</p>
|
3569
|
+
|
3570
|
+
<h4>See also</h4>
|
3571
|
+
|
3572
|
+
<p><a href="#opaque">opaque</a></p>
|
3573
|
+
|
3574
|
+
<h4>Magick API</h4>
|
3575
|
+
|
3576
|
+
<p>OpaquePaintImageChannel</p>
|
3577
|
+
</div>
|
3578
|
+
|
3579
|
+
<div class="sig">
|
3580
|
+
<h3 id="opaque_q">opaque?</h3>
|
3581
|
+
|
3582
|
+
<p><span class="arg">img</span>.opaque? -> true or false</p>
|
3583
|
+
</div>
|
3584
|
+
|
3585
|
+
<div class="desc">
|
3586
|
+
<h4>Description</h4>
|
3587
|
+
|
3588
|
+
<p>Returns true if all of the pixels in the receiver have an
|
3589
|
+
opacity value of <a href=
|
3590
|
+
"constants.html#Opacity">OpaqueOpacity</a>.</p>
|
3591
|
+
|
3592
|
+
<h4>Returns</h4>
|
3593
|
+
|
3594
|
+
<p>true or false</p>
|
3595
|
+
|
3596
|
+
<h4>Magick API</h4>
|
3597
|
+
|
3598
|
+
<p>IsOpaqueImage</p>
|
3599
|
+
</div>
|
3600
|
+
|
3601
|
+
<div class="sig">
|
3602
|
+
<h3 id="ordered_dither">ordered_dither</h3>
|
3603
|
+
|
3604
|
+
<p><span class="arg">img</span>.ordered_dither(<span class=
|
3605
|
+
"arg">threshold_map</span>='2x2') -> <em>image</em></p>
|
3606
|
+
</div>
|
3607
|
+
|
3608
|
+
<div class="desc">
|
3609
|
+
<h4>Description</h4>
|
3610
|
+
|
3611
|
+
<p>Dithers the image to a predefined pattern. The <span class=
|
3612
|
+
"arg">threshold_map</span> argument defines the pattern to
|
3613
|
+
use.</p>
|
3614
|
+
|
3615
|
+
<h4>Arguments</h4>
|
3616
|
+
|
3617
|
+
<p>The <span class="arg">threshold_map</span> argument can be
|
3618
|
+
any of the strings listed by this command:</p>
|
3619
|
+
<pre>
|
3620
|
+
convert -list Thresholds
|
3621
|
+
</pre>
|
3622
|
+
|
3623
|
+
<p>If you have a sufficiently new version of ImageMagick, you
|
3624
|
+
can add a <span class="imquote">a uniform color map with the
|
3625
|
+
number of levels per color channel</span> immediately following
|
3626
|
+
the <span class="arg">threshold_map</span>, separated by a
|
3627
|
+
comma. See the documentation for <a href=
|
3628
|
+
"http://redux.imagemagick.org/script/command-line-options.php#ordered-dither">
|
3629
|
+
ImageMagick's -ordered-dither option</a> for more
|
3630
|
+
information.</p>
|
3631
|
+
|
3632
|
+
<h4>Returns</h4>
|
3633
|
+
|
3634
|
+
<p>A new image</p>
|
3635
|
+
|
3636
|
+
<h4>Example</h4>
|
3637
|
+
|
3638
|
+
<p class="rollover"><a href=
|
3639
|
+
"javascript:popup('ordered_dither.rb.html')"><img src=
|
3640
|
+
"ex/ordered_dither.jpg" alt="ordered_dither example"
|
3641
|
+
onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
|
3642
|
+
"this.src='ex/ordered_dither.jpg'" title=
|
3643
|
+
"Click to see the example script" /></a> <img src=
|
3644
|
+
"ex/images/spin.gif" alt="" class="spin" title=
|
3645
|
+
"Mouse over the example to see the original image" /></p>
|
3646
|
+
|
3647
|
+
<h4>See also</h4>
|
3648
|
+
|
3649
|
+
<p><a href="image3.html#posterize">posterize</a>, <a href=
|
3650
|
+
"image3.html#quantize">quantize</a></p>
|
3651
|
+
|
3652
|
+
<h4>Magick API</h4>
|
3653
|
+
|
3654
|
+
<p>OrderedPosterizeImage</p>
|
3655
|
+
</div>
|
3656
|
+
|
3657
|
+
<p class="spacer"> </p>
|
3658
|
+
|
3659
|
+
<div class="nav">
|
3660
|
+
« <a href="image1.html">Prev</a> | <a href=
|
3661
|
+
"index.html">Contents</a> | <a href=
|
3662
|
+
"image3.html">Next</a> »
|
3663
|
+
</div>
|
3664
|
+
</body>
|
3665
|
+
</html>
|