JIU 0.12.0 Homepage

Package net.sourceforge.jiu.codecs

Provides classes to read images from and save them to files (or streams) in various file formats.

See:
          Description

Class Summary
BMPCodec A codec to read and write Windows BMP image files.
CodecMode This class is an enumeration type for the two modes that an image codec can be used in, CodecMode.LOAD and CodecMode.SAVE.
GIFCodec A codec to write Compuserve GIF (Graphics Interchange Format) files.
IFFCodec A codec to read Amiga IFF image files.
ImageCodec The base class for image codecs, operations to read images from or write them to streams.
ImageLoader A convenience class with static methods to load images from files using JIU codecs.
PalmCodec A codec to read and write image files in the native image file format of Palm OS, an operating system for handheld devices.
PCDCodec A codec to read Kodak Photo-CD (image pac) image files.
PNGCodec A codec for the Portable Network Graphics (PNG) format.
PNMCodec A codec to read and write Portable Anymap (PNM) image files.
PSDCodec A codec to read images from Photoshop PSD files.
RASCodec A codec to read and write Sun Raster (RAS) image files.
 

Exception Summary
InvalidFileStructureException This exception is thrown during image loading, when the decoding process is made impossible by errors in the image file.
InvalidImageIndexException This exception is thrown when the caller has defined an image index that specifies the image to be loaded in a multiple-image file and that index is unavailable.
UnsupportedCodecModeException This exception is thrown when a codec does not support the codec mode wanted by the user.
UnsupportedTypeException This exception is thrown during image loading.
WrongFileFormatException This exception is thrown during image loading.
 

Package net.sourceforge.jiu.codecs Description

Provides classes to read images from and save them to files (or streams) in various file formats. In some cases, it will be sufficient for codecs to use InputStream and OutputStream. This approach should be picked when possible, as it allows for maximum flexibility--input and output streams can be files, network streams, standard input / output (so that data can be piped on the command line) and more. However, in some cases, it will be necessary for codecs to use RandomAccessFile in order to seek to various places in the file.

Note that the codecs are (sometimes more, sometimes less) far from being finished or even stable. Please do not rely on them for important data. Treat the codecs (and the rest of JIU) as beta software.

Package Specification

All image codecs must extend the ImageCodec class. They may support only a subset of all possible flavors of an image file format. As an example, they may choose to support only reading or only writing. As ImageCodec extends Operation, the progress notification system can (and should) be used. If the codecs are used in GUI (graphical user interface) applications, users could be shown a progress bar--loading and saving can be time-consuming.

ImageCodec provides methods to specify a rectangular part of an image. The information should be used by the codec to read or write only that part of the image. That way, loading only a part of a huge image is typically faster and consumes less memory. When saving a part of a huge image, an additional crop operation becomes unncessary this way.

Related Documentation

Obviously, JIU can only benefit from supporting more file formats. If you want to contribute codecs to JIU (remember that you must provide your code under the GNU General Public License), please contact the maintainer at the JIU homepage.

However, note that no code will be integrated that uses patented algorithms. For better or worse, algorithms like LZW compression (used optionally in TIFF and mandatory in GIF) or arithmetic entropy coding (used in some parts of JPEG) are patented in several countries. In order to use these algorithms, one has to pay license fees. This is not acceptable for JIU and therefore no code will be integrated that uses such algorithms. In cases like GIF or TIFF/LZW that is very unfortunate because these formats a certain popularity that would make them interesting to support. Read the GIF section of the Open Directory, it contains several links to sites that explain the situation (from different points of view).

File format specifications can be found at the following resources:


JIU 0.12.0 Homepage

Copyright © 2000, 2001, 2002, 2003, 2004 Marco Schmidt