接口 | 描述 |
---|---|
IIOParamController |
要由可以通过放置GUI从用户获取值或通过其他方式
IIOParam 对象的设置的对象来实现的接口。
|
ImageTranscoder |
提供元数据转码功能的界面。
|
类 | 描述 |
---|---|
IIOImage |
用于聚合图像的简单容器类,一组缩略图(预览)图像,以及表示与该图像相关联的元数据的对象。
|
IIOParam |
描述流如何解码或编码的所有类的超类。
|
ImageIO |
一个包含静态方便方法的类,用于定位
ImageReader 和
ImageWriter s,并执行简单的编码和解码。
|
ImageReader |
用于解析和解码图像的抽象超类。
|
ImageReadParam |
描述流如何解码的类。
|
ImageTypeSpecifier |
允许以方便的方式指定图像的格式(特别是其
SampleModel 和
ColorModel )的类。
|
ImageWriteParam |
描述流如何编码的类。
|
ImageWriter |
用于编码和写入图像的抽象超类。
|
异常 | 描述 |
---|---|
IIOException |
用于发信号读取和写入操作失败的异常类。
|
Many common image I/O operations may be performed using the static methods of the ImageIO
class.
This package contains the basic classes and interfaces for describing the contents of image files, including metadata and thumbnails (IIOImage
); for controlling the image reading process (ImageReader
, ImageReadParam
, and ImageTypeSpecifier
) and image writing process (ImageWriter
and ImageWriteParam
); for performing transcoding between formats (ImageTranscoder
), and for reporting errors (IIOException
).
All implementations of javax.imageio provide the following standard image format plug-ins:
Reading | Writing | Notes | Metadata | |
---|---|---|---|---|
JPEG | yes | yes | none | JPEG metadata format |
PNG | yes | yes | none | PNG metadata format |
BMP | yes | yes | none | BMP metadata format |
WBMP | yes | yes | none | WBMP metadata format |
GIF | yes | yes | GIF plug-in notes | GIF metadata format |
ImageIO provides ImageReader
and ImageWriter
plug-ins for the Graphics Interchange Format (GIF) 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.
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 GIF Stream Metadata Format Specification).
The GIF writer plug-in supports the creation of animated GIF images through the standard sequence writing methods defined in the ImageWriter
class.
A global color table is written to the output stream if one of the following conditions is met:
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.
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.
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.
The writing of interlaced images can be controlled by the progressive mode of the provided ImageWriteParam
instance. If progressive mode is MODE_DISABLED
then a non-interlaced image will be written. If progressive mode is MODE_DEFAULT
then an interlaced image will be written. If progressive mode is MODE_COPY_FROM_METADATA
, then the metadata setting is used (if it is provided, otherwise an interlaced image will be written).
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 javax_imageio_gif_stream_1.0 or the standard metadata format javax_imageio_1.0, and setting output image metadata from metadata supplied to the writer in either the native GIF image metadata format javax_imageio_gif_image_1.0 or the standard metadata format javax_imageio_1.0. The mapping of standard metadata format to the GIF native stream and image metadata formats is given in the tables here.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.