Class IIOImageProcessor

  • All Implemented Interfaces:
    Application.Component, Application.Module, ImageProcessor
    Direct Known Subclasses:
    JaiImageProcessor

    public class IIOImageProcessor
    extends Object
    implements ImageProcessor
    Crop the main image as specified, and scale it to the correct size for a thumbnail. Use the JAI library to read the file because the javax.imageio package doesn't read extended JPEG properly. Use JAI to remove transparency from JPEGs and PNGs, simply by removing the alpha channel. Annoyingly, this will not work with GIFs with transparent pixels. The transforms in the JAI library are buggy, so standard AWT operations do the scaling and cropping. The most obvious problem in the JAI library is the refusal to crop after scaling an image. Scale first to avoid the boundary error that produces black lines along the edge of the image. Use the javax.imagio pacakge to write the thumbnail image as a JPEG file.