rmagick 2.5.2 → 2.6.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.

Files changed (52) hide show
  1. data/ChangeLog +29 -0
  2. data/README.html +7 -7
  3. data/doc/comtasks.html +2 -2
  4. data/doc/constants.html +22 -5
  5. data/doc/draw.html +2 -2
  6. data/doc/ex/affinity.rb +12 -0
  7. data/doc/ex/affinity_images.rb +21 -0
  8. data/doc/ex/composite_tiled.rb +23 -0
  9. data/doc/ex/images/Apple.miff +0 -0
  10. data/doc/ex/images/Leaf.miff +0 -0
  11. data/doc/ex/images/Rocks_On_Beach.miff +0 -0
  12. data/doc/ex/images/Yellow_Rose.miff +0 -0
  13. data/doc/ex/level_colors.rb +11 -0
  14. data/doc/ilist.html +72 -30
  15. data/doc/image1.html +305 -34
  16. data/doc/image2.html +144 -18
  17. data/doc/image3.html +111 -8
  18. data/doc/imageattrs.html +10 -2
  19. data/doc/imusage.html +5 -5
  20. data/doc/index.html +3 -3
  21. data/doc/info.html +2 -2
  22. data/doc/magick.html +2 -2
  23. data/doc/optequiv.html +54 -9
  24. data/doc/rvg.html +2 -2
  25. data/doc/rvgclip.html +2 -2
  26. data/doc/rvggroup.html +2 -2
  27. data/doc/rvgimage.html +2 -2
  28. data/doc/rvgpattern.html +2 -2
  29. data/doc/rvgshape.html +2 -2
  30. data/doc/rvgstyle.html +2 -2
  31. data/doc/rvgtext.html +2 -2
  32. data/doc/rvgtspan.html +2 -2
  33. data/doc/rvgtut.html +2 -2
  34. data/doc/rvguse.html +2 -2
  35. data/doc/rvgxform.html +2 -2
  36. data/doc/struct.html +2 -2
  37. data/doc/usage.html +27 -8
  38. data/ext/RMagick/MANIFEST +9 -3
  39. data/ext/RMagick/extconf.rb +19 -3
  40. data/ext/RMagick/rmagick.h +23 -7
  41. data/ext/RMagick/rmdraw.c +74 -22
  42. data/ext/RMagick/rmfill.c +2 -2
  43. data/ext/RMagick/rmilist.c +79 -29
  44. data/ext/RMagick/rmimage.c +904 -393
  45. data/ext/RMagick/rminfo.c +9 -9
  46. data/ext/RMagick/rmmain.c +64 -9
  47. data/ext/RMagick/rmutil.c +158 -44
  48. data/lib/RMagick.rb +32 -1
  49. data/rmagick.gemspec +1 -1
  50. metadata +10 -4
  51. data/doc/ex/map.rb +0 -28
  52. data/doc/ex/map_f.rb +0 -15
@@ -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.5.2: class Image (instance methods e-o)</title>
9
+ <title>RMagick 2.6.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.5.2 User's Guide and Reference</h6>
50
+ <h6 id="header">RMagick 2.6.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=
@@ -111,13 +111,13 @@ td.ds {
111
111
  <li><a href="#flop_bang">flop!</a></li>
112
112
 
113
113
  <li><a href="#frame">frame</a></li>
114
+
115
+ <li><a href="#freeze">freeze</a></li>
114
116
  </ul>
115
117
  </div>
116
118
 
117
119
  <div class="toccol">
118
120
  <ul>
119
- <li><a href="#freeze">freeze</a></li>
120
-
121
121
  <li><a href="#gamma_channel">gamma_channel</a></li>
122
122
 
123
123
  <li><a href="#gamma_correct">gamma_correct</a></li>
@@ -153,6 +153,10 @@ td.ds {
153
153
 
154
154
  <li><a href="#level_channel">level_channel</a></li>
155
155
 
156
+ <li><a href="#level_colors">level_colors</a></li>
157
+
158
+ <li><a href="#levelize_channel">levelize_channel</a></li>
159
+
156
160
  <li><a href="#linear_stretch">linear_stretch</a></li>
157
161
 
158
162
  <li><a href="#liquid_rescale">liquid_rescale</a></li>
@@ -1035,7 +1039,7 @@ scanline = img.export_pixels(0, r, img.columns, 1, "RGB");
1035
1039
  <img style="padding:25px; display:none" id="frameless"
1036
1040
  onmouseout="this.style.display='none';framed.style.display='';"
1037
1041
  src="ex/images/Flower_Hat.jpg" alt="frame example" title=
1038
- "Click to see the example script" />
1042
+ "Click to see the example script" />
1039
1043
  <!-- This img tag displays the framed image when the mouse is not over -->
1040
1044
  <img onmouseover=
1041
1045
  "this.style.display='none';frameless.style.display='';" src=
@@ -2361,7 +2365,7 @@ img.level(white_point, gamma, black_point) -&gt; image # wrong!
2361
2365
  "constants.html#Miscellaneous_constants">QuantumRange</a>.
2362
2366
  The default is 0.0.</dd>
2363
2367
 
2364
- <dt>mid_point</dt>
2368
+ <dt>white_point</dt>
2365
2369
 
2366
2370
  <dd>A white point level in the range 0..QuantumRange. The
2367
2371
  default is <a href=
@@ -2380,13 +2384,142 @@ img.level(white_point, gamma, black_point) -&gt; image # wrong!
2380
2384
 
2381
2385
  <h4>See also</h4>
2382
2386
 
2383
- <p><a href="#level">level</a></p>
2387
+ <p><a href="#level">level</a>, <a href=
2388
+ "#levelize_channel">levelize_channel</a></p>
2384
2389
 
2385
2390
  <h4>Magick API</h4>
2386
2391
 
2387
2392
  <p>LevelImageChannel</p>
2388
2393
  </div>
2389
2394
 
2395
+ <div class="sig">
2396
+ <h3 id="level_colors">level_colors</h3>
2397
+
2398
+ <p><span class="arg">img</span>.level_colors(<span class=
2399
+ "arg">black_color</span>="black", <span class=
2400
+ "arg">white_color</span>="white", <span class=
2401
+ "arg">invert</span>=<code>true</code>) -&gt; <em>image</em></p>
2402
+ </div>
2403
+
2404
+ <div class="desc">
2405
+ <h4>Description</h4>
2406
+
2407
+ <p>When <span class="arg">invert</span> is true, black and
2408
+ white will be mapped to the <span class=
2409
+ "arg">black_color</span> and <span class=
2410
+ "arg">white_color</span> colors, compressing all other colors
2411
+ linearly. When <span class="arg">invert</span> is false, black
2412
+ and white will be mapped to the <span class=
2413
+ "arg">black_color</span> and <span class=
2414
+ "arg">white_color</span> colors, stretching all other colors
2415
+ linearly. The default is <code>true</code>.</p>
2416
+
2417
+ <h4>Arguments</h4>
2418
+
2419
+ <dl>
2420
+ <dt>black_color</dt>
2421
+
2422
+ <dd>The color to be mapped to black. The default is
2423
+ "black".</dd>
2424
+
2425
+ <dt>white_color</dt>
2426
+
2427
+ <dd>The color to be mapped to white. The default is
2428
+ "white".</dd>
2429
+
2430
+ <dt>invert</dt>
2431
+
2432
+ <dd>See the description above.</dd>
2433
+ </dl>
2434
+
2435
+ <h4>Returns</h4>
2436
+
2437
+ <p>A new image</p>
2438
+
2439
+ <h4>Example</h4>
2440
+
2441
+ <p class="rollover"><a href=
2442
+ "javascript:popup('level_colors.rb.html')"><img onmouseover=
2443
+ "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
2444
+ "this.src='ex/level_colors.jpg'" src="ex/level_colors.jpg"
2445
+ title="Click to see the example script" alt=
2446
+ "level_colors example" /></a> <img src="ex/images/spin.gif"
2447
+ alt="" class="spin" title=
2448
+ "Mouse over the image to see the original image" /></p>
2449
+
2450
+ <h4>See also</h4>
2451
+
2452
+ <p>This method corresponds to the +level-colors option. See
2453
+ <a href=
2454
+ "http://www.imagemagick.org/Usage/color/#level-colors">Examples
2455
+ of ImageMagick Usage</a> for more information.</p>
2456
+
2457
+ <h4>Magick API</h4>
2458
+
2459
+ <p>LevelImageColors</p>
2460
+ </div>
2461
+
2462
+ <div class="sig">
2463
+ <h3 id="levelize_channel">levelize_channel</h3>
2464
+
2465
+ <p><span class="arg">img</span>.levelize_channel(<span class=
2466
+ "arg">black_point</span>, <span class="arg">white_point</span>,
2467
+ <span class="arg">gamma</span>=1.0 [, <span class=
2468
+ "arg">channel</span>...]) -&gt; <em>image</em></p>
2469
+ </div>
2470
+
2471
+ <div class="desc">
2472
+ <h4>Description</h4>
2473
+
2474
+ <p>Maps black and white to the specified points. The reverse of
2475
+ <a href="#level_channel">level_channel</a>.</p>
2476
+
2477
+ <h4>Arguments</h4>
2478
+
2479
+ <dl>
2480
+ <dt>black_point</dt>
2481
+
2482
+ <dd>A black point level in the range 0..<a href=
2483
+ "constants.html#Miscellaneous_constants">QuantumRange</a>.
2484
+ This argument is required.</dd>
2485
+
2486
+ <dt>white_point</dt>
2487
+
2488
+ <dd>A white point level in the range 0..QuantumRange. The
2489
+ default is QuantumRange - <span class=
2490
+ "arg">black_point</span>.</dd>
2491
+
2492
+ <dt>gamma</dt>
2493
+
2494
+ <dd>A gamma correction in the range 0.0-10.0 The default is
2495
+ 1.0.</dd>
2496
+
2497
+ <dt>channel...</dt>
2498
+
2499
+ <dd>0 or more <a href=
2500
+ "constants.html#ChannelType">ChannelType</a> arguments. If no
2501
+ channels are specified, the default channels are the red,
2502
+ green, and blue channels.</dd>
2503
+ </dl>
2504
+
2505
+ <h4>Returns</h4>
2506
+
2507
+ <p>A new image</p>
2508
+
2509
+ <h4>See also</h4>
2510
+
2511
+ <p><a href="#level">level</a>, <a href=
2512
+ "#level_channel">level_channel</a></p>
2513
+
2514
+ <p>This method corresponds to the +level option. See <a href=
2515
+ "http://www.imagemagick.org/Usage/color/#level_plus">Examples
2516
+ of ImageMagick Usage</a> for more information.</p>
2517
+
2518
+ <h4>Magick API</h4>
2519
+
2520
+ <p>LevelizeImageChannel</p>
2521
+ </div>
2522
+
2390
2523
  <div class="sig">
2391
2524
  <h3 id="linear_stretch">linear_stretch</h3>
2392
2525
 
@@ -2552,18 +2685,11 @@ img.level(white_point, gamma, black_point) -&gt; image # wrong!
2552
2685
 
2553
2686
  <p>A new image</p>
2554
2687
 
2555
- <h4>Example</h4>
2556
-
2557
- <p>This image has been mapped to the Netscape 216-color
2558
- cube.</p>
2688
+ <h4>Notes</h4>
2559
2689
 
2560
- <p class="rollover"><a href=
2561
- "javascript:popup('map_f.rb.html')"><img onmouseover=
2562
- "this.src='ex/images/Flower_Hat.jpg'" onmouseout=
2563
- "this.src='ex/map_f.jpg'" src="ex/map_f.jpg" alt=
2564
- "map_f example" title="Click to see the example script" /></a>
2565
- <img src="ex/images/spin.gif" alt="" class="spin" title=
2566
- "Mouse over the image to see the original image" /></p>
2690
+ <p>This method is deprecated when using ImageMagick 6.4.3-6 and
2691
+ later. Use <a href="image1.html#affinity">affinity</a>
2692
+ instead.</p>
2567
2693
 
2568
2694
  <h4>See also</h4>
2569
2695
 
@@ -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.5.2: class Image (instance methods p-w)</title>
9
+ <title>RMagick 2.6.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.5.2 User's Guide and Reference</h6>
54
+ <h6 id="header">RMagick 2.6.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=
@@ -171,6 +171,8 @@
171
171
 
172
172
  <li><a href="#solarize">solarize</a></li>
173
173
 
174
+ <!-- <li><a href="#sparse_color">sparse_color</a></li> -->
175
+
174
176
  <li><a href="#splice">splice</a></li>
175
177
 
176
178
  <li><a href="#spread">spread</a></li>
@@ -182,13 +184,13 @@
182
184
  <li><a href="#store_pixels">store_pixels</a></li>
183
185
 
184
186
  <li><a href="#strip_bang">strip!</a></li>
185
-
186
- <li><a href="#swirl">swirl</a></li>
187
187
  </ul>
188
188
  </div>
189
189
 
190
190
  <div class="toccol">
191
191
  <ul>
192
+ <li><a href="#swirl">swirl</a></li>
193
+
192
194
  <li><a href="#sync_profiles">sync_profiles</a></li>
193
195
 
194
196
  <li><a href=
@@ -714,8 +716,8 @@ end
714
716
  <p><span class="arg">img</span>.quantize(<span class=
715
717
  "arg">number_colors</span>=256, <span class=
716
718
  "arg">colorspace</span>=RGBColorspace, <span class=
717
- "arg">dither</span>=<code>true</code>, <span class=
718
- "arg">tree_depth</span>=0, <span class=
719
+ "arg">dither</span>=<code>RiemersmaDitherMethod</code>,
720
+ <span class="arg">tree_depth</span>=0, <span class=
719
721
  "arg">measure_error</span>=<code>false</code>) -&gt;
720
722
  <em>image</em></p>
721
723
  </div>
@@ -752,8 +754,9 @@ end
752
754
 
753
755
  <dt>dither</dt>
754
756
 
755
- <dd>Set to <code>false</code> to disable dithering. See the
756
- documentation for the <a href=
757
+ <dd>A <a href="constants.html#DitherMethod">DitherMethod</a>
758
+ value. Set to <code>NoDitherMethod</code> to disable
759
+ dithering. See the documentation for the <a href=
757
760
  "http://redux.imagemagick.org/script/command-line-options.php#dither">
758
761
  ImageMagick -dither option</a> for more information.</dd>
759
762
 
@@ -2527,6 +2530,88 @@ img.properties &raquo;
2527
2530
  <p>SolarizeImage</p>
2528
2531
  </div>
2529
2532
 
2533
+ <!--
2534
+ <div class="sig">
2535
+ <h3 id="sparse_color">sparse_color</h3>
2536
+
2537
+ <p><span class="arg">img</span>.sparse_color(<span class=
2538
+ "arg">method</span>, <span class="arg">points</span>[,
2539
+ <span class="arg">channel</span>...]) -&gt; <em>image</em></p>
2540
+ </div>
2541
+
2542
+ <div class="desc">
2543
+ <h4>Description</h4>
2544
+
2545
+ <p class="imquote">Given a set of coordinates interpolates the
2546
+ colors found at those coordinates, across the whole image,
2547
+ using various methods.</p>
2548
+
2549
+ <p>For more information about this method see the ImageMagick
2550
+ documentation for the -sparse-color option. Also see <a href=
2551
+ "http://www.imagemagick.org/Usage/canvas/#sparse-color">Sparse
2552
+ Points of Color</a> at <a href=
2553
+ "http://www.imagemagick.org/Usage/">Examples of ImageMagick
2554
+ Usage</a>.</p>
2555
+
2556
+ <h4>Arguments</h4>
2557
+
2558
+ <dl>
2559
+ <dt>method</dt>
2560
+
2561
+ <dd>
2562
+ One of the following interpolation methods:
2563
+
2564
+ <dl>
2565
+ <dt>BarycentricColorInterpolate</dt>
2566
+
2567
+ <dd class="imquote">Three point triangle of color given 3
2568
+ points. Giving only 2 points will form a linear gradient
2569
+ between those points. Gradient is however not restricted
2570
+ to just the triangle or line.</dd>
2571
+
2572
+ <dt>BilinearColorInterpolate</dt>
2573
+
2574
+ <dd class="imquote">Like barycentric but for 4 points.
2575
+ Less than 4 points fall back to barycentric.</dd>
2576
+
2577
+ <dt>ShepardsColorInterpolate</dt>
2578
+
2579
+ <dd class="imquote">Colors points basied on the ratio of
2580
+ inverse distance squared. Generating spots of color in a
2581
+ sea of the average of colors.</dd>
2582
+
2583
+ <dt>VoronoiColorInterpolate</dt>
2584
+
2585
+ <dd class="imquote">Simply map each pixel to the to
2586
+ nearest color point given. The result are polygonal
2587
+ 'cells' of solid color.</dd>
2588
+
2589
+ <dt>PolynomialColorInterpolate</dt>
2590
+
2591
+ <dd class="imquote">&nbsp;</dd>
2592
+ </dl>
2593
+ </dd>
2594
+
2595
+ <dt>points</dt>
2596
+
2597
+ <dd>An array of coordinates. The number of coordinates varies
2598
+ according to the method.</dd>
2599
+
2600
+ <dt>channel...</dt>
2601
+
2602
+ <dd>0 or more <a href=
2603
+ "constants.html#ChannelType">ChannelType</a> arguments.</dd>
2604
+ </dl>
2605
+
2606
+ <h4>Returns</h4>
2607
+
2608
+ <p>A new image</p>
2609
+
2610
+ <h4>Magick API</h4>
2611
+
2612
+ <p>SparseColorInterpolate (available in 6.4.2)</p>
2613
+ </div>
2614
+ -->
2530
2615
  <div class="sig">
2531
2616
  <h3 id="splice">splice</h3>
2532
2617
 
@@ -4170,6 +4255,24 @@ end
4170
4255
 
4171
4256
  <p>Almost all of the examples call <code>write</code>.</p>
4172
4257
 
4258
+ <h4>Notes</h4>
4259
+
4260
+ <p>When the argument is a filename, specify the output format
4261
+ via the filename extension (for example ".jpg" or ".gif") or by
4262
+ prefixing the filename with the desired format (for example,
4263
+ "jpeg:myfile"), not via <code>format=</code>.</p>
4264
+
4265
+ <p><em>Do not</em> use a StringIO object or a Tempfile object
4266
+ as the argument. Neither of these work. Use
4267
+ <code>to_blob</code> to write to a String. Instead of a
4268
+ tempfile, get the path of the tempfile from the
4269
+ <code>path</code> method. Prefix the path with the desired
4270
+ image format. For example,</p>
4271
+ <pre>
4272
+ temp = Tempfile.new("image")
4273
+ img.write("jpeg:"+ temp.path)
4274
+ </pre>
4275
+
4173
4276
  <h4>See also</h4>
4174
4277
 
4175
4278
  <p><a href="ilist.html#write">ImageList#write</a></p>
@@ -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.5.2: class Image (attribute methods)</title>
9
+ <title>RMagick 2.6.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.5.2 User's Guide and Reference</h6>
28
+ <h6 id="header">RMagick 2.6.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=
@@ -1556,6 +1556,14 @@ blur_image is 100% complete.
1556
1556
 
1557
1557
  <dd class="imquote">use a dithered pattern to choose a pixel
1558
1558
  in a 32x32 neighborhood.</dd>
1559
+
1560
+ <dt>HorizontalTileVirtualPixelMethod</dt>
1561
+
1562
+ <dd class="imquote">Horizontally tile the image</dd>
1563
+
1564
+ <dt>VerticalTileVirtualPixelMethod</dt>
1565
+
1566
+ <dd class="imquote">Vertically tile the image</dd>
1559
1567
  </dl>
1560
1568
 
1561
1569
  <p>Some of these values are not supported by older versions of
@@ -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.5.2: ImageMagick Conventions</title>
9
+ <title>RMagick 2.6.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.5.2 User's Guide and Reference</h6>
72
+ <h6 id="header">RMagick 2.6.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=
@@ -164,9 +164,9 @@
164
164
  color names. A color name can be</p>
165
165
 
166
166
  <ol>
167
- <li>an X color name such as "red", "chocolate", or
168
- "lightslategray". (On Linux and FreeBSD, the master list is
169
- usually <code>/usr/X11R6/lib/X11/rgb.txt</code>.)</li>
167
+ <li>an <a href=
168
+ "http://en.wikipedia.org/wiki/X11_color_names">X11 color
169
+ name</a> such as "red", "chocolate", or "lightslategray".</li>
170
170
 
171
171
  <li>an <a href=
172
172
  "http://www.w3.org/TR/SVG/types.html#ColorKeywords">SVG color