Skip to content

Commit

Permalink
Update documents (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 authored Jun 18, 2024
1 parent 1fe1c62 commit f4125ca
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 121 deletions.
2 changes: 1 addition & 1 deletion comtasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h2>
<p>
Use <a href="image2.html#import_pixels">Image#import_pixels</a> to load pixel data from a string buffer into an image. The pixel data must be in scanline
order, right-to-left and top-to-bottom. The data can be packed as 8-bit bytes, 16-bit halfwords, 32-bit fullwords, or as C floats or doubles. The
reciprocal method is <a href="image3.html#export_pixels_to_str">Image#export_pixels_to_str</a>.
reciprocal method is <a href="image2.html#export_pixels_to_str">Image#export_pixels_to_str</a>.
</p>

<h2 id="gray">Converting a color image to grayscale</h2>
Expand Down
19 changes: 8 additions & 11 deletions constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ <h3 class="const" style="margin-top: 0" id="Miscellaneous_constants">Miscellaneo

<h3 class="const" id="AlignType">AlignType</h3>

<p>Specify text alignment. See <a href="draw.html#Draw.align_eq">align=</a>, <a href="draw.html#Draw.text_align">text_align</a>.</p>
<p>Specify text alignment. See <a href="draw.html#align_eq">align=</a>, <a href="draw.html#text_align">text_align</a>.</p>

<dl>
<dt>UndefinedAlign</dt>
Expand Down Expand Up @@ -324,7 +324,7 @@ <h3 class="const" id="ChannelType">ChannelType</h3>
Specify an image channel. A channel is a color component of a pixel. In the RGB colorspace the channels are red, green, and blue. There may also be an
alpha (transparency/opacity) channel. In the CMYK colorspace the channels area cyan, magenta, yellow, and black. In the HSL colorspace the channels are
hue, saturation, and lightness. In the Gray colorspace the only channel is gray. See
<a href="image1.html#channel">Image#channel</a> and <a href="info.html#channel">Image::Info#channel=</a>.
<a href="image1.html#channel">Image#channel</a> and <a href="info.html#channel">Image::Info#channel</a>.
</p>

<dl>
Expand Down Expand Up @@ -633,8 +633,8 @@ <h3 class="const" id="CompositeOperator">CompositeOperator</h3>

<dd>
If the composite image's
<a href="imageattrs.html#matte">matte</a> attribute is <code>true</code>, copy the opacity channel from the composite image to the target image.
Otherwise, set the target image pixel's opacity to the intensity of the corresponding pixel in the composite image.
<a href="image1.html#alpha_q">alpha?</a> is <code>true</code>, copy the opacity channel from the composite image to the target image. Otherwise, set the
target image pixel's opacity to the intensity of the corresponding pixel in the composite image.
</dd>

<dt>CopyCompositeOp</dt>
Expand Down Expand Up @@ -1007,7 +1007,7 @@ <h3 class="const" id="CompressionType">CompressionType</h3>
<h3 class="const" id="DecorationType">DecorationType</h3>

<p>
Use with the <a href="draw.html#decorate">decorate=</a> method in the Draw class to specify the text decoration for the
Use with the <a href="draw.html#decorate">decorate</a> method in the Draw class to specify the text decoration for the
<a href="draw.html#annotate">annotate</a> method.
</p>

Expand Down Expand Up @@ -1102,7 +1102,7 @@ <h3 class="const" id="DistortMethod">DistortMethod</h3>
<h3 class="const" id="DitherMethod">DitherMethod</h3>

<p>
Specify the method of dithering for <a href="image1.html#remap">remap</a>, <a href="image3.html#quantize">quantize</a>,
Specify the method of dithering for <a href="image3.html#remap">remap</a>, <a href="image3.html#quantize">quantize</a>,
<a href="image3.html#posterize">posterize</a>, etc.
</p>

Expand Down Expand Up @@ -1326,7 +1326,7 @@ <h3 class="const" id="ImageType">ImageType</h3>
<p>
Indicate
<span class="imquote">the type classification of the image.</span> See <a href="imageattrs.html#image_type">image_type</a> and
<a href="info.html#image_type_eq">image_type=</a>.
<a href="info.html#image_type">image_type=</a>.
</p>

<dl>
Expand Down Expand Up @@ -1518,10 +1518,7 @@ <h3 class="const" id="MagickFunction">MagickFunction</h3>
<dt>ArctanFunction</dt>
</dl>

<p>
For FilterInterpolatePixel, specify the filter with the
<a href="imageattrs.html#filter">filter</a> attribute. Specify the sharpness with the <a href="imageattrs.html#blur">blur</a> attribute.
</p>
<p>For FilterInterpolatePixel, specify the filter with the <a href="imageattrs.html#filter">filter</a> attribute.</p>

<h3 class="const" id="MetricType">MetricType</h3>

Expand Down
4 changes: 2 additions & 2 deletions draw.html
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ <h4>Description</h4>
<p>
Define a clip-path. Within <span class="arg">block</span>, call other drawing primitive methods (<code>rectangle</code>, <code>polygon</code>,
<code>text</code>, etc.) to define the clip-path. The union of all the primitives (excluding the effects of rendering methods such as
<code>stroke_width</code>, etc.) is the clip-path. After the clip-path is invoked by the <a href="#clip_path">clip-path</a> method, anything drawn on
<code>stroke_width</code>, etc.) is the clip-path. After the clip-path is invoked by the <a href="#clip_path">clip_path</a> method, anything drawn on
the image inside the clip-path will appear. Anything drawn outside the clip-path will be hidden. (See <a href="#clip_rule">clip_rule</a> for a
definition of how ImageMagick decides what is "inside" and what is "outside" of the clip-path.)
</p>
Expand Down Expand Up @@ -1869,7 +1869,7 @@ <h4>Returns</h4>
<p>self</p>

<h4>See also</h4>
<a href="#color">color</a><a href="image2.html#matte_point">matte_point</a>, <a href="image2.html#matte_replace">matte_replace</a>,
<a href="#color">color</a>, <a href="image2.html#matte_point">matte_point</a>, <a href="image2.html#matte_replace">matte_replace</a>,
<a href="image2.html#matte_floodfill">matte_floodfill</a>, <a href="image2.html#matte_fill_to_border">matte_fill_to_border</a>,
<a href="image2.html#opaque">opaque</a>,
<a href="image3.html#transparent">transparent</a>
Expand Down
8 changes: 4 additions & 4 deletions ilist.html
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ <h4>Montage attributes</h4>

<dt>gravity=</dt>

<dd>The <a href="constants.html#GravityType">direction</a> used when adding the tile labels. (See <a href="draw.html#Draw.annotate">annotate</a>.)</dd>
<dd>The <a href="constants.html#GravityType">direction</a> used when adding the tile labels. (See <a href="draw.html#annotate">Draw#annotate</a>.)</dd>

<dt>matte_color=</dt>

Expand Down Expand Up @@ -1270,7 +1270,7 @@ <h4>Example</h4>

<h4>See also</h4>
<a href="#coalesce">coalesce</a>, <a href="#flatten_images">flatten_images</a>, <a href="#montage">montage</a>,
<a href="#optimize_images">optimize_images</a>
<a href="#optimize_layers">optimize_layers</a>

<h4>Magick API</h4>

Expand Down Expand Up @@ -1304,8 +1304,8 @@ <h4>Arguments</h4>

<p>
You can set any <a href="info.html">Image::Info</a> attributes in an associated block. These attributes supply options to be used when creating the
image. For example, you can specify the <a href="imageattrs.html#background_color">background color</a> to fill the image with (see the example), the
<a href="imageattrs.html#depth">depth</a>, <a href="imageattrs.html#border_color">border color</a>, etc.
image. For example, you can specify the <a href="imageattrs.html#background_color">background_color</a> to fill the image with (see the example), the
<a href="imageattrs.html#depth">depth</a>, <a href="imageattrs.html#border_color">border_color</a>, etc.
</p>

<h4>Returns</h4>
Expand Down
38 changes: 12 additions & 26 deletions image1.html
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ <h4>Arguments</h4>
<dd>
You can specify any of these Image::Info attributes in the
<em>optional arguments</em> block: <a href="info.html#colorspace">colorspace</a>, <a href="info.html#depth">depth</a>,
<a href="info.html#dither">dither</a>, <a href="info.html#interlace">interlace</a>, and <a href="info.html#type">type</a>.
<a href="info.html#dither">dither</a>, <a href="info.html#interlace">interlace</a>, and <a href="info.html#image_type">image_type</a>.
</dd>
</dl>

Expand Down Expand Up @@ -457,10 +457,7 @@ <h4>Example</h4>

<h4>See also</h4>

<p>
<a href="image2.html#import_pixels"><code>import_pixels</code></a
>, <a href="image3.html#store_pixels"><code>store_pixels</code></a>
</p>
<p><a href="image2.html#import_pixels">import_pixels</a>, <a href="image3.html#store_pixels">store_pixels</a></p>

<h4>Magick API</h4>

Expand Down Expand Up @@ -492,10 +489,7 @@ <h4>Returns</h4>

<h4>Example</h4>

<p>
See <a href="image3.html#to_blob"><code>to_blob</code></a
>.
</p>
<p>See <a href="image3.html#to_blob">to_blob</a>.</p>

<h4>Magick API</h4>

Expand Down Expand Up @@ -530,9 +524,7 @@ <h4>Arguments</h4>

<dt>fill</dt>

<dd>
A <a href="struct.html#fill"><code>Fill</code></a> object
</dd>
<dd>A <a href="struct.html#fill">Fill</a> object</dd>
</dl>

<h4>Returns</h4>
Expand All @@ -551,7 +543,7 @@ <h4>Example</h4>
<h4>See also</h4>

<p>
<a href="ilist.html#new_image"><code>ImageList.new_image</code></a>
<a href="ilist.html#new_image">ImageList.new_image</a>
</p>

<h4>Magick API</h4>
Expand All @@ -573,7 +565,7 @@ <h4>Description</h4>

<p>
Creates one or more images from the image file, omitting the pixel data. Only the attributes are stored in the images. This method is faster than
<code><a href="#read">read</a></code> and uses less memory.
<a href="#read">read</a> and uses less memory.
</p>

<h4>Arguments</h4>
Expand All @@ -598,7 +590,7 @@ <h4>Example</h4>
<h4>See also</h4>

<p>
<a href="#read"><code>read</code></a>
<a href="#read">read</a>
</p>

<h4>Magick API</h4>
Expand Down Expand Up @@ -651,7 +643,7 @@ <h4>Example</h4>
<h4>See also</h4>

<p>
<a href="#ping"><code>ping</code></a>
<a href="#ping">ping</a>
</p>

<h4>Note</h4>
Expand Down Expand Up @@ -702,7 +694,7 @@ <h4>Example</h4>
<h4>See also</h4>

<p>
<a href="#read"><code>read</code></a>
<a href="#read">read</a>
</p>
</div>

Expand Down Expand Up @@ -740,10 +732,7 @@ <h4>Example</h4>

<h4>See also</h4>

<p>
<a href="#aset"><code>[ ]=</code></a
>, <a href="image3.html#properties"><code>properties</code></a>
</p>
<p><a href="#aset">[ ]=</a>, <a href="image3.html#properties">properties</a></p>

<h4>Magick API</h4>

Expand Down Expand Up @@ -779,10 +768,7 @@ <h4>Example</h4>

<h4>See also</h4>

<p>
<a href="#aref">[<code>&nbsp;]</code></a
>, <a href="image3.html#properties"><code>properties</code></a>
</p>
<p><a href="#aref">[ ]</a>, <a href="image3.html#properties">properties</a></p>

<h4>Magick API</h4>

Expand Down Expand Up @@ -3360,7 +3346,7 @@ <h4>Magick API</h4>
</div>

<div class="sig">
<h3 id="compress_colormap">compress_colormap</h3>
<h3 id="compress_colormap_bang">compress_colormap!</h3>

<p><span class="arg">img</span>.compress_colormap! -&gt; <em>self</em></p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions image2.html
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ <h4>Description</h4>

<p>
Sets the entire image to the
<a href="imageattrs.html#background_color">background color</a>.
<a href="imageattrs.html#background_color">background_color</a>.
</p>

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

<h4>See also</h4>

<p><a href="imageattrs.html#opacity">opacity=</a></p>
<p><a href="image1.html#alpha">alpha</a></p>

<h4>Magick API</h4>
SetImageOpacity
Expand Down
22 changes: 9 additions & 13 deletions image3.html
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ <h4>See also</h4>
<p><a href="image2.html#function_channel">function_channel</a></p>

<p>
The <a href="struct.html#view">Image:View</a> class supports operations on individual pixels and collections of pixels, as well as operations on
The <a href="struct.html#view">Image::View</a> class supports operations on individual pixels and collections of pixels, as well as operations on
channels within pixels. See <a href="#view">view</a>, below.
</p>

Expand Down Expand Up @@ -1282,7 +1282,7 @@ <h3 id="resize">resize</h3>

<p>
<span class="arg">img</span>.resize(<span class="arg">new_width</span>, <span class="arg">new_height</span>, <em>filter</em>=<a
href="constants.html#FilterTypes"
href="constants.html#FilterType"
>LanczosFilter</a
>, <em>support</em>=1.0) -&gt; <em>image</em><br />
<span class="arg">img</span>.resize(<span class="arg">scale_factor</span>) -&gt; <em>image</em>
Expand Down Expand Up @@ -1313,7 +1313,7 @@ <h4>Arguments</h4>
<dt>filter</dt>

<dd>
The <a href="constants.html#FilterTypes">filter</a> to use when resizing. If you do not specify a filter argument, resize uses the value of the
The <a href="constants.html#FilterType">filter</a> to use when resizing. If you do not specify a filter argument, resize uses the value of the
receiver's <a href="imageattrs.html#filter">filter attribute</a>.
<span class="imquote"
>Most of the filters are FIR (finite impulse response), however, Bessel, Gaussian, and Sinc are IIR (infinite impulse response). Bessel and Sinc are
Expand All @@ -1323,10 +1323,7 @@ <h4>Arguments</h4>

<dt>support</dt>

<dd>
Values &gt; 1 increase the blurriness. Values &lt; 1 increase the sharpness. If this argument is not specified, <code>resize</code> uses the value of
the receiver's <a href="imageattrs.html#blur">blur</a> attribute.
</dd>
<dd>Values &gt; 1 increase the blurriness. Values &lt; 1 increase the sharpness.</dd>

<dt>scale_factor</dt>

Expand Down Expand Up @@ -1356,7 +1353,7 @@ <h4>Magick API</h4>
<h3 id="resize_bang">resize!</h3>

<p>
<span class="arg">img</span>.resize!(<em>new_width</em>, <em>new_height</em>, <em>filter</em>=<a href="constants.html#FilterTypes">LanczosFilter</a>,
<span class="arg">img</span>.resize!(<em>new_width</em>, <em>new_height</em>, <em>filter</em>=<a href="constants.html#FilterType">LanczosFilter</a>,
<em>support</em>=1.0) -&gt; <em>self</em><br />
<span class="arg">img</span>.resize!(<span class="arg">scale_factor</span>) -&gt; <em>self</em>
</p>
Expand Down Expand Up @@ -1632,7 +1629,7 @@ <h4>Description</h4>
<p>
Rotate the receiver by the specified angle. Positive angles rotate clockwise while negative angles rotate counter-clockwise. New pixels introduced by
the rotation are the same color as the current
<a href="imageattrs.html#background_color">background color</a>. Set the background color to "none" to make the new pixels transparent black.
<a href="imageattrs.html#background_color">background_color</a>. Set the background color to "none" to make the new pixels transparent black.
</p>

<h4>Arguments</h4>
Expand Down Expand Up @@ -2080,7 +2077,7 @@ <h4>Arguments</h4>

<dd>
The desired depth (must be no greater than
<a href="constants.html">QuantumDepth</a>)
<a href="constants.html#Miscellaneous_constants">QuantumDepth</a>)
</dd>
</dl>

Expand Down Expand Up @@ -3368,8 +3365,7 @@ <h4>Description</h4>

<p>
Returns the color name for a pixel. Unlike the
<code>Pixel#to_color</code> method, to_color uses the <a href="imageattrs.html#depth">depth</a> and <a href="imageattrs.html#matte">matte</a> attributes
of the image to determine the color name.
<code>Pixel#to_color</code> method, to_color uses the <a href="imageattrs.html#depth">depth</a> attribute of the image to determine the color name.
</p>

<h4>Arguments</h4>
Expand Down Expand Up @@ -4330,7 +4326,7 @@ <h4>Description</h4>

<p>
If the argument is an open file, ImageMagick will write the image in its current format. You can force a different format by setting the image's
<a href="imageattrs.html#Image.format">format</a> attribute.
<a href="imageattrs.html#format">format</a> attribute.
</p>

<h4>Arguments</h4>
Expand Down
6 changes: 3 additions & 3 deletions imusage.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ <h2 id="color_names">Color names</h2>
A <code>Pixel</code> object contains the numeric representation of a color. The <a href="struct.html#Pixel.from_color">Pixel.from_color</a> method
converts a color name to a pixel. There are two methods to convert a pixel to a color name. The
<a href="struct.html#Pixel.to_color">Pixel#to_color</a> method requires that you specify whether the alpha (opacity) channel is used, the depth (8 or 16)
and the color standard to use. The <a href="image3.html#to_color">Image#to_color</a> method uses the image's depth and
<a href="imageattrs.html#matte">matte</a> attributes. If <code>matte</code> is false the opacity value is ignored.
and the color standard to use. The <a href="image3.html#to_color">Image#to_color</a> method uses the image's
<a href="imageattrs.html#depth">depth</a> attribute and <a href="image1.html#alpha">alpha</a> method.
</p>

<p><em>Hint:</em> You can specify the transparent color as "none", "transparent", "#00000000", or rgba(0, 0, 0, 0.0).</p>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h2 id="classtype">DirectClass and PseudoClass</h2>

<p>
GIF format images are PseudoClass. JPEG format images are DirectClass. You can change the class of a image with the
<code><a href="imageattrs.html#class_type_eq">class_type=</a></code>
<code><a href="imageattrs.html#class_type">class_type</a></code>
method.
</p>

Expand Down
Loading

0 comments on commit f4125ca

Please sign in to comment.