JavaTM Advanced Imaging Image I/O Tools provides JAI read and write operations which use the Java Image I/O Framework, image input and output streams which use the New I/O APIs, and image reader and writer plug-ins.

See:
          Description

Packages
com.sun.media.imageio.plugins.bmp Package containing the public classes used by the Sun BMP plug-in for the Image I/O Framework.
com.sun.media.imageio.plugins.jpeg2000 Package containing the public classes used by the Sun JPEG 2000 plug-in for the Image I/O Framework.
com.sun.media.imageio.plugins.pnm Package containing the public classes used by the Sun PNM plug-in for the Image I/O Framework.
com.sun.media.imageio.plugins.tiff Package containing the public classes used by the Sun TIFF plug-in for the Image I/O Framework.
com.sun.media.imageio.stream Provides ImageInputStream and ImageOutputStream classes for use with the Java Image I/O Framework.
com.sun.media.jai.operator Provides JAI operations which read and write images using the Java Image I/O Framework.

 

JavaTM Advanced Imaging Image I/O Tools provides JAI read and write operations which use the Java Image I/O Framework, image input and output streams which use the New I/O APIs, and image reader and writer plug-ins.

JAI Image I/O Operations

JAI operations which read and write images using the Java Image I/O Framework are provided in the package com.sun.media.jai.operator.

Java Image I/O Streams

Image I/O stream classes based on the new java.nio I/O APIs, for use with the "raw" format image reader plug-in, and for reading discontiguous image data are provided in the package com.sun.media.imageio.stream.

Java Image I/O Reader and Writer Plug-ins

Several reader and writer plug-ins for use with the Java Image I/O Framework are provided. A summary of their optional capabilities and metadata support is given in the following table where F denotes false, T indicates true, and U is a variable which is true if and only if the image data are uncompressed. Capabilities not listed may be assumed to revert to the respective defaults for reading and writing.

Reader/Writer Plug-in Capability Summary
Capability BMP JPEG JPEG 2000 PNG PNM Raw TIFF WBMP
ImageReader.canReadRaster() T F T F T T F T
ImageReader.isRandomAccessEasy(int) U F F F T T U T
ImageWriter.canInsertImage(int) F F F F F F T F
ImageWriteParam.canWriteCompressed() T T T T F F T F
ImageWriteParam.canWriteProgressive() F F T T F F F F
ImageWriteParam.canWriteTiles() F F T F F T T F
ImageWriter.canReplacePixels(int) F F F F F F T F
ImageWriter.canWriteRasters() T F T F T T F T
ImageWriter.canWriteSequence() F F F F F F T F
Stream Metadata F F F F F F T F
Standard Image Metadata T F T F T F T F
Native Image Metadata T F T F T F T F

BMP

ImageReader and ImageWriter plug-ins are provided for the Bitmap (BMP) format. A summary of the attributes of these plug-ins is given in the following table with more details in the description of the package com.sun.media.imageio.plugins.bmp.

BMP Reader/Writer Plug-in Attributes
Attribute Value
Format Name bmp
MIME Type image/bmp
Suffix bmp
Native Image Metadata com_sun_media_imageio_plugins_bmp_image_1.0
ImageWriteParam BMPImageWriteParam
References No formal, well-defined specification exists

JPEG

ImageReader and ImageWriter plug-ins are provided for the JPEG image format. These plug-ins are accelerated using native code. If security permission settings disallow loading native code, the service provider will deregister itself and the plug-ins will not be available.

In addition to providing better performance through native acceleration for conventional (lossy) JPEG (baseline sequential DCT, 8-bit sample precision), these plug-ins also support the following additional JPEG coding processes from ISO-10918-1/ITU-T.81:

as well as the following JPEG coding process from ISO-14495-1/ITU-T.87: Decoding of 13- to 16-bit images is in fact supported but the encoding bit depth is limited to 12 bits.

All subsampling and sub-banding is performed in memory, however, so if either is required, use of the core JPEG plug-in might be preferable. This plug-in performs best when the data are pixel interleaved with pixel stride equal to the number of samples per pixel and color component order G (grayscale), GA (grayscale with alpha), RGB (red-green-blue), or RGBA (red-green-blue with alpha) as appropriate for the color space. Other layouts will cause data to be reformatted in memory.

JPEG Reader/Writer Plug-in Attributes
Attribute Value
Format Names jpeg, jpg, jpeg-lossless (ISO 10918-1 lossless), jpeg-ls (ISO 14495-1 lossless), jfif
MIME Type image/jpeg
Suffixes jpeg, jpg, jls (ISO 14495-1 lossless), jfif
ImageWriteParam ImageWriteParam subclass
References JPEG Home Page

JPEG ImageWriteParam Subclass Attributes
Attribute Value
Compression Types "JPEG" (conventional, lossy JPEG), "JPEG-LOSSLESS" (ISO-10918-1 lossless), "JPEG-LS" (ISO-14495-1 lossless)
Compression Modes ImageWriteParam.MODE_DEFAULT (lossy), ImageWriteParam.MODE_EXPLICIT
ImageWriteParam.isCompressionLossless() true if and only if compressionType is not "JPEG"

JPEG 2000

ImageReader and ImageWriter plug-ins are provided for the JPEG 2000 image format. A summary of the attributes of these plug-ins is given in the following table with more details in the description of the package com.sun.media.imageio.plugins.jpeg2000.

JPEG 2000 Reader/Writer Plug-in Attributes
Attribute Value
Format Names jpeg2000, jpeg 2000
MIME Type image/jpeg2000
Suffix jp2
Native Image Metadata com_sun_media_imageio_plugins_jpeg2000_image_1.0
ImageReadParam J2KImageReadParam
ImageWriteParam J2KImageWriteParam
References JPEG 2000 Links

PNG

ImageReader and ImageWriter plug-ins are provided for the Portable Network Graphics (PNG) image format. These plug-ins are accelerated using native code. If security permission settings disallow loading native code, the service provider will deregister itself and the plug-ins will not be available.

In addition to providing better performance through native acceleration, these plug-ins also provide the ability to set the compression level and encoder strategy. All subsampling and sub-banding is performed in memory, however, so if either of these is required, use of the core PNG plug-in might be preferable. This plug-in performs best when the data are pixel interleaved with pixel stride equal to the number of samples per pixel and color component order G (grayscale), GA (grayscale with alpha), RGB (red-green-blue), or RGBA (red-green-blue with alpha) as appropriate for the color space. Other layouts will cause data to be reformatted in memory. Currently only bit depths of 1, 8, and 16 are supported.

PNG Reader/Writer Plug-in Attributes
Attribute Value
Format Name png
MIME Type image/png
Suffix png
ImageWriteParam ImageWriteParam subclass
References W3C PNG Page

PNG ImageWriteParam Subclass Attributes
Attribute Value
Compression Types "DEFAULT", "FILTERED", "HUFFMAN_ONLY"
Compression Modes ImageWriteParam.MODE_DEFAULT, ImageWriteParam.MODE_EXPLICIT
Compression Quality Sets compression level as compressionLevel = (int)(9*compressionQuality)
Progressive Modes ImageWriteParam.MODE_DEFAULT ("Adam7" interlacing), ImageWriteParam.MODE_DISABLED ("default" interlacing)
(MODE_DISABLED is initial setting)

PNM

ImageReader and ImageWriter plug-ins are provided for the "portable anymap" (PNM) image format which refers collectively to the formats PBM (portable bitmap), PGM (portable graymap), and PPM (portable pixmap). A summary of the attributes of these plug-ins is given in the following table with more details in the description of the package com.sun.media.imageio.plugins.pnm.

PNM Reader/Writer Plug-in Attributes
Attribute Value
Format Name pnm
MIME Types image/x-portable-anymap, image/x-portable-bitmap image/x-portable-graymap,image/x-portable-pixmap
Suffixes pbm, pgm, ppm
Native Image Metadata com_sun_media_imageio_plugins_pnm_image_1.0
ImageWriteParam PNMImageWriteParam
References The Netpbm Formats
, Manpage of pbm
, Manpage of pgm
, Manpage of ppm

Raw

ImageReader and ImageWriter plug-ins are provided for the "raw" image format. The ImageReader plug-in for the "raw" format requires an input which is a RawImageInputStream.

The reader plug-in reads any uncompressed data defined by ComponentSampleModel, SinglePixelPackedSampleModel or bilevel MultiPixelPackedSampleModel as viewed via the ImageInputStream. For example, if extra data are prepended or appended to image lines, SegmentedImageInputStream may be used to define the location of the image data for each line. Thus, if the data viewed from RawImageInputStream are defined by the SampleModels above after RawImageInputStream is chained with SegmentedImageInputStream, the reader plug-in can decode these data correctly.

The writer plug-in writes the data to the stream exactly as defined by the SampleModel. If the SampleModel has a scanline stride associated with it, this will be used to determine the length of each line written. If only the actual image data and not any prefix or suffix data on the line are to be written and the scanline stride is greater than the SampleModel width multiplied by the number of bands, the image should first be reformatted to remove the extra data. If JAI is available the "Format" operation may be used for reformatting the data.

Raw Reader/Writer Plug-in Attributes
Attribute Value
Format Name raw
MIME Type none
Suffix none
ImageWriteParam ImageWriteParam subclass
References XML InputSource defined at RawImageInputStream.RawImageInputStream(javax.imageio.stream.ImageInputStream,org.xml.sax.InputSource)

Raw ImageWriteParam Subclass Attributes
Attribute Value
Tiling Modes ImageWriteParam.MODE_DEFAULT

TIFF

ImageReader and ImageWriter plug-ins are provided for the Tag(ged) Image File Format (TIFF). A summary of the attributes of these plug-ins is given in the following table with more details in the description of the package com.sun.media.imageio.plugins.tiff.

TIFF Reader/Writer Plug-in Attributes
Attribute Value
Format Names tif, tiff
MIME Type image/tiff
Suffixes tif, tiff
Native Stream Metadata com_sun_media_imageio_plugins_tiff_stream_1.0
Native Image Metadata com_sun_media_imageio_plugins_tiff_image_1.0
ImageReadParam TIFFImageReadParam
ImageWriteParam TIFFImageWriteParam
References TIFF Specification, revision 6.0 (PDF)
The Unofficial TIFF Home Page
TIFF Software (libtiff)
TIFF-F Revised Specification
JPEG-in-TIFF compression
DEFLATE specification (Zip-in-TIFF)
EXIF and related resources

WBMP

ImageReader and ImageWriter plug-ins are provided for the Wireless Bitmap (WBMP) image format. A summary of the attributes of these plug-ins is given in the following table.

WBMP Reader/Writer Plug-in Attributes
Attribute Value
Format Name wbmp
MIME Type image/vnd.wap.wbmp
Suffix wbmp
References WAP Media Types Specification available from WAP Forum Specifications

Since:
1.0