|
Advanced Imaging API Sample Image File Readers and Writers Source Code Readme
Contents
The com.sun.media.jai.codec
package is not a committed part of the Java Advanced Imaging (JAI) API. These classes continue to
be considered provisional and exist only as helper classes for
the JAI implementation. These classes will be superseded in a
future Java Advanced Imaging release by the new
Java Image I/O API which will be part of the 1.4
version of the Java 2 platform.
To help developers in making the transition
from these helper classes to the upcoming Image I/O package, Sun
has decided to release the source code to the helper classes in
the com.sun.media.jai.codec package. This package contains
the classes that are necessary for the API definition. A concomitant
package that contains the implementation for individual file formats
is the com.sun.media.jai.codecimpl package. The source code
to this package will also be released.
You, as a developer, may feel free to download
this source code, compile and use it in your products free of
charge. You may also extend it with your own code and use it in
any way you wish, which does not violate the license that you are
asked to accept. The license is a very open one, designed to
allow as much freedom and flexibility as typical "open
source" type products allow.
This source code is provided "as is"
and is not supported.
Some known bugs exist - see the BUGS
file for details.
System Requirements:
- For Solaris operating environment:
- Solaris operating environment 2.5.1 or subsequent compatible version
- Java 2 platform, Standard Edition
- Java 2 SDK Reference Implementation, v. 1.2 or later
- Java 2 SDK Solaris Production Release, v. 1.2.1_04 or later
- At least 1 MB of free disk space.
For Microsoft Windows:
- Windows NT 4.0 or Windows 95 or
later
- Java 2 platform, FCS version (Java 2 SDK, Standard Edition (J2SE SDK) 1.2 FCS) or later
- At least 1 MB of free disk
space.
For Linux:
- Linux Red Hat 6.1 or later or equivalent.
- Java 2 platform, FCS version (J2SE SDK 1.2 FCS) or later
- At least 1 MB of free disk
space.
Differences from JAI 1.1.1 source code:
Source code from the following four packages
from JAI 1.1.1 is being released:
com.sun.media.jai.codec
com.sun.media.jai.codecimpl
com.sun.media.jai.codecimpl.fpx
com.sun.media.jai.codecimpl.util
In order to facilitate ease of use of this
source code, the following changes from the original source code
have been made:
- The classes from these four packages have
been moved into a single directory and package names
removed, so as to facilitate ease of use and compilation.
- The error message resource files from these packages have been
coalesced into a single file called
properties
- Some code not relating to readers and writers has been removed
from the
PropertyUtil.java class.
Image File Formats:
The following formats are supported: BMP, FlashPIX, GIF, JPEG, PNG,
and TIFF images as defined in the TIFF 6.0 baseline specification.
TIFF G3, G4, PackBits, LZW, JPEG-in-TIFF, and DEFLATE compression types
are understood by the TIFF decoder; the TIFF encoder can generate images
compressed using the TIFF G3, G4, PackBits, JPEG-in-TIFF, and DEFLATE
compression types.
The BMP reader can read Version 2.x, 3.x
and some 4.x BMP images. BMP images with 1, 4, 8, 24 bits can
be read with this reader. Support for 16 and 32 bit images
has also been implemented, although such images are not very
common.
Reading of compressed BMPs is supported. BI_RGB,
BI_RLE8, BI_RLE4 and BI_BITFIELDS
compressions are handled.
The BMP reader emits properties such as
type of compression, bits per pixel etc. Use the
getPropertyNames()
method to get the names of all the properties emitted.
BMP Limitations:
- Only the default RGB color space is
supported.
- Alpha channels are not supported.
BMP Writer:
- The BMP writer is capable of writing images only
in the Version 3 format despite the presence of
BMPEncodeParam.setVersion().
- Images which make
use of a
IndexColorModel with 2, 16, or 256
palette entries will be written in palette form.
- Compression is supported for 4- and 8-bit images.
A limited FlashPIX reader is provided that
is capable of extracting a single resolution from a FlashPIX
image file. Only simple FlashPix files are decoded properly.
The image view object is ignored, and image
property information is not exported.
There is no FlashPIX writer.
GIF decoding supports transparency and multiple pages. There is
no GIF encoder.
JPEG files are read and written using the
classes found in the com.sun.image.codec.jpeg
package of the Java 2 SDK. A set of simple JAI wrapper classes
around these classes is provided.
All files in the PNGSuite test suite have
been read and written successfully. See the documentation in
PNGDecodeParam and PNGEncodeParam
for more information.
The TIFF decoder and encoder support all of the baseline
TIFF 6.0 specification. The encoder additionally supports
modified Huffman compression. The TIFF decoder and encoder also
support several extensions including CCITT bilevel encodings,
Tiled Images, Sample Format (integral and floating point),
JPEG-in-TIFF (per TIFF Technical Note #2), and the DEFLATE
lossless compression algorithm.
TIFF support has the following limitations:
- The TIFF encoder does not support LZW compression for the
usual reason of the patent on the algorithm.
- TIFF decoder cannot read images stored
in Planar format (PlanarConfiguration tag has value 2).
|