rmagick 1.13.0 → 1.14.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 (48) hide show
  1. data/ChangeLog +34 -0
  2. data/README.html +12 -29
  3. data/README.txt +10 -26
  4. data/configure +768 -73
  5. data/configure.ac +29 -26
  6. data/doc/comtasks.html +3 -4
  7. data/doc/constants.html +85 -67
  8. data/doc/draw.html +22 -0
  9. data/doc/ex/dissolve.rb +13 -0
  10. data/doc/ex/edge.rb +1 -1
  11. data/doc/ex/mask.rb +37 -0
  12. data/doc/ex/sketch.rb +25 -0
  13. data/doc/ex/watermark.rb +23 -0
  14. data/doc/ilist.html +11 -13
  15. data/doc/image1.html +601 -52
  16. data/doc/image2.html +637 -28
  17. data/doc/image3.html +339 -54
  18. data/doc/imageattrs.html +211 -41
  19. data/doc/imusage.html +41 -2
  20. data/doc/index.html +8 -6
  21. data/doc/info.html +57 -42
  22. data/doc/optequiv.html +1919 -0
  23. data/doc/rvg.html +45 -42
  24. data/doc/scripts/doc.js +14 -1
  25. data/doc/scripts/stripeTables.js +23 -0
  26. data/doc/usage.html +66 -15
  27. data/{doc/ex → examples}/demo.rb +0 -0
  28. data/examples/find_similar_region.rb +34 -0
  29. data/examples/import_export.rb +1 -1
  30. data/examples/pattern_fill.rb +2 -2
  31. data/examples/rotating_text.rb +2 -4
  32. data/examples/thumbnail.rb +1 -1
  33. data/ext/RMagick/MANIFEST +9 -4
  34. data/ext/RMagick/extconf.rb.in +1 -1
  35. data/ext/RMagick/rmagick.h +47 -10
  36. data/ext/RMagick/rmagick_config.h.in +24 -0
  37. data/ext/RMagick/rmdraw.c +32 -7
  38. data/ext/RMagick/rmilist.c +55 -37
  39. data/ext/RMagick/rmimage.c +1588 -447
  40. data/ext/RMagick/rminfo.c +94 -3
  41. data/ext/RMagick/rmmain.c +68 -7
  42. data/ext/RMagick/rmutil.c +67 -9
  43. data/lib/RMagick.rb +190 -53
  44. data/lib/rvg/stretchable.rb +17 -13
  45. data/rmagick.gemspec +1 -1
  46. metadata +11 -6
  47. data/doc/ex/level_channel.rb +0 -33
  48. data/doc/ex/opaque.rb +0 -14
@@ -53,6 +53,11 @@
53
53
 
54
54
  <li><a href="#base_rows">base_rows</a></li>
55
55
 
56
+ <li><a href="#bias">bias</a></li>
57
+
58
+ <li><a href=
59
+ "#black_point_compensation">black_point_compensation</a></li>
60
+
56
61
  <li><a href="#blur">blur</a></li>
57
62
 
58
63
  <li><a href="#border_color">border_color</a></li>
@@ -63,8 +68,6 @@
63
68
 
64
69
  <li><a href="#class_type">class_type</a></li>
65
70
 
66
- <li><a href="#clip_mask">clip_mask</a></li>
67
-
68
71
  <li><a href="#color_profile">color_profile</a></li>
69
72
 
70
73
  <li><a href="#colors">colors</a></li>
@@ -113,6 +116,10 @@
113
116
 
114
117
  <li><a href="#interlace">interlace</a></li>
115
118
 
119
+ <li><a href="#iptc_profile">iptc_profile</a></li>
120
+
121
+ <li><a href="#mask">mask</a></li>
122
+
116
123
  <li><a href="#matte">matte</a></li>
117
124
 
118
125
  <li><a href=
@@ -123,14 +130,14 @@
123
130
  <li><a href="#monitor">monitor</a></li>
124
131
 
125
132
  <li><a href="#montage">montage</a></li>
126
-
127
- <li><a href=
128
- "#normalized_mean_error">normalized_mean_error</a></li>
129
133
  </ul>
130
134
  </div>
131
135
 
132
136
  <div class="toccol">
133
137
  <ul>
138
+ <li><a href=
139
+ "#normalized_mean_error">normalized_mean_error</a></li>
140
+
134
141
  <li><a href=
135
142
  "#normalized_maximum_error">normalized_maximum_error</a></li>
136
143
 
@@ -138,12 +145,15 @@
138
145
 
139
146
  <li><a href="#offset">offset</a></li>
140
147
 
141
- <li><a href="#opacity_eq">opacity</a></li>
148
+ <li><a href="#opacity">opacity</a></li>
142
149
 
143
150
  <li><a href="#orientation">orientation</a></li>
144
151
 
145
152
  <li><a href="#page">page</a></li>
146
153
 
154
+ <li><a href=
155
+ "#pixel_interpolation_method">pixel_interpolation_method</a></li>
156
+
147
157
  <li><a href="#quality">quality</a></li>
148
158
 
149
159
  <li><a href="#quantum_depth">quantum_depth</a></li>
@@ -241,6 +251,45 @@
241
251
  Get-only.</p>
242
252
  </div>
243
253
 
254
+ <div class="sig">
255
+ <h3 id="bias">bias</h3>
256
+
257
+ <p><span class="arg">image</span>.bias -&gt; bias<br />
258
+ <span class="arg">image</span>.bias = <span class=
259
+ "arg">aFloat</span><br />
260
+ <span class="arg">image</span>.bias = <span class=
261
+ "arg">aString</span></p>
262
+ </div>
263
+
264
+ <div class="desc">
265
+ <h4>Description</h4>
266
+
267
+ <p class="imquote">Add bias when convolving an image</p>
268
+
269
+ <h4>Argument</h4>
270
+
271
+ <p>Either a number between 0.0 and 1.0 or a string in the form
272
+ "NN%".</p>
273
+ </div>
274
+
275
+ <div class="sig">
276
+ <h3 id="black_point_compensation">black_point_compensation</h3>
277
+
278
+ <p><span class="arg">image</span>.black_point_compensation
279
+ -&gt; <code>true</code> or <code>false</code><br />
280
+ <span class="arg">image</span>.black_point_compensation =
281
+ <code>true</code> or <code>false</code> -&gt; <em>self</em></p>
282
+ </div>
283
+
284
+ <div class="desc">
285
+ <h4>Description</h4>
286
+
287
+ <p>Use black point compensation. Typically used in CMYK-to-RGB
288
+ conversion along with <code>image.</code><a href=
289
+ "#rendering_intent">rendering_intent</a>=<a href=
290
+ "constants.html#RenderingIntent">Magick::RelativeIntent</a></p>
291
+ </div>
292
+
244
293
  <div class="sig">
245
294
  <h3 id="blur">blur</h3>
246
295
 
@@ -253,6 +302,10 @@
253
302
  <div class="desc">
254
303
  <h4>Description</h4>The blur factor to use when resizing. See
255
304
  <a href="image3.html#resize">resize</a>.
305
+
306
+ <h4>Argument</h4>
307
+
308
+ <p>&gt; 1.0 is blurry, &lt; 1.0 is sharp.</p>
256
309
  </div>
257
310
 
258
311
  <div class="sig">
@@ -356,29 +409,6 @@
356
409
  constant.</p>
357
410
  </div>
358
411
 
359
- <div class="sig">
360
- <h3 id="clip_mask">clip_mask</h3>
361
-
362
- <p><span class="arg">image.</span>clip_mask = <span class=
363
- "arg">anImage</span> or <span class="arg">anImageList</span> or
364
- <span class="arg"><code>nil</code></span></p>
365
- </div>
366
-
367
- <div class="desc">
368
- <h4>Description</h4>
369
-
370
- <p>Associates a clip mask with the image. The clip mask must
371
- have the same dimensions as the image. <span class=
372
- "imquote">Set any pixel component of the clip mask to
373
- TransparentOpacity to prevent that corresponding image pixel
374
- component from being updated.</span> Set-only.</p>
375
-
376
- <h4>Arguments</h4>
377
-
378
- <p>If an imagelist, uses the current image as the clip mask.
379
- Assign <code>nil</code> to remove the clip mask.</p>
380
- </div>
381
-
382
412
  <div class="sig">
383
413
  <h3 id="color_profile">color_profile</h3>
384
414
 
@@ -396,12 +426,27 @@
396
426
 
397
427
  <h4>Arguments</h4>
398
428
 
399
- <p>A color profile is represented as a string.</p>
429
+ <p>A color profile is represented as a string. If the argument
430
+ is <code>nil</code> instead of <span class="arg">aString</span>
431
+ then any ICC color profile present in the image is deleted.</p>
432
+
433
+ <p>The setter form of this attribute deletes any existing ICC
434
+ color profile(s) before adding the new one. If you need to add
435
+ both source and destination profiles use <a href=
436
+ "image1.html#add_profile">add_profile</a> or <a href=
437
+ "image3.html#profile_bang">profile!</a>.</p>
400
438
 
401
439
  <h4>Returns</h4>
402
440
 
403
441
  <p>The current color profile, or <code>nil</code> if there is
404
442
  no profile.</p>
443
+
444
+ <h4>See also</h4>
445
+
446
+ <p><a href="image1.html#add_profile">add_profile</a>, <a href=
447
+ "image1.html#delete_profile">delete_profile</a>, <a href=
448
+ "image1.html#each_profile">each_profile</a>, <a href=
449
+ "image3.html#profile_bang">profile!</a></p>
405
450
  </div>
406
451
 
407
452
  <div class="sig">
@@ -895,14 +940,102 @@
895
940
  constant.</p>
896
941
  </div>
897
942
 
943
+ <div class="sig">
944
+ <h3 id="iptc_profile">iptc_profile</h3>
945
+
946
+ <p><span class="arg">image.</span>iptc_profile -&gt;
947
+ <em>aString</em><br />
948
+ <span class="arg">image.</span>iptc_profile = <span class=
949
+ "arg">aString</span></p>
950
+ </div>
951
+
952
+ <div class="desc">
953
+ <h4>Description</h4>
954
+
955
+ <p>The <a href="http://www.iptc.org/IIM/">International Press
956
+ Telecommunications Council profile</a>.</p>
957
+
958
+ <h4>Arguments</h4>
959
+
960
+ <p>A IPTC profile is represented as a string. If the argument
961
+ is <code>nil</code> instead of <span class="arg">aString</span>
962
+ then any IPTC profile present in the image is deleted.</p>
963
+
964
+ <h4>Returns</h4>
965
+
966
+ <p>The current IPTC profile, or <code>nil</code> if there is no
967
+ profile.</p>
968
+
969
+ <h4>See also</h4>
970
+
971
+ <p><a href="image1.html#add_profile">add_profile</a>, <a href=
972
+ "image1.html#delete_profile">delete_profile</a>, <a href=
973
+ "image1.html#each_profile">each_profile</a>. <a href=
974
+ "image3.html#profile_bang">profile!</a></p>
975
+ </div>
976
+
977
+ <div class="sig">
978
+ <h3 id="mask">mask</h3>
979
+
980
+ <p><span class="arg">image</span>.mask -&gt; <em>anImage</em>
981
+ or <code>nil</code><br />
982
+ <span class="arg">image.</span>mask = <em>anImage</em> or
983
+ <em>anImageList</em> or <code>nil</code></p>
984
+ </div>
985
+
986
+ <div class="desc">
987
+ <h4>Description</h4>
988
+
989
+ <p>The <code>mask=</code> attribute writer sets an image clip
990
+ mask created from the specified mask image. <span class=
991
+ "imquote">The mask image must have the same dimensions as the
992
+ image being masked.</span> If not, the mask image is resized to
993
+ match. <span class="imquote">If the mask image has an alpha
994
+ channel the opacity of each pixel is used to define the mask.
995
+ Otherwise, the intensity (gray level) of each pixel is
996
+ used.</span></p>
997
+
998
+ <p>In general, if the mask image does not have an alpha
999
+ channel, a white pixel in the mask prevents changes to the
1000
+ corresponding pixel in the image being masked, while a black
1001
+ pixel allows changes. A pixel that is neither black nor white
1002
+ will allow partial changes depending on its intensity.</p>
1003
+
1004
+ <p>Use <a href="#matte">matte=</a> to specify whether or not
1005
+ the mask image has an alpha channel.</p>
1006
+
1007
+ <p>The <code>mask</code> attribute reader returns a copy of the
1008
+ clip mask. This is <em>not</em> a copy of the mask image that
1009
+ was used to create the clip mask, nor is it the clip mask image
1010
+ itself. Therefore, modifying the image returned by
1011
+ <code>mask</code> does not change the clip mask itself. To
1012
+ change the clip mask you must assign a new image to the
1013
+ <code>mask=</code> attribute writer.</p>
1014
+
1015
+ <h4>Arguments</h4>
1016
+
1017
+ <p>If the value is an imagelist, uses the current image as the
1018
+ mask image. Assign <code>nil</code> to remove the clip
1019
+ mask.</p>
1020
+
1021
+ <h4>Example</h4>
1022
+
1023
+ <p class="rollover"><a href=
1024
+ "javascript:popup('mask.rb.html')"><img src="ex/mask.jpg" alt=
1025
+ "mask example" title="Click to see the example script"
1026
+ onmouseover="this.src='ex/images/Flower_Hat.jpg'" onmouseout=
1027
+ "this.src='ex/mask.jpg'" /></a> <img src="ex/images/spin.gif"
1028
+ alt="" class="spin" title=
1029
+ "Mouse over the example to see the original image" /></p>
1030
+ </div>
1031
+
898
1032
  <div class="sig">
899
1033
  <h3 id="matte">matte</h3>
900
1034
 
901
1035
  <p><span class="arg">image.</span>matte -&gt; <code>true</code>
902
1036
  <em>or</em> <code>false</code><br />
903
- <span class="arg">image.</span>matte = <span class=
904
- "arg"><code>true</code></span> or <span class=
905
- "arg"><code>false</code></span></p>
1037
+ <span class="arg">image.</span>matte = <code>true</code> or
1038
+ <code>false</code></p>
906
1039
  </div>
907
1040
 
908
1041
  <div class="desc">
@@ -1199,6 +1332,40 @@ blur_image is 100% complete.
1199
1332
  <p>A <a href="struct.html#Rectangle">Rectangle</a> object.</p>
1200
1333
  </div>
1201
1334
 
1335
+ <div class="sig">
1336
+ <h3 id="pixel_interpolation_method">
1337
+ pixel_interpolation_method</h3>
1338
+
1339
+ <p><span class="arg">image</span>.pixel_interpolation_method
1340
+ -&gt; <em>anInterpolatePixelMethod</em><br />
1341
+ <span class="arg">image</span>.pixel_interpolation_method =
1342
+ <span class="arg">anInterpolatePixelMethod</span></p>
1343
+ </div>
1344
+
1345
+ <div class="desc">
1346
+ <h4>Description</h4>
1347
+
1348
+ <p>Get/set the pixel color interpolation method. Some methods
1349
+ (such as <a href="image3.html#wave">wave</a>, <a href=
1350
+ "image3.html#swirl">swirl</a>, <a href=
1351
+ "image2.html#implode">implode</a>, and <a href=
1352
+ "image1.html#composite">composite</a>) use the pixel color
1353
+ interpolation method to determine how to blend adjacent
1354
+ pixels.</p>
1355
+
1356
+ <h4>Argument</h4>
1357
+
1358
+ <p>An <a href=
1359
+ "constants.html#InterpolatePixelMethod">InterpolatePixelMethod</a>
1360
+ enum value.</p>
1361
+
1362
+ <h4>Returns</h4>
1363
+
1364
+ <p>An <a href=
1365
+ "constants.html#InterpolatePixelMethod">InterpolatePixelMethod</a>
1366
+ enum value.</p>
1367
+ </div>
1368
+
1202
1369
  <div class="sig">
1203
1370
  <h3 id="quality">quality</h3>
1204
1371
 
@@ -1207,10 +1374,12 @@ blur_image is 100% complete.
1207
1374
  </div>
1208
1375
 
1209
1376
  <div class="desc">
1210
- <h4>Description</h4>For JPEG images, returns the Independent
1211
- JPEG Group quality value. This number is a measurement of the
1212
- amount of compression used when the image was saved. Lower
1213
- numbers mean higher compression.
1377
+ <h4>Description</h4>
1378
+
1379
+ <p>For JPEG images, returns the Independent JPEG Group quality
1380
+ value. This number is a measurement of the amount of
1381
+ compression used when the image was saved. Lower numbers mean
1382
+ higher compression.</p>
1214
1383
 
1215
1384
  <h4>Returns</h4>
1216
1385
 
@@ -1249,7 +1418,9 @@ blur_image is 100% complete.
1249
1418
  <div class="desc">
1250
1419
  <h4>Description</h4>
1251
1420
 
1252
- <p class="imquote">The type of rendering intent.</p>
1421
+ <p class="imquote">The type of rendering intent. See <a href=
1422
+ "http://www.cambridgeincolour.com/tutorials/color-space-conversion.htm">
1423
+ http://www.cambridgeincolour.com/tutorials/color-space-conversion.htm</a></p>
1253
1424
 
1254
1425
  <h4>Arguments</h4>
1255
1426
 
@@ -1296,9 +1467,8 @@ blur_image is 100% complete.
1296
1467
 
1297
1468
  <p><span class="arg">image.</span>start_loop -&gt;
1298
1469
  <code>true</code> or <code>false</code><br />
1299
- <span class="arg">image.</span>start_loop = <span class=
1300
- "arg"><code>true</code></span> or <span class=
1301
- "arg"><code>false</code></span></p>
1470
+ <span class="arg">image.</span>start_loop = <code>true</code>
1471
+ or <code>false</code></p>
1302
1472
  </div>
1303
1473
 
1304
1474
  <div class="desc">
@@ -74,7 +74,7 @@
74
74
  <div class="nav">
75
75
  &laquo;&nbsp;<a href="usage.html">Prev</a> | <a href=
76
76
  "index.html">Contents</a> | <a href=
77
- "comtasks.html">Next</a>&nbsp;&raquo;
77
+ "optequiv.html">Next</a>&nbsp;&raquo;
78
78
  </div>
79
79
 
80
80
  <h1>RMagick: ImageMagick/GraphicsMagick Conventions</h1>
@@ -85,6 +85,9 @@
85
85
  <ul style="margin-left: 15px; padding-top: 1em">
86
86
  <li><a href="#formats">Image formats and filenames</a></li>
87
87
 
88
+ <li><a href="#frames">Selecting frames from a multi-frame
89
+ image file</a></li>
90
+
88
91
  <li><a href="#color_names">Color names</a></li>
89
92
 
90
93
  <li><a href="#geometry">The geometry string</a></li>
@@ -119,6 +122,42 @@
119
122
  <p><em>Note:</em> Keep in mind that files in some formats may
120
123
  only be read by &times;Magick, not written.</p>
121
124
 
125
+ <h2 id="frames">Selecting frames from a multi-frame image
126
+ file</h2>
127
+
128
+ <p>When reading a multi-frame image file such as an AVI you can
129
+ specify the subset of frames by adding a list of frame number(s)
130
+ to the end of the file name enclosed in square brackets. For
131
+ example, "my_movie.avi[0]" tells &times;Magick to read only the
132
+ first frame. In general,</p>
133
+
134
+ <dl>
135
+ <dt>[N]</dt>
136
+
137
+ <dd>identifies a single frame. Frame numbers start at 0.
138
+ Negative numbers cause frames to be selected from the end of
139
+ the image file.</dd>
140
+
141
+ <dt>[M,N,O]</dt>
142
+
143
+ <dd>identifies multiple non-sequential frame numbers.</dd>
144
+
145
+ <dt>[N-M]</dt>
146
+
147
+ <dd>identifies the sequence of frames numbered N through
148
+ M.</dd>
149
+
150
+ <dt>[M,N-O,P]</dt>
151
+
152
+ <dd>identifies both non-sequential and sequential frame
153
+ numbers</dd>
154
+ </dl>
155
+
156
+ <p>Note that the entire image file will be read into memory
157
+ before the frames are selected. See <a href=
158
+ "http://www.cit.gu.edu.au/~anthony/graphics/imagick6/files/#read">
159
+ this page</a> for additional uses of the [] modifier.</p>
160
+
122
161
  <h2 id="color_names">Color names</h2>
123
162
 
124
163
  <p>Many RMagick methods expect color name arguments or return
@@ -456,7 +495,7 @@ i = Image.read("gradient:red-blue") { self.size = "100x200" }
456
495
 
457
496
  <div class="nav">
458
497
  &laquo; <a href="usage.html">Prev</a> | <a href=
459
- "index.html">Contents</a> | <a href="comtasks.html">Next</a>
498
+ "index.html">Contents</a> | <a href="optequiv.html">Next</a>
460
499
  &raquo;
461
500
  </div>
462
501
  </body>
@@ -124,6 +124,8 @@
124
124
  <li><a href="imusage.html">ImageMagick and GraphicsMagick
125
125
  Conventions</a></li>
126
126
 
127
+ <li><a href="optequiv.html">Magick Command Options and Their Equivalent Methods</a></li>
128
+
127
129
  <li><a href="comtasks.html">Common Tasks</a></li>
128
130
  </ul>
129
131
  </li>
@@ -398,9 +400,9 @@
398
400
  &times;Magick's version number. Simply bring up irb and run this
399
401
  command: <code>ruby -r RMagick -e "puts Magick::Long_version"</code></p>
400
402
  <pre class="example" id="version">
401
- This is RMagick 1.10.0 ($Date: 2006/03/26 22:05:56 $) Copyright (C) 2006 by Timothy P. Hunter
402
- Built with ImageMagick 6.2.6 01/03/06 Q8 http://www.imagemagick.org
403
- Built for ruby 1.8.3 (2005-09-21) [i686-linux]
403
+ This is RMagick 1.13.0 ($Date: 2006/09/05 23:11:25 $) Copyright (C) 2006 by Timothy P. Hunter
404
+ Built with ImageMagick 6.2.9 08/21/06 Q8 http://www.imagemagick.org
405
+ Built for ruby 1.8.5 (2006-08-25) [i686-linux]
404
406
  Web page: http://rmagick.rubyforge.org
405
407
  Email: rmagick@rubyforge.org
406
408
  </pre>
@@ -437,12 +439,12 @@ Email: rmagick@rubyforge.org
437
439
  Notices</a></h3>
438
440
 
439
441
  <ul>
440
- <li>RMagick is copyright &copy; 2006 by Timothy P. Hunter.</li>
442
+ <li>RMagick is copyrighted by Timothy P. Hunter.</li>
441
443
 
442
- <li>ImageMagick is copyright &copy; 2005 ImageMagick
444
+ <li>ImageMagick is copyrighted by ImageMagick
443
445
  Studio.</li>
444
446
 
445
- <li>GraphicsMagick is copyright &copy; 2005 GraphicsMagick
447
+ <li>GraphicsMagick is copyrighted by the GraphicsMagick
446
448
  Group.</li>
447
449
 
448
450
  <li>Ruby is copyrighted free software by Yukihiro