rmagick 2.4.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ RMagick 2.5.0
2
+ o Added Image#add_compose_mask, #delete_compose_mask (feature #20531)
3
+
1
4
  RMagick 2.4.0
2
5
  o Added Image#image_type= (feature #20490)
3
6
 
@@ -1,15 +1,15 @@
1
1
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
2
  <html>
3
3
  <head>
4
- <title>RMagick 2.4.0 README</title>
4
+ <title>RMagick 2.5.0 README</title>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6
6
  <meta name="GENERATOR" content="RedCloth">
7
7
  </head>
8
8
  <body>
9
- <h1>RMagick 2.4.0 <span class="caps">README</span></h1>
9
+ <h1>RMagick 2.5.0 <span class="caps">README</span></h1>
10
10
 
11
11
 
12
- <h2>06/02/08</h2>
12
+ <h2>06/08/08</h2>
13
13
 
14
14
 
15
15
  <h3>Table of Contents</h3>
@@ -75,12 +75,12 @@ depending on which tarball you have:</p>
75
75
 
76
76
 
77
77
  <pre>
78
- tar xvzf RMagick-2.4.0-tar.gz (gzipped tarball)
79
- tar xvjf RMagick-2.4.0-tar.bz2 (bzipped tarball)
78
+ tar xvzf RMagick-2.5.0-tar.gz (gzipped tarball)
79
+ tar xvjf RMagick-2.5.0-tar.bz2 (bzipped tarball)
80
80
  7z e RMagick-x.y.z.tar.lzma -so | tar xv (7zipped tarball)
81
81
  </pre>
82
82
 
83
- <p>Change to the RMagick-2.4.0 directory. If you are not using any
83
+ <p>Change to the RMagick-2.5.0 directory. If you are not using any
84
84
  configuration options (usually you don&#8217;t need to) enter the command</p>
85
85
 
86
86
 
@@ -191,7 +191,7 @@ systems, see the documentation for the dynamic loading facility.</p>
191
191
 
192
192
 
193
193
  <pre>
194
- hook /home/me/src/RMagick-2.4.0/./post-setup.rb failed:
194
+ hook /home/me/src/RMagick-2.5.0/./post-setup.rb failed:
195
195
  No such file or directory - "/tmp/rmagick6872.6"
196
196
  </pre>
197
197
 
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: Common Tasks</title>
9
+ <title>RMagick 2.5.0: Common Tasks</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -31,7 +31,7 @@
31
31
  </head>
32
32
 
33
33
  <body>
34
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
34
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
35
35
 
36
36
  <div class="nav">
37
37
  &laquo;&nbsp;<a href="optequiv.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: Constants</title>
9
+ <title>RMagick 2.5.0: Constants</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -61,7 +61,7 @@
61
61
  </head>
62
62
 
63
63
  <body>
64
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
64
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
65
65
 
66
66
  <div class="nav">
67
67
  &laquo;&nbsp;<a href="info.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class Draw</title>
9
+ <title>RMagick 2.5.0: class Draw</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -25,7 +25,7 @@
25
25
  </head>
26
26
 
27
27
  <body>
28
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
28
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
29
29
 
30
30
  <div class="nav">
31
31
  &laquo;&nbsp;<a href="image3.html">Prev</a> | <a href=
@@ -0,0 +1,23 @@
1
+ require 'RMagick'
2
+
3
+ background = Magick::Image.read('images/Flower_Hat.jpg').first
4
+ source = Magick::Image.read('pattern:checkerboard') {self.size = "#{background.columns}x#{background.rows}"}.first
5
+ mask = Magick::Image.new(background.columns, background.rows) {self.background_color = "black"}
6
+
7
+ # Make a mask
8
+ gc = Magick::Draw.new
9
+ gc.annotate(mask, 0, 0, 0, 0, "Ruby") do
10
+ gc.gravity = Magick::CenterGravity
11
+ gc.pointsize = 100
12
+ gc.rotation = 90
13
+ gc.font_weight = Magick::BoldWeight
14
+ gc.fill = "white"
15
+ gc.stroke = "none"
16
+ end
17
+
18
+ background.add_compose_mask(mask)
19
+ result = background.composite(source, Magick::CenterGravity, Magick::OverCompositeOp)
20
+ result.write "compose_mask_example.jpg"
21
+ source.write "compose_mask_source.gif"
22
+ mask.write "compose_mask.gif"
23
+
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class ImageList</title>
9
+ <title>RMagick 2.5.0: class ImageList</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -20,7 +20,7 @@
20
20
  </head>
21
21
 
22
22
  <body>
23
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
23
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
24
24
 
25
25
  <div class="nav">
26
26
  &laquo;&nbsp;<a href="magick.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class Image (class methods and instance
9
+ <title>RMagick 2.5.0: class Image (class methods and instance
10
10
  methods a-d)</title>
11
11
  <meta http-equiv="Content-Type" content=
12
12
  "text/html; charset=us-ascii" />
@@ -48,7 +48,7 @@ float: left;
48
48
  </head>
49
49
 
50
50
  <body>
51
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
51
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
52
52
 
53
53
  <div class="nav">
54
54
  &laquo;&nbsp;<a href="imageattrs.html">Prev</a> | <a href=
@@ -121,13 +121,15 @@ float: left;
121
121
  <li><a href=
122
122
  "#adaptive_threshold">adaptive_threshold</a></li>
123
123
 
124
- <li><a href="#add_noise">add_noise</a></li>
124
+ <li><a href="#add_compose_mask">add_compose_mask</a></li>
125
125
 
126
- <li><a href="#add_profile">add_profile</a></li>
126
+ <li><a href="#add_noise">add_noise</a></li>
127
127
 
128
128
  <li><a href=
129
129
  "#add_noise_channel">add_noise_channel</a></li>
130
130
 
131
+ <li><a href="#add_profile">add_profile</a></li>
132
+
131
133
  <li><a href="#affine_transform">affine_transform</a></li>
132
134
 
133
135
  <li><a href="#alpha">alpha</a></li>
@@ -233,6 +235,9 @@ float: left;
233
235
 
234
236
  <li><a href="#decipher">decipher</a></li>
235
237
 
238
+ <li><a href=
239
+ "#delete_compose_mask">delete_compose_mask</a></li>
240
+
236
241
  <li><a href="#delete_profile">delete_profile</a></li>
237
242
 
238
243
  <li><a href="#despeckle">despeckle</a></li>
@@ -1142,6 +1147,96 @@ img = Image.read_inline(content)
1142
1147
  <p>AdaptiveThresholdImage</p>
1143
1148
  </div>
1144
1149
 
1150
+ <div class="sig">
1151
+ <h3 id="add_compose_mask">add_compose_mask</h3>
1152
+
1153
+ <p><span class="arg">img</span>.add_compose_mask(<span class=
1154
+ "arg">mask</span>) -&gt; <em>self</em></p>
1155
+ </div>
1156
+
1157
+ <div class="desc">
1158
+ <h4>Description</h4>
1159
+
1160
+ <p>Associates a mask with an image that will be used as the
1161
+ destination image in a <a href="#composite">composite</a>
1162
+ operation. The areas of the destination image that are masked
1163
+ by white pixels will be modified by the <a href=
1164
+ "#composite">composite</a> method, while areas masked by black
1165
+ pixels are unchanged.</p>
1166
+
1167
+ <p>See <a href=
1168
+ "http://www.imagemagick.org/Usage/compose/#mask">Using a
1169
+ Compose Mask to Limit the Composed Area</a> in Anthony
1170
+ Thyssen's <a href="http://www.imagemagick.org/Usage/">Examples
1171
+ of ImageMagick Usage</a>.</p>
1172
+
1173
+ <h4>Arguments</h4>
1174
+
1175
+ <p>The mask image must have the same dimensions as the
1176
+ destination image.</p>
1177
+
1178
+ <h4>Returns</h4>
1179
+
1180
+ <p>self</p>
1181
+
1182
+ <h4>Example</h4>
1183
+
1184
+ <div>
1185
+ <table summary="compose_mask example">
1186
+ <tr>
1187
+ <td><a href=
1188
+ "javascript:add_popup('compose_mask.rb.html')"><img src=
1189
+ "ex/images/Flower_Hat.jpg" width="100" height="125" alt=
1190
+ "Source image for add_compose_mask example" title=
1191
+ "Click to see the example script" /></a></td>
1192
+
1193
+ <td><a href=
1194
+ "javascript:add_popup('compose_mask.rb.html')"><img src=
1195
+ "ex/compose_mask_source.gif" width="100" height="125"
1196
+ alt="Background image for add_compose_mask example"
1197
+ title="Click to see the example script" /></a></td>
1198
+
1199
+ <td><a href=
1200
+ "javascript:add_popup('compose_mask.rb.html')"><img src=
1201
+ "ex/compose_mask.gif" width="100" height="125" alt=
1202
+ "Mask image for compose_mask example" title=
1203
+ "Click to see the example script" /></a></td>
1204
+
1205
+ <td><a href=
1206
+ "javascript:add_popup('compose_mask.rb.html')"><img src=
1207
+ "ex/compose_mask_example.jpg" width="93" height="125"
1208
+ alt="Result image for compose_mask example" title=
1209
+ "Click to see the example script" /></a></td>
1210
+ </tr>
1211
+
1212
+ <tr>
1213
+ <td align="center">Background</td>
1214
+
1215
+ <td align="center">Source</td>
1216
+
1217
+ <td align="center">Mask</td>
1218
+
1219
+ <td align="center">Result</td>
1220
+ </tr>
1221
+ </table>
1222
+ </div>
1223
+
1224
+ <h4>See also</h4>
1225
+
1226
+ <p><a href="#composite">composite</a>, <a href=
1227
+ "#delete_compose_mask">delete_compose_mask</a></p>
1228
+
1229
+ <h4>Notes</h4>
1230
+
1231
+ <p>This method uses a <em>copy</em> of the argument as the
1232
+ mask. If you change the mask image you must call this method
1233
+ again to update the mask.</p>
1234
+
1235
+ <h4>Magick API</h4>
1236
+
1237
+ <p>SetImageMask</p>
1238
+ </div>
1239
+
1145
1240
  <div class="sig">
1146
1241
  <h3 id="add_noise">add_noise</h3>
1147
1242
 
@@ -1723,8 +1818,9 @@ img = Image.read_inline(content)
1723
1818
 
1724
1819
  <dd>One or more <a href=
1725
1820
  "constants.html#ChannelType">ChannelType</a> values. If none
1726
- are specified, the red, green, and blue channels are blurred. This is the
1727
- equivalent of <a href="#blur_image">blur_image</a>.</dd>
1821
+ are specified, the red, green, and blue channels are blurred.
1822
+ This is the equivalent of <a href=
1823
+ "#blur_image">blur_image</a>.</dd>
1728
1824
  </dl>
1729
1825
 
1730
1826
  <h4>Returns</h4>
@@ -1880,7 +1976,8 @@ img = Image.read_inline(content)
1880
1976
 
1881
1977
  <p>The image's <em>bounding box</em>. The bounding box is the
1882
1978
  rectangle that encloses all the pixels not in the border color.
1883
- Uses the current <a href="imageattrs.html#fuzz">fuzz</a> value.</p>
1979
+ Uses the current <a href="imageattrs.html#fuzz">fuzz</a>
1980
+ value.</p>
1884
1981
 
1885
1982
  <h4>Returns</h4>A <a href="struct.html#Rectangle">Rectangle</a>
1886
1983
  object.
@@ -3535,6 +3632,32 @@ deciphered_img = img.decipher("magic word")
3535
3632
  <p><a href="image2.html#encipher">encipher</a></p>
3536
3633
  </div>
3537
3634
 
3635
+ <div class="sig">
3636
+ <h3 id="delete_compose_mask">delete_compose_mask</h3>
3637
+
3638
+ <p><span class="arg">img</span>.delete_compose_mask() -&gt;
3639
+ <em>self</em></p>
3640
+ </div>
3641
+
3642
+ <div class="desc">
3643
+ <h4>Description</h4>
3644
+
3645
+ <p>Deletes the mask added by <a href=
3646
+ "#add_compose_mask">add_compose_mask</a>.</p>
3647
+
3648
+ <h4>Returns</h4>
3649
+
3650
+ <p>self</p>
3651
+
3652
+ <h4>See also</h4>
3653
+
3654
+ <p><a href="#add_compose_mask">add_compose_mask</a></p>
3655
+
3656
+ <h4>Magick API</h4>
3657
+
3658
+ <p>SetImageMask</p>
3659
+ </div>
3660
+
3538
3661
  <div class="sig">
3539
3662
  <h3 id="delete_profile">delete_profile</h3>
3540
3663
 
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class Image (instance methods e-o)</title>
9
+ <title>RMagick 2.5.0: class Image (instance methods e-o)</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -47,7 +47,7 @@ td.ds {
47
47
  </head>
48
48
 
49
49
  <body>
50
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
50
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
51
51
 
52
52
  <div class="nav">
53
53
  &laquo;&nbsp;<a href="image1.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class Image (instance methods p-w)</title>
9
+ <title>RMagick 2.5.0: class Image (instance methods p-w)</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -51,7 +51,7 @@
51
51
  </head>
52
52
 
53
53
  <body>
54
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
54
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
55
55
 
56
56
  <div class="nav">
57
57
  &laquo;&nbsp;<a href="image2.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: class Image (attribute methods)</title>
9
+ <title>RMagick 2.5.0: class Image (attribute methods)</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -25,7 +25,7 @@
25
25
  </head>
26
26
 
27
27
  <body>
28
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
28
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
29
29
 
30
30
  <div class="nav">
31
31
  &laquo;&nbsp;<a href="ilist.html">Prev</a> | <a href=
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.4.0: ImageMagick Conventions</title>
9
+ <title>RMagick 2.5.0: ImageMagick Conventions</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -69,7 +69,7 @@
69
69
  </head>
70
70
 
71
71
  <body>
72
- <h6 id="header">RMagick 2.4.0 User's Guide and Reference</h6>
72
+ <h6 id="header">RMagick 2.5.0 User's Guide and Reference</h6>
73
73
 
74
74
  <div class="nav">
75
75
  &laquo;&nbsp;<a href="usage.html">Prev</a> | <a href=
@@ -290,9 +290,8 @@
290
290
  <p><em>Hint:</em> You can specify the transparent color as
291
291
  "none", "transparent", or "#000000ff".</p>
292
292
 
293
- <p><a href=
294
- "http://www.imagemagick.org/script/command-line-options.php#fill">
295
- This</a> is ImageMagick's page about color names.</p>
293
+ <p><a href="http://www.imagemagick.org/script/color.php">This</a>
294
+ is ImageMagick's page about color names.</p>
296
295
 
297
296
  <h2 id="geometry">The geometry string</h2>
298
297
 
@@ -308,7 +307,7 @@
308
307
  </pre>
309
308
 
310
309
  <p><a href=
311
- "http://www.imagemagick.org/script/command-line-options.php#geometry">
310
+ "http://www.imagemagick.org/script/command-line-options.php#resize">
312
311
  This</a> is the ImageMagick description of the geometry
313
312
  string:</p>
314
313
 
@@ -340,12 +339,19 @@
340
339
  '640x480&gt;' and the image size is 256x256, the image size
341
340
  does not change. However, if the image is 512x512 or 1024x1024,
342
341
  it is resized to 480x480.</p>
342
+
343
+ <p>Use ^ to set a minimum image size limit. The geometry
344
+ 640x480^, for example, means the image width will not be less
345
+ than 640 and the image height will not be less than 480 pixels
346
+ after the resize. One of those dimensions will match the
347
+ requested size, but the image will likely overflow the space
348
+ requested to preserve its aspect ratio.</p>
343
349
  </div>
344
350
 
345
- <p>The x and y offsets, if present, can be preceded with either
346
- a + or - sign. The + causes x and y to be measured from the left
347
- or top edges, respectively. Conversely, - measures from the right
348
- or bottom edges. Offsets are always measured in pixels.</p>
351
+ <p>The x and y offsets, if present, can be preceded with either a
352
+ + or - sign. The + causes x and y to be measured from the left or
353
+ top edges, respectively. Conversely, - measures from the right or
354
+ bottom edges. Offsets are always measured in pixels.</p>
349
355
 
350
356
  <p>Any method that accepts a geometry string will also accept a
351
357
  <a href="struct.html#Geometry"><code>Geometry</code></a>
@@ -472,8 +478,10 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
472
478
  be referenced by specifying the pattern name. For example,
473
479
  <code>pattern:checkerboard</code>. For a list of acceptable
474
480
  patterns, see <a href=
475
- "http://www.imagemagick.org/script/formats.php">this
476
- page.</a></p>
481
+ "http://www.imagemagick.org/script/formats.php">this page.</a>
482
+ If you do not specify a size the pattern's default size is
483
+ used. If you specify a size the pattern will be repeated as
484
+ necessary to fill the image.</p>
477
485
 
478
486
  <h4>plasma<sup>*</sup></h4>
479
487