Skip to content

Commit d501816

Browse files
authored
Update document (#27)
1 parent 3b47651 commit d501816

27 files changed

+352
-372
lines changed

comtasks.html

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
66

7-
<title>RMagick 6.0.0: Common Tasks</title>
7+
<title>RMagick 6.0.1: Common Tasks</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
99
<meta name="GENERATOR" content="Quanta Plus" />
1010
<meta name="Copyright" content="Copyright (C) 2006 by Timothy P. Hunter" />
@@ -25,7 +25,7 @@
2525
</head>
2626

2727
<body>
28-
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
28+
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
2929

3030
<div class="nav">&laquo;&nbsp;<a href="optequiv.html">Prev</a> | <a href="index.html">Contents</a> | <a href="magick.html">Next</a>&nbsp;&raquo;</div>
3131

@@ -64,30 +64,29 @@ <h2 id="info">Getting information about an image</h2>
6464
</p>
6565
<pre class="example">
6666
require "rmagick"
67-
ARGV.each { |file|
68-
puts file
69-
img = Magick::Image::read(file).first
70-
puts " Format: #{img.format}"
71-
puts " Geometry: #{img.columns}x#{img.rows}"
72-
puts " Class: " + case img.class_type
73-
when Magick::DirectClass
74-
"DirectClass"
75-
when Magick::PseudoClass
76-
"PseudoClass"
77-
end
78-
puts " Depth: #{img.depth} bits-per-pixel"
79-
puts " Colors: #{img.number_colors}"
80-
puts " Filesize: #{img.filesize}"
81-
puts " Resolution: #{img.x_resolution.to_i}x#{img.y_resolution.to_i} "+
82-
"pixels/#{img.units == Magick::PixelsPerInchResolution ?
83-
"inch" : "centimeter"}"
84-
if img.properties.length &gt; 0
85-
puts " Properties:"
86-
img.properties { |name,value|
87-
puts %Q| #{name} = "#{value}"|
88-
}
89-
end
90-
}
67+
ARGV.each do |file|
68+
puts file
69+
img = Magick::Image.read(file).first
70+
puts " Format: #{img.format}"
71+
puts " Geometry: #{img.columns}x#{img.rows}"
72+
puts " Class: " + case img.class_type
73+
when Magick::DirectClass
74+
"DirectClass"
75+
when Magick::PseudoClass
76+
"PseudoClass"
77+
end
78+
puts " Depth: #{img.depth} bits-per-pixel"
79+
puts " Colors: #{img.number_colors}"
80+
puts " Filesize: #{img.filesize}"
81+
puts " Resolution: #{img.x_resolution.to_i}x#{img.y_resolution.to_i} " +
82+
"pixels/#{img.units == Magick::PixelsPerInchResolution ? 'inch' : 'centimeter'}"
83+
next if img.properties.length &lt;= 0
84+
85+
puts " Properties:"
86+
img.properties do |name, value|
87+
puts %( #{name} = "#{value}")
88+
end
89+
end
9190
</pre
9291
>
9392

@@ -109,7 +108,7 @@ <h2 id="thumb">Making thumbnails</h2>
109108
>. All four are equally easy to use. Specify the number of columns and rows you want the thumbnail to have, like this:
110109
</p>
111110
<pre class="example">
112-
img = Image.new "bigimage.gif"
111+
img = Magick::Image.new "bigimage.gif"
113112
thumb = img.scale(125, 125)
114113
thumb.write "thumb.gif"
115114
</pre
@@ -120,7 +119,7 @@ <h2 id="thumb">Making thumbnails</h2>
120119
image to 25% of its original size, do this:
121120
</p>
122121
<pre class="example">
123-
img = Image.new "bigimage.gif"
122+
img = Magick::Image.new "bigimage.gif"
124123
thumb = img.scale(0.25)
125124
thumb.write "thumb.gif"
126125
</pre

constants.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
66

7-
<title>RMagick 6.0.0: Constants</title>
7+
<title>RMagick 6.0.1: Constants</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
99
<meta name="GENERATOR" content="Quanta Plus" />
1010
<meta name="Copyright" content="Copyright (C) 2006 by Timothy P. Hunter" />
@@ -57,7 +57,7 @@
5757
</head>
5858

5959
<body>
60-
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
60+
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
6161

6262
<div class="nav">&laquo;&nbsp;<a href="info.html">Prev</a> | <a href="index.html">Contents</a> | <a href="rvgtut.html">Next</a>&nbsp;&raquo;</div>
6363

@@ -417,7 +417,7 @@ <h3 class="const" id="ColorspaceType">ColorspaceType</h3>
417417

418418
<p>Each version of ImageMagick defines a subset of the colorspaces listed below. To list the subset supported by your version, issue the command:</p>
419419
<pre class="example">
420-
ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
420+
ruby -r rmagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
421421
</pre
422422
>
423423

draw.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
66

7-
<title>RMagick 6.0.0: class Draw</title>
7+
<title>RMagick 6.0.1: class Draw</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
99
<meta name="GENERATOR" content="Quanta Plus" />
1010
<meta name="Copyright" content="Copyright (C) 2006 by Timothy P. Hunter" />
@@ -20,7 +20,7 @@
2020
</head>
2121

2222
<body>
23-
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
23+
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
2424

2525
<div class="nav">&laquo;&nbsp;<a href="image3.html">Prev</a> | <a href="index.html">Contents</a> | <a href="struct.html">Next</a>&nbsp;&raquo;</div>
2626

@@ -291,7 +291,7 @@ <h4>Returns</h4>
291291

292292
<h4>Example</h4>
293293
<pre>
294-
gc = Draw.new
294+
gc = Magick::Draw.new
295295
</pre
296296
>
297297
</div>
@@ -364,12 +364,12 @@ <h4>Example</h4>
364364
</p>
365365
<pre>
366366
title.annotate(montage, 0,0,0,40, 'Named Colors') { |options|
367-
options.font_family = 'Helvetica'
368-
options.fill = 'white'
369-
options.stroke = 'transparent'
370-
options.pointsize = 32
371-
options.font_weight = BoldWeight
372-
options.gravity = NorthGravity
367+
options.font_family = 'Helvetica'
368+
options.fill = 'white'
369+
options.stroke = 'transparent'
370+
options.pointsize = 32
371+
options.font_weight = BoldWeight
372+
options.gravity = NorthGravity
373373
}
374374
</pre
375375
>

ilist.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />
66

7-
<title>RMagick 6.0.0: class ImageList</title>
7+
<title>RMagick 6.0.1: class ImageList</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
99
<meta name="GENERATOR" content="Quanta Plus" />
1010
<meta name="Copyright" content="Copyright (C) 2005 by Timothy P. Hunter" />
@@ -14,7 +14,7 @@
1414
</head>
1515

1616
<body>
17-
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
17+
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
1818

1919
<div class="nav">&laquo;&nbsp;<a href="magick.html">Prev</a> | <a href="index.html">Contents</a> | <a href="imageattrs.html">Next</a>&nbsp;&raquo;</div>
2020

@@ -1702,9 +1702,9 @@ <h4>Example</h4>
17021702
i = Magick::ImageList.new
17031703
number = '0'
17041704
4.times do
1705-
i.read "images/Button_" + number + ".gif"
1706-
number.succ!
1707-
end
1705+
i.read "images/Button_" + number + ".gif"
1706+
number.succ!
1707+
end
17081708
</pre
17091709
>
17101710

image1.html

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />
66

7-
<title>RMagick 6.0.0: class Image (class methods and instance methods a-d)</title>
7+
<title>RMagick 6.0.1: class Image (class methods and instance methods a-d)</title>
88
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
99
<meta name="GENERATOR" content="Quanta Plus" />
1010
<meta name="Copyright" content="Copyright (C) 2006 by Timothy P. Hunter" />
@@ -39,7 +39,7 @@
3939
</head>
4040

4141
<body>
42-
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
42+
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>
4343

4444
<div class="nav">&laquo;&nbsp;<a href="imageattrs.html">Prev</a> | <a href="index.html">Contents</a> | <a href="image2.html">Next</a>&nbsp;&raquo;</div>
4545

@@ -342,7 +342,7 @@ <h4>Returns</h4>
342342

343343
<h4>Example</h4>
344344
<pre>
345-
img = Image.capture { |options|
345+
img = Magick::Image.capture { |options|
346346
options.filename = "root"
347347
}
348348
</pre
@@ -446,7 +446,7 @@ <h4>Returns</h4>
446446

447447
<h4>Example</h4>
448448
<pre>
449-
image = Image.constitute(width, height, "RGB", pixels)
449+
image = Magick::Image.constitute(width, height, "RGB", pixels)
450450
</pre
451451
>
452452

@@ -465,7 +465,7 @@ <h4>Magick API</h4>
465465
<div class="sig">
466466
<h3 id="from_blob">from_blob</h3>
467467

468-
<p>Image.from_blob(<span class="arg">string</span>) [ <span class="arg">{ optional arguments }</span> ] -&gt; <em>array</em></p>
468+
<p>Magick::Image.from_blob(<span class="arg">string</span>) [ <span class="arg">{ optional arguments }</span> ] -&gt; <em>array</em></p>
469469
</div>
470470

471471
<div class="desc">
@@ -536,7 +536,7 @@ <h4>Returns</h4>
536536

537537
<h4>Example</h4>
538538
<pre>
539-
img = Image.new(256, 64) { |options|
539+
img = Magick::Image.new(256, 64) { |options|
540540
options.background_color = 'red'
541541
}
542542
</pre
@@ -582,8 +582,7 @@ <h4>Returns</h4>
582582

583583
<h4>Example</h4>
584584
<pre>
585-
cheetah = Image.ping("Cheetah.jpg") &raquo;
586-
[Cheetah.jpg JPEG 1024x768 DirectClass 8-bit 101684b]
585+
cheetah = Magick::Image.ping("Cheetah.jpg") &raquo; [Cheetah.jpg JPEG 1024x768 DirectClass 8-bit 101684b]
587586
p cheetah[0].rows &raquo; 768
588587
p cheetah[0].columns &raquo; 1024
589588
</pre
@@ -634,10 +633,9 @@ <h4>Returns</h4>
634633

635634
<h4>Example</h4>
636635
<pre>
637-
animated = Image.read("animated.gif") &raquo;
638-
[animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
639-
animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
640-
animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
636+
animated = Magick::Image.read("animated.gif") &raquo; [animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
637+
&raquo; animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
638+
&raquo; animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
641639
</pre
642640
>
643641

@@ -687,7 +685,7 @@ <h4>Returns</h4>
687685
<h4>Example</h4>
688686
<pre>
689687
content = "R0lGODlhnAEuAferAAAAAAcIBggJBgw..."
690-
img = Image.read_inline(content)
688+
img = Magick::Image.read_inline(content)
691689
</pre
692690
>
693691

@@ -1348,7 +1346,7 @@ <h4>Returns</h4>
13481346

13491347
<h4>Example</h4>
13501348
<pre>
1351-
img.add_profile('my_cmyk.icm')
1349+
img.add_profile('my_cmyk.icm')
13521350
</pre
13531351
>
13541352

@@ -2165,10 +2163,10 @@ <h4>Returns</h4>
21652163

21662164
<h4>Example</h4>
21672165
<pre>
2168-
mona = Image.read('MonaLisa.jpg').first
2166+
mona = Magick::Image.read('MonaLisa.jpg').first
21692167
mona.change_geometry!('320x240') { |cols, rows, img|
2170-
img.resize!(cols, rows)
2171-
}
2168+
img.resize!(cols, rows)
2169+
}
21722170
</pre
21732171
>
21742172

@@ -3378,11 +3376,9 @@ <h4>Returns</h4>
33783376

33793377
<h4>Example</h4>
33803378
<pre>
3381-
f = Image.read('cbezier1.gif').first &raquo;
3382-
cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
3379+
f = Magick::Image.read('cbezier1.gif').first &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
33833380
f.colors &raquo; 128
3384-
f.compress_colormap! &raquo;
3385-
cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
3381+
f.compress_colormap! &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
33863382
f.colors &raquo; 108
33873383
</pre
33883384
>

0 commit comments

Comments
 (0)