uTools-Manuals/docs/java/javax/imageio/package-summary.html

255 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<h1 class="title" title="Package">Package javax.imageio</h1>
<div class="docSummary">
<div class="block">
Java Image I / O API的主要包。
</div>
</div>
<p>See: <a href="#package.description">描述</a></p>
</div><div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Interface Summary table, listing interfaces, and an explanation">
<caption>
<span>接口摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">接口</th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/IIOParamController.html" title="interface in javax.imageio">IIOParamController</a></td>
<td class="colLast">
<div class="block">
要由可以通过放置GUI从用户获取值或通过其他方式
<code>IIOParam</code>对象的设置的对象来实现的接口。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../javax/imageio/ImageTranscoder.html" title="interface in javax.imageio">ImageTranscoder</a></td>
<td class="colLast">
<div class="block">
提供元数据转码功能的界面。
</div> </td>
</tr>
</tbody>
</table> </li>
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Class Summary table, listing classes, and an explanation">
<caption>
<span>类摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col"></th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/IIOImage.html" title="class in javax.imageio">IIOImage</a></td>
<td class="colLast">
<div class="block">
用于聚合图像的简单容器类,一组缩略图(预览)图像,以及表示与该图像相关联的元数据的对象。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../javax/imageio/IIOParam.html" title="class in javax.imageio">IIOParam</a></td>
<td class="colLast">
<div class="block">
描述流如何解码或编码的所有类的超类。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/ImageIO.html" title="class in javax.imageio">ImageIO</a></td>
<td class="colLast">
<div class="block">
一个包含静态方便方法的类,用于定位
<code>ImageReader</code>
<code>ImageWriter</code> s并执行简单的编码和解码。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../javax/imageio/ImageReader.html" title="class in javax.imageio">ImageReader</a></td>
<td class="colLast">
<div class="block">
用于解析和解码图像的抽象超类。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/ImageReadParam.html" title="class in javax.imageio">ImageReadParam</a></td>
<td class="colLast">
<div class="block">
描述流如何解码的类。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../javax/imageio/ImageTypeSpecifier.html" title="class in javax.imageio">ImageTypeSpecifier</a></td>
<td class="colLast">
<div class="block">
允许以方便的方式指定图像的格式(特别是其
<code>SampleModel</code>
<code>ColorModel</code> )的类。
</div> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/ImageWriteParam.html" title="class in javax.imageio">ImageWriteParam</a></td>
<td class="colLast">
<div class="block">
描述流如何编码的类。
</div> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../javax/imageio/ImageWriter.html" title="class in javax.imageio">ImageWriter</a></td>
<td class="colLast">
<div class="block">
用于编码和写入图像的抽象超类。
</div> </td>
</tr>
</tbody>
</table> </li>
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" class="typeSummary" summary="Exception Summary table, listing exceptions, and an explanation">
<caption>
<span>异常摘要</span>
<span class="tabEnd"> </span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">异常</th>
<th class="colLast" scope="col">描述</th>
</tr>
</tbody>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../javax/imageio/IIOException.html" title="class in javax.imageio">IIOException</a></td>
<td class="colLast">
<div class="block">
用于发信号读取和写入操作失败的异常类。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul>
<a name="package.description">
<!-- --> </a>
<h2 title="Package javax.imageio Description">Package javax.imageio Description</h2>
<div class="block">
The main package of the Java Image I/O API.
<p> Many common image I/O operations may be performed using the static methods of the <code>ImageIO</code> class. </p>
<p> This package contains the basic classes and interfaces for describing the contents of image files, including metadata and thumbnails (<code>IIOImage</code>); for controlling the image reading process (<code>ImageReader</code>, <code>ImageReadParam</code>, and <code>ImageTypeSpecifier</code>) and image writing process (<code>ImageWriter</code> and <code>ImageWriteParam</code>); for performing transcoding between formats (<code>ImageTranscoder</code>), and for reporting errors (<code>IIOException</code>). </p>
<p> All implementations of javax.imageio provide the following standard image format plug-ins: </p>
<div>
<table align="center" border="1" cellpadding="5">
<tbody>
<tr>
<th> </th>
<th>Reading</th>
<th>Writing</th>
<th>Notes</th>
<th>Metadata</th>
</tr>
<!-- JPEG plugin -->
<tr>
<td> <a href="http://www.jpeg.org">JPEG</a></td>
<td align="center">yes</td>
<td align="center">yes</td>
<td align="center">none</td>
<td align="center"><a href="metadata/doc-files/jpeg_metadata.html"> JPEG metadata format</a></td>
</tr>
<!-- PNG plugin -->
<tr>
<td><a href="http://www.libpng.org/pub/png/spec/">PNG</a></td>
<td align="center">yes</td>
<td align="center">yes</td>
<td align="center">none</td>
<td align="center"><a href="metadata/doc-files/png_metadata.html"> PNG metadata format</a></td>
</tr>
<!-- BMP plugin -->
<tr>
<td>BMP</td>
<td align="center">yes</td>
<td align="center">yes</td>
<td align="center">none</td>
<td align="center"><a href="metadata/doc-files/bmp_metadata.html"> BMP metadata format</a></td>
</tr>
<!-- WBMP plugin -->
<tr>
<td><a href="http://www.wapforum.org/what/technical/SPEC-WAESpec-19990524.pdf">WBMP</a></td>
<td align="center">yes</td>
<td align="center">yes</td>
<td align="center">none</td>
<td align="center"><a href="metadata/doc-files/wbmp_metadata.html"> WBMP metadata format</a></td>
</tr>
<!-- GIF plugin -->
<tr>
<td><a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF</a></td>
<td align="center">yes</td>
<td align="center">yes</td>
<td align="center"><a href="#gif_plugin_notes"> GIF plug-in notes</a></td>
<td align="center"><a href="metadata/doc-files/gif_metadata.html"> GIF metadata format</a></td>
</tr>
</tbody>
</table>
</div>
<br/>
<br/>
<br/>
<h2> Standard Plug-in Notes</h2>
<h3><a name="gif_plugin_notes">Standard plug-in for GIF image format</a></h3>
<p> ImageIO provides <code>ImageReader</code> and <code>ImageWriter</code> plug-ins for the <a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">Graphics Interchange Format (GIF)</a> image format. These are the "standard" GIF plug-ins, meaning those that are included in the JRE, as distinct from those included in standard extensions, or 3rd party plug-ins. The following notes and metadata specification apply to the standard plug-ins. </p>
<h3>Writing GIF images</h3> The GIF image writer plug-in guarantees lossless writing for images which meet the following requirements:
<ul>
<li>the number of bands is 1; </li>
<li>the number of bits per sample is not greater than 8; </li>
<li>the size of a color component is not greater than 8; </li>
</ul>
<p></p>
<p> By default the GIF writer plug-in creates version "89a" images. This can be changed to "87a" by explicitly setting the version in the stream metadata (see <a href="metadata/doc-files/gif_metadata.html#gif_stream_metadata_format">GIF Stream Metadata Format Specification</a>). </p>
<!-- animated images -->
<p> The GIF writer plug-in supports the creation of animated GIF images through the standard sequence writing methods defined in the <code>ImageWriter</code> class.
<!-- TODO: add example here --> </p>
<!-- color tables -->
<p> A global color table is written to the output stream if one of the following conditions is met: </p>
<ul>
<li> stream metadata containing a GlobalColorTable element is supplied; </li>
<li> a sequence is being written and image metadata containing a LocalColorTable element is supplied for the first image in the sequence;</li>
<li>image metadata is not supplied or does not contain a LocalColorTable element. </li>
</ul>
<p> In the first case the global color table in the stream metadata is used, in the second the local color table in the image metadata is used, and in the third a global color table is created from the ColorModel or SampleModel of the (first) image. </p>
<p> A local color table is written to the output stream only if image metadata containing a LocalColorTable element is supplied to the writer, or no image metadata is supplied to the writer and the local color table which would be generated from the image itself is not equal to the global color table. </p>
<p> A Graphic Control Extension block is written to the output stream only if image metadata containing a GraphicControlExtension element is supplied to the writer, or no image metadata is supplied and the local color table generated from the image requires a transparent index. Application, Plain Text, and Comment Extension blocks are written only if they are supplied to the writer via image metadata. </p>
<!-- writing interlaced images -->
<p> The writing of interlaced images can be controlled by the progressive mode of the provided <code>ImageWriteParam</code> instance. If progressive mode is <code>MODE_DISABLED</code> then a non-interlaced image will be written. If progressive mode is <code>MODE_DEFAULT</code> then an interlaced image will be written. If progressive mode is <code>MODE_COPY_FROM_METADATA</code>, then the metadata setting is used (if it is provided, otherwise an interlaced image will be written). </p>
<p> The GIF image writer plug-in supports setting output stream metadata from metadata supplied to the writer in either the native GIF stream metadata format <a href="metadata/doc-files/gif_metadata.html#gif_stream_metadata_format">javax_imageio_gif_stream_1.0</a> or the standard metadata format <a href="metadata/doc-files/standard_metadata.html">javax_imageio_1.0</a>, and setting output image metadata from metadata supplied to the writer in either the native GIF image metadata format <a href="metadata/doc-files/gif_metadata.html#gif_image_metadata_format">javax_imageio_gif_image_1.0</a> or the standard metadata format <a href="metadata/doc-files/standard_metadata.html">javax_imageio_1.0</a>. The mapping of standard metadata format to the GIF native stream and image metadata formats is given in the tables <a href="metadata/doc-files/gif_metadata.html#mapping">here</a>. </p>
<!--
<HR>
Java<SUP><FONT SIZE="-2">TM</FONT></SUP> Image I/O API Specification
<BR>
<BR>
Public Draft 2 (specification version 0.5)
<BR>
Release: October 1, 2000
<BR>
<BR>
<HR>
-->
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.4
</dd>
</dl>
</div>