rmagick 2.7.2 → 2.8.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,15 @@
1
+ RMagick 2.8.0
2
+ o Add the endian, scene, and transparent_color attributes to Image::Info
3
+ o Deprecate Image#endian= attribute setter
4
+ o Add the transparent_chroma method to the Image class (available in
5
+ ImageMagick 6.4.5-6)
6
+ o Add the sparse_color method to the Image class (available in ImageMagick
7
+ 6.4.3)
8
+ o Detect change to ParseSizeGeometry signature in ImageMagick 6.4.6-9 and
9
+ compile accordingly.
10
+ o Update Image#change_geometry to work with the new ParseSizeGeometry API
11
+ in ImageMagick 6.4.6-9.
12
+
1
13
  RMagick 2.7.2
2
14
  o Fix bug #22740, some Image::Info attribute values are not propogated to
3
15
  the image object (bug report by Thomas Watson)
data/README.html CHANGED
@@ -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.7.2 README</title>
4
+ <title>RMagick 2.8.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.7.2 <span class="caps">README</span></h1>
9
+ <h1>RMagick 2.8.0 <span class="caps">README</span></h1>
10
10
 
11
11
 
12
- <h2>11/13/08</h2>
12
+ <h2>12/04/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.7.2-tar.gz (gzipped tarball)
79
- tar xvjf RMagick-2.7.2-tar.bz2 (bzipped tarball)
78
+ tar xvzf RMagick-2.8.0-tar.gz (gzipped tarball)
79
+ tar xvjf RMagick-2.8.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.7.2 directory. If you are not using any
83
+ <p>Change to the RMagick-2.8.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.7.2/./post-setup.rb failed:
194
+ hook /home/me/src/RMagick-2.8.0/./post-setup.rb failed:
195
195
  No such file or directory - "/tmp/rmagick6872.6"
196
196
  </pre>
197
197
 
data/doc/comtasks.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: Common Tasks</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
34
+ <h6 id="header">RMagick 2.8.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=
data/doc/constants.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: Constants</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
64
+ <h6 id="header">RMagick 2.8.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=
data/doc/draw.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class Draw</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
28
+ <h6 id="header">RMagick 2.8.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,55 @@
1
+ require "RMagick"
2
+
3
+ def draw_centers(img, all_four = true)
4
+ gc = Magick::Draw.new
5
+ gc.fill("white")
6
+ gc.stroke("black")
7
+ gc.circle(30, 10, 30, 12)
8
+ gc.circle(10, 80, 10, 82)
9
+ gc.circle(70, 60, 70, 62)
10
+ gc.circle(80, 20, 80, 22) if all_four
11
+ gc.draw(img)
12
+ img
13
+ end
14
+
15
+ imgl = Magick::ImageList.new
16
+ img = Magick::Image.new(100, 100)
17
+
18
+ begin
19
+
20
+ img2 = img.sparse_color(Magick::VoronoiColorInterpolate, 30, 10, "red",
21
+ 10, 80, "blue", 70, 60, "lime", 80, 20, "yellow")
22
+ img2["Label"] = "Voroni"
23
+ imgl << draw_centers(img2)
24
+
25
+ img2 = img.sparse_color(Magick::ShepardsColorInterpolate, 30, 10, "red",
26
+ 10, 80, "blue", 70, 60, "lime", 80, 20, "yellow")
27
+ img2["Label"] = "Shepards"
28
+ imgl << draw_centers(img2)
29
+
30
+ img2 = img.sparse_color(Magick::BilinearColorInterpolate, 30, 10, "red",
31
+ 10, 80, "blue", 70, 60, "lime", 80, 20, "yellow")
32
+ img2["Label"] = "Bilinear"
33
+ imgl << draw_centers(img2)
34
+
35
+ img2 = img.sparse_color(Magick::BarycentricColorInterpolate, 30, 10, "red",
36
+ 10, 80, "blue", 70, 60, "lime")
37
+ img2["Label"] = "Barycentric"
38
+ imgl << draw_centers(img2, false)
39
+
40
+ montage = imgl.montage do
41
+ self.background_color = "none"
42
+ self.geometry = "100x100+10+10"
43
+ self.tile = "2x2"
44
+ end
45
+
46
+ montage.write("sparse_color.png")
47
+
48
+ rescue NotImplementedError, NameError
49
+
50
+ img = Magick::Image.read("images/notimplemented.gif").first
51
+ img.resize!(240, 272)
52
+ img.write("sparse_color.png")
53
+
54
+ end
55
+
data/doc/ilist.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class ImageList</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
23
+ <h6 id="header">RMagick 2.8.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=
data/doc/image1.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class Image (class methods and instance
9
+ <title>RMagick 2.8.0: class Image (class methods and instance
10
10
  methods a-d)</title>
11
11
  <meta http-equiv="Content-Type" content=
12
12
  "text/html; charset=us-ascii" />
@@ -48,7 +48,7 @@
48
48
  </head>
49
49
 
50
50
  <body>
51
- <h6 id="header">RMagick 2.7.2 User's Guide and Reference</h6>
51
+ <h6 id="header">RMagick 2.8.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=
data/doc/image2.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class Image (instance methods e-o)</title>
9
+ <title>RMagick 2.8.0: class Image (instance methods e-o)</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -47,7 +47,7 @@
47
47
  </head>
48
48
 
49
49
  <body>
50
- <h6 id="header">RMagick 2.7.2 User's Guide and Reference</h6>
50
+ <h6 id="header">RMagick 2.8.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=
data/doc/image3.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class Image (instance methods p-w)</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
54
+ <h6 id="header">RMagick 2.8.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=
@@ -172,7 +172,8 @@
172
172
  <li><a href="#sketch">sketch</a></li>
173
173
 
174
174
  <li><a href="#solarize">solarize</a></li>
175
- <!-- <li><a href="#sparse_color">sparse_color</a></li> -->
175
+
176
+ <li><a href="#sparse_color">sparse_color</a></li>
176
177
 
177
178
  <li><a href="#splice">splice</a></li>
178
179
 
@@ -212,6 +213,9 @@
212
213
 
213
214
  <li><a href="#transparent">transparent</a></li>
214
215
 
216
+ <li><a href=
217
+ "#transparent_chroma">transparent_chroma</a></li>
218
+
215
219
  <li><a href="#transpose">transpose</a></li>
216
220
 
217
221
  <li><a href="#transpose_bang">transpose!</a></li>
@@ -1435,7 +1439,7 @@ random_threshold_channel(geom, RedChannel)
1435
1439
  "padding-left:62px; padding-right: 62px; padding-top: 87px;padding-bottom:87px;"
1436
1440
  id="after_resize_to_fill" onmouseover=
1437
1441
  "this.style.display='none'; before_resize_to_fill.style.display='';"
1438
- alt="resize_to_fill example" />
1442
+ alt="resize_to_fill example" />
1439
1443
  <!-- This img tag displays the before image when moused over -->
1440
1444
  <img src="ex/images/Flower_Hat.jpg" style="display: none" id=
1441
1445
  "before_resize_to_fill" onmouseout=
@@ -1530,7 +1534,7 @@ random_threshold_channel(geom, RedChannel)
1530
1534
  <img id="rtfless" style="display: none" onmouseout=
1531
1535
  "this.style.display='none';rtf.style.display='';" src=
1532
1536
  "ex/images/Flower_Hat.jpg" alt="resize_to_fit example" title=
1533
- "Click to see the example script" />
1537
+ "Click to see the example script" />
1534
1538
  <!-- This img tag displays the framed image when the mouse is not over-->
1535
1539
  <img style=
1536
1540
  "padding-left:69px; padding-right: 69px; padding-top: 87px;padding-bottom:87px;"
@@ -2586,21 +2590,27 @@ img.properties &raquo;
2586
2590
  <h4>Magick API</h4>
2587
2591
 
2588
2592
  <p>SolarizeImage</p>
2589
- </div><!--
2593
+ </div>
2594
+
2590
2595
  <div class="sig">
2591
2596
  <h3 id="sparse_color">sparse_color</h3>
2592
2597
 
2593
2598
  <p><span class="arg">img</span>.sparse_color(<span class=
2594
- "arg">method</span>, <span class="arg">points</span>[,
2595
- <span class="arg">channel</span>...]) -&gt; <em>image</em></p>
2599
+ "arg">method</span>, <span class="arg">x1</span>, <span class=
2600
+ "arg">y1</span>, <span class="arg">color1</span>[, <span class=
2601
+ "arg">x2</span>, <span class="arg">y2</span>, <span class=
2602
+ "arg">color2</span>...][, <span class="arg">channel</span>...])
2603
+ -&gt; <em>image</em></p>
2596
2604
  </div>
2597
2605
 
2598
2606
  <div class="desc">
2599
2607
  <h4>Description</h4>
2600
2608
 
2601
- <p class="imquote">Given a set of coordinates interpolates the
2602
- colors found at those coordinates, across the whole image,
2603
- using various methods.</p>
2609
+ <p>Fills the image with the specified <span class=
2610
+ "arg">color</span> or colors, starting at the <span class=
2611
+ "arg">x</span>,<span class="arg">y</span> coordinates
2612
+ associated with the color and using the specified interpolation
2613
+ <span class="arg">method</span>.</p>
2604
2614
 
2605
2615
  <p>For more information about this method see the ImageMagick
2606
2616
  documentation for the -sparse-color option. Also see <a href=
@@ -2641,33 +2651,39 @@ img.properties &raquo;
2641
2651
  <dd class="imquote">Simply map each pixel to the to
2642
2652
  nearest color point given. The result are polygonal
2643
2653
  'cells' of solid color.</dd>
2644
-
2645
- <dt>PolynomialColorInterpolate</dt>
2646
-
2647
- <dd class="imquote">&nbsp;</dd>
2648
2654
  </dl>
2649
2655
  </dd>
2650
2656
 
2651
- <dt>points</dt>
2657
+ <dt>xn, yn, colorn</dt>
2652
2658
 
2653
- <dd>An array of coordinates. The number of coordinates varies
2654
- according to the method.</dd>
2659
+ <dd>One or more <span class="arg">x</span>,<span class=
2660
+ "arg">y</span>, <span class="arg">color</span> triplets.
2661
+ <span class="arg">X</span> and <span class="arg">y</span> are
2662
+ floating-point values. <span class="arg">Color</span> can be
2663
+ either a <a href="imusage.html#color_names">color name</a> or
2664
+ a <a href="struct.html#Pixel">pixel</a>.</dd>
2655
2665
 
2656
2666
  <dt>channel...</dt>
2657
2667
 
2658
2668
  <dd>0 or more <a href=
2659
- "constants.html#ChannelType">ChannelType</a> arguments.</dd>
2669
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
2670
+ channels are specified then DefaultChannels is used.</dd>
2660
2671
  </dl>
2661
2672
 
2673
+ <h4>Example</h4>
2674
+
2675
+ <p><a href="javascript:popup('sparse_color.rb.html')"><img src=
2676
+ "ex/sparse_color.png" title="Click to see the example script"
2677
+ alt="sparse_color example" /></a></p>
2678
+
2662
2679
  <h4>Returns</h4>
2663
2680
 
2664
2681
  <p>A new image</p>
2665
2682
 
2666
2683
  <h4>Magick API</h4>
2667
2684
 
2668
- <p>SparseColorInterpolate (available in 6.4.2)</p>
2685
+ <p>SparseColorImage (available in 6.4.3)</p>
2669
2686
  </div>
2670
- -->
2671
2687
 
2672
2688
  <div class="sig">
2673
2689
  <h3 id="splice">splice</h3>
@@ -3416,13 +3432,67 @@ img.to_color(pixel)
3416
3432
 
3417
3433
  <p><a href="image2.html#matte_replace">matte_replace</a>,
3418
3434
  <a href="draw.html#matte">Draw#matte</a>, <a href=
3419
- "#paint_transparent">paint_transparent</a></p>
3435
+ "#paint_transparent">paint_transparent</a>, <a href=
3436
+ "#transparent_chroma">transparent_chroma</a></p>
3420
3437
 
3421
3438
  <h4>Magick API</h4>
3422
3439
 
3423
3440
  <p>TransparentPaintImage</p>
3424
3441
  </div>
3425
3442
 
3443
+ <div class="sig">
3444
+ <h3 id="transparent_chroma">transparent_chroma</h3>
3445
+
3446
+ <p><span class="arg">img</span>.transparent_chroma(<span class=
3447
+ "arg">low</span>, <span class="arg">high</span>, <span class=
3448
+ "arg">opacity</span>=TransparentOpacity, <span class=
3449
+ "arg">invert</span>=<code>false</code>) -&gt;
3450
+ <em>image</em></p>
3451
+ </div>
3452
+
3453
+ <div class="desc">
3454
+ <h4>Description</h4>
3455
+
3456
+ <p>Changes the opacity value associated with any pixel between
3457
+ <span class="arg">low</span> and <span class="arg">high</span>
3458
+ to the value defined by <span class="arg">opacity</span>.</p>
3459
+
3460
+ <p class="imquote">As there is one fuzz value for the all the
3461
+ channels, the <a href="#transparent">transparent</a> method is
3462
+ not suitable for the operations like chroma, where the
3463
+ tolerance for similarity of two color components (RGB) can be
3464
+ different, Thus we define this method take two target pixels
3465
+ (one low and one high) and all the pixels of an image which are
3466
+ lying between these two pixels are made transparent.</p>
3467
+
3468
+ <h4>Arguments</h4>
3469
+
3470
+ <dl>
3471
+ <dt>low, high</dt>
3472
+
3473
+ <dd>The low and high ends of the pixel range</dd>
3474
+
3475
+ <dt>opacity</dt>
3476
+
3477
+ <dd>The desired opacity. The default value is
3478
+ transparent.</dd>
3479
+
3480
+ <dt>invert</dt>
3481
+
3482
+ <dd>If true, all pixels outside the range are set to
3483
+ <span class="arg">opacity</span>.</dd>
3484
+ </dl>
3485
+
3486
+ <h4>Returns</h4>
3487
+
3488
+ <p>A new image</p>
3489
+
3490
+ <h4>Magick API</h4>
3491
+
3492
+ <p>TransparentPaintImageChroma (available in ImageMagick
3493
+ 6.4.5-6)</p>
3494
+ </div>
3495
+
3426
3496
  <div class="sig">
3427
3497
  <h3 id="transpose">transpose</h3>
3428
3498
 
data/doc/imageattrs.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.7.2: class Image (attribute methods)</title>
9
+ <title>RMagick 2.8.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.7.2 User's Guide and Reference</h6>
28
+ <h6 id="header">RMagick 2.8.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=
@@ -92,8 +92,6 @@
92
92
  <ul>
93
93
  <li><a href="#dispose">dispose</a></li>
94
94
 
95
- <li><a href="#endian">endian</a></li>
96
-
97
95
  <li><a href="#extract_info">extract_info</a></li>
98
96
 
99
97
  <li><a href="#filename">filename</a></li>
@@ -131,14 +129,14 @@
131
129
 
132
130
  <li><a href=
133
131
  "#normalized_mean_error">normalized_mean_error</a></li>
132
+
133
+ <li><a href=
134
+ "#normalized_maximum_error">normalized_maximum_error</a></li>
134
135
  </ul>
135
136
  </div>
136
137
 
137
138
  <div class="toccol">
138
139
  <ul>
139
- <li><a href=
140
- "#normalized_maximum_error">normalized_maximum_error</a></li>
141
-
142
140
  <li><a href="#number_colors">number_colors</a></li>
143
141
 
144
142
  <li><a href="#offset">offset</a></li>
@@ -653,32 +651,6 @@
653
651
  "constants.html#DisposeType">DisposeType</a> constant.
654
652
  </div>
655
653
 
656
- <div class="sig">
657
- <h3 id="endian">endian</h3>
658
-
659
- <p><span class="arg">img.</span>endian -&gt;
660
- <em>type</em><br />
661
- <span class="arg">img.</span>endian = <span class=
662
- "arg">type</span></p>
663
- </div>
664
-
665
- <div class="desc">
666
- <h4>Description</h4>
667
-
668
- <p>Get or set the endian attribute. <em>(As best I can tell,
669
- only the TIFF format supports this attribute.)</em></p>
670
-
671
- <h4>Argument</h4>
672
-
673
- <p>An <a href="constants.html#EndianType">EndianType</a>
674
- value.</p>
675
-
676
- <h4>Returns</h4>
677
-
678
- <p>An <a href="constants.html#EndianType">EndianType</a>
679
- value.</p>
680
- </div>
681
-
682
654
  <div class="sig">
683
655
  <h3 id="extract_info">extract_info</h3>
684
656