Package com.bbn.openmap.image

This package has classes that provide image creation and manipulation capabilities.


Interface Summary
ImageFormatter The ImageFormatter deals with most of the image meanderings of Java, while letting you create an image in a specific format.
ImageReceiver The interface describing the object that receives the formatted image from the ImageServer.
ImageServerConstants This file defines the OpenMap extensions to the WMTConstants for making a web request for a map.
WMTConstants This file contains all the String constants that are defined in the OpenGIS WMT specification.

Class Summary
AbstractImageFormatter The abstract implementation of the ImageFormatter.
AcmeGifFormatter This formatter requires the Acme.JPM.Encoders package.
AcmeGifHelper This class provides some utility methods for creating gif encoded images, using the Acme code available at A copy has been included in the contrib directory.
BufferedImageHelper This class provides some utility methods for creating a BufferedImage.
ColorReducer A with some static methods to reduce the number of colors in a BufferedImage.
GeneratorTester Deprecated. uses ImageServer methods no longer supported.
ImageHelper A class that holds static functions that do things we tend to do to images a lot.
ImageMaster The ImageMaster is an organizer for running the ImageServer to create one or more images.
ImageScaler This code comes from the book "Filthy Rich Clients" Chapter 4.
ImageServer The image server is the class you want to deal with when creating images.
ImageServerUtils A class to contain convenience functions for parsing web image requests.
JPEGHelper This class provides some utility methods for creating jpeg encoded images.
MagicPlanetImageComponent The MagicPlanetImageComponent is an OpenMap Component designed to create images for Global Imagination's MagicPlanet Globe.
MapBeanPrinter A simple utility class to print a MapBean and rescale it to fit the printed page.
MapRequestHandler The MapRequestHandler is the front end for String requests to the ImageServer.
PPMFormatter A simple formatter to create PPM images.
SimpleHttpImageServer The SimpleHttpImageServer is an ImageServer extended into a simple Http server that creates images based on arguments within the request.
XBMFile XBMFile is a class which reads in a bitmap file, and provides the parameters of the file.

Exception Summary

Package com.bbn.openmap.image Description

This package has classes that provide image creation and manipulation capabilities. The Helper classes are for managing java images and their pixels. The other classes can be used to work with the MapBean to create image files.

To create image files, you'll want to focus on the ImageServer, ImageReceiver and ImageGenerator classes.

The ImageGenerator has the smarts to control the layers in a MapBean, managing the multithreaded nature of them, to get them to draw their graphics into an image for a given projection. It accepts an array of layers, a projection, and a ImageReadyListener to notify when the java.awt.Image is ready. The ImageReadyListener handles the formatting of the java.awt.Image into a standard image format - JPEG, GIF, etc. Caution: The ImageGenerator has been found to have timing issues under loading, and some layers, for some reason, don't always make it to the final image. The ImageServer utilizes the Layers' ProjectionPainter interface methods to provide a reliable path for map image creation.

The ImageServer is a manager class that prepares layers for the ImageGenerator to use. The ImageServer has several forms of createImage() methods, which accept projection requests, and then, either cycle through the ImageGenerator to create map images, or cycle through the Layers using their ProjectionPainter interface method. With the former, the ImageServer also calls the appropriate ImageReceiver for each projection request to hand over the formatted image bytes when the image is created.

The MapRequestHandler is an extended ImageServer with methods that parse OpenGIS Web Mapping Server format requests, and create images in response to those requests.

Copyright (C) BBNT Solutions LLC; See for details