What are the advantages and disadvantages of Java Advanced Imaging over dealing Images with AWT?

Rammohan Meda

Early versions of the Java AWT provided a simple rendering package suitable for rendering common HTML pages, but without the features necessary for complex imaging. The early AWT allowed the generation of simple images by drawing lines and shapes. A very limited number of image files, such as GIF and JPEG, could be read in through the use of a Toolkit object. Once read in, the image could be displayed, but there were essentially no image processing operators.

The Java 2D API extended the early AWT by adding support for more general graphics and rendering operations. Java 2D added special graphics classes for the definition of geometric primitives, text layout and font definition, color spaces, and image rendering. The new classes supported a limited set of image processing operators for blurring, geometric transformation, sharpening, contrast enhancement, and thresholding. The Java 2D extensions were added to the core Java AWT beginning with the Java Platform 1.2 release.

The Java Advanced Imaging (JAI) API further extends the Java platform (including the Java 2D API) by allowing sophisticated, high-performance image processing to be incorporated into Java applets and applications. JAI is a set of classes providing imaging functionality beyond that of Java 2D and the Java Foundation classes, though it is compatible with those APIs.

JAI implements a set of core image processing capabilities including image tiling, regions of interest, and deferred execution. JAI also offers a set of core image processing operators including many common point, area, and frequency-domain operators.

JAI is intended to meet the needs of all imaging applications. The API is highly extensible, allowing new image processing operations to be added in such a way as to appear to be a native part of it. Thus, JAI benefits virtually all Java developers who want to incorporate imaging into their applets and applications

JAI is intended to support image processing using the Java programming language as generally as possible so that few, if any, image processing applications are beyond its reach. At the same time, JAI presents a simple programming model that can be readily used in applications without a tremendous mechanical programming overhead or a requirement that the programmer be expert in all phases of the API's design.

JAI encapsulates image data formats and remote method invocations within a re-usable image data object, allowing an image file, a network image object, or a real-time data stream to be processed identically. Thus, JAI represents a simple programming model while concealing the complexity of the internal mechanisms.

JAI Features

JAI offers several advantages for applications developers compared to other imaging solutions.

  1. Cross-platform Imaging
  2. Distributed Imaging
  3. Object-oriented API
  4. Flexible and Extensible
  5. Device Independent
  6. Powerful
  7. High Performance
  8. Interoperable

For complete information please refer the following URL http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/JAITOC.fm.html

Java Advanced Imaging API offers unique advantages for imaging professionals

  1. Reduced Time-to-Market

    Its easy-to-use programming model simplifies the tasks required to creating imaging software, therefore, reducing the time to develop applications.

  2. Network-Centric

    Because it is built on the network-centric Java Platform, developers can use this to build collaborative applications for high-end image processing and visualization over the network.

  3. Imaging Standard for the Future

    It offers the first Java based open-specification, cross platform, extensible imaging API, enabling developers to focus on creating the right applications regardless of the disparate computing platforms.

Java Advanced Imaging API's performance-oriented features:

  1. Tiling

    An "intelligent" feature that allows users to download and process just one section of the image at a time, decreasing bandwidth needs.

  2. Deferred Execution

    An imaging model which processes pixel information only when needed or just-in-time, avoiding unnecessary imaging computations

  3. Network Imaging

    The Java Advanced Imaging API supports Java's Remote Method Invocation and the Internet Imaging Protocol for its network-based imaging allowing for a scalable solutions from clients like PDA's or laptops to powerful desktops and high-end servers.

  4. Extensible Framework

    Java Advanced Imaging API's extensible framework allows developers to plugin their algorithms and customized vertical market solutions, still taking advantage of the API's rich feature set including tiling, threading and deferred execution.