Skip to content

Commit

Permalink
Update document (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 authored May 16, 2024
1 parent 3b47651 commit d501816
Show file tree
Hide file tree
Showing 27 changed files with 352 additions and 372 deletions.
55 changes: 27 additions & 28 deletions comtasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />

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

<body>
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>

<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>

Expand Down Expand Up @@ -64,30 +64,29 @@ <h2 id="info">Getting information about an image</h2>
</p>
<pre class="example">
require "rmagick"
ARGV.each { |file|
puts file
img = Magick::Image::read(file).first
puts " Format: #{img.format}"
puts " Geometry: #{img.columns}x#{img.rows}"
puts " Class: " + case img.class_type
when Magick::DirectClass
"DirectClass"
when Magick::PseudoClass
"PseudoClass"
end
puts " Depth: #{img.depth} bits-per-pixel"
puts " Colors: #{img.number_colors}"
puts " Filesize: #{img.filesize}"
puts " Resolution: #{img.x_resolution.to_i}x#{img.y_resolution.to_i} "+
"pixels/#{img.units == Magick::PixelsPerInchResolution ?
"inch" : "centimeter"}"
if img.properties.length &gt; 0
puts " Properties:"
img.properties { |name,value|
puts %Q| #{name} = "#{value}"|
}
end
}
ARGV.each do |file|
puts file
img = Magick::Image.read(file).first
puts " Format: #{img.format}"
puts " Geometry: #{img.columns}x#{img.rows}"
puts " Class: " + case img.class_type
when Magick::DirectClass
"DirectClass"
when Magick::PseudoClass
"PseudoClass"
end
puts " Depth: #{img.depth} bits-per-pixel"
puts " Colors: #{img.number_colors}"
puts " Filesize: #{img.filesize}"
puts " Resolution: #{img.x_resolution.to_i}x#{img.y_resolution.to_i} " +
"pixels/#{img.units == Magick::PixelsPerInchResolution ? 'inch' : 'centimeter'}"
next if img.properties.length &lt;= 0

puts " Properties:"
img.properties do |name, value|
puts %( #{name} = "#{value}")
end
end
</pre
>

Expand All @@ -109,7 +108,7 @@ <h2 id="thumb">Making thumbnails</h2>
>. All four are equally easy to use. Specify the number of columns and rows you want the thumbnail to have, like this:
</p>
<pre class="example">
img = Image.new "bigimage.gif"
img = Magick::Image.new "bigimage.gif"
thumb = img.scale(125, 125)
thumb.write "thumb.gif"
</pre
Expand All @@ -120,7 +119,7 @@ <h2 id="thumb">Making thumbnails</h2>
image to 25% of its original size, do this:
</p>
<pre class="example">
img = Image.new "bigimage.gif"
img = Magick::Image.new "bigimage.gif"
thumb = img.scale(0.25)
thumb.write "thumb.gif"
</pre
Expand Down
6 changes: 3 additions & 3 deletions constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />

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

<body>
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>

<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>

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

<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>
<pre class="example">
ruby -rRMagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
ruby -r rmagick -e"Magick::ColorspaceType.values {|cs| puts cs}"
</pre
>

Expand Down
18 changes: 9 additions & 9 deletions draw.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />

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

<body>
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>

<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>

Expand Down Expand Up @@ -291,7 +291,7 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
gc = Draw.new
gc = Magick::Draw.new
</pre
>
</div>
Expand Down Expand Up @@ -364,12 +364,12 @@ <h4>Example</h4>
</p>
<pre>
title.annotate(montage, 0,0,0,40, 'Named Colors') { |options|
options.font_family = 'Helvetica'
options.fill = 'white'
options.stroke = 'transparent'
options.pointsize = 32
options.font_weight = BoldWeight
options.gravity = NorthGravity
options.font_family = 'Helvetica'
options.fill = 'white'
options.stroke = 'transparent'
options.pointsize = 32
options.font_weight = BoldWeight
options.gravity = NorthGravity
}
</pre
>
Expand Down
10 changes: 5 additions & 5 deletions ilist.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org" />

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

<body>
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>

<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>

Expand Down Expand Up @@ -1702,9 +1702,9 @@ <h4>Example</h4>
i = Magick::ImageList.new
number = '0'
4.times do
i.read "images/Button_" + number + ".gif"
number.succ!
end
i.read "images/Button_" + number + ".gif"
number.succ!
end
</pre
>

Expand Down
38 changes: 17 additions & 21 deletions image1.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<head>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org" />

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

<body>
<h6 id="header">RMagick 6.0.0 User's Guide and Reference</h6>
<h6 id="header">RMagick 6.0.1 User's Guide and Reference</h6>

<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>

Expand Down Expand Up @@ -342,7 +342,7 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
img = Image.capture { |options|
img = Magick::Image.capture { |options|
options.filename = "root"
}
</pre
Expand Down Expand Up @@ -446,7 +446,7 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
image = Image.constitute(width, height, "RGB", pixels)
image = Magick::Image.constitute(width, height, "RGB", pixels)
</pre
>

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

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

<div class="desc">
Expand Down Expand Up @@ -536,7 +536,7 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
img = Image.new(256, 64) { |options|
img = Magick::Image.new(256, 64) { |options|
options.background_color = 'red'
}
</pre
Expand Down Expand Up @@ -582,8 +582,7 @@ <h4>Returns</h4>

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

<h4>Example</h4>
<pre>
animated = Image.read("animated.gif") &raquo;
[animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
animated = Magick::Image.read("animated.gif") &raquo; [animated.gif GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b
&raquo; animated.gif[1] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b,
&raquo; animated.gif[2] GIF 127x120+0+0 PseudoClass 256c 8-bit 54395b]
</pre
>

Expand Down Expand Up @@ -687,7 +685,7 @@ <h4>Returns</h4>
<h4>Example</h4>
<pre>
content = "R0lGODlhnAEuAferAAAAAAcIBggJBgw..."
img = Image.read_inline(content)
img = Magick::Image.read_inline(content)
</pre
>

Expand Down Expand Up @@ -1348,7 +1346,7 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
img.add_profile('my_cmyk.icm')
img.add_profile('my_cmyk.icm')
</pre
>

Expand Down Expand Up @@ -2165,10 +2163,10 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
mona = Image.read('MonaLisa.jpg').first
mona = Magick::Image.read('MonaLisa.jpg').first
mona.change_geometry!('320x240') { |cols, rows, img|
img.resize!(cols, rows)
}
img.resize!(cols, rows)
}
</pre
>

Expand Down Expand Up @@ -3378,11 +3376,9 @@ <h4>Returns</h4>

<h4>Example</h4>
<pre>
f = Image.read('cbezier1.gif').first &raquo;
cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
f = Magick::Image.read('cbezier1.gif').first &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 128c 8-bit 177503b
f.colors &raquo; 128
f.compress_colormap! &raquo;
cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
f.compress_colormap! &raquo; cbezier1.gif GIF 500x350+0+0 PseudoClass 108c 8-bit 177503b
f.colors &raquo; 108
</pre
>
Expand Down
Loading

0 comments on commit d501816

Please sign in to comment.