## com.bbn.openmap.image
Class ImageIOFormatter

    java.lang.Object
      com.bbn.openmap.image.AbstractImageFormatter
          com.bbn.openmap.image.ImageIOFormatter

All Implemented Interfaces:
  java.util.EventListener, ImageFormatter, java.beans.PropertyChangeListener, PropertyConsumer

Direct Known Subclasses:
  GIFImageIOFormatter, PNG32ImageFormatter, PNG8ImageFormatter, PNGImageIOFormatter

public abstract class ImageIOFormatter
extends AbstractImageFormatter

Field Summary
`protected java.lang.String` `formatName`

Fields inherited from class com.bbn.openmap.image.AbstractImageFormatter
`bufferedImage, layers, propertiesPrefix`

Fields inherited from interface com.bbn.openmap.PropertyConsumer
`EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty`

Constructor Summary
`ImageIOFormatter()`

Method Summary
`byte[]` `formatImage(java.awt.image.BufferedImage bi)` Convert a BufferedImage to a image file format...
`java.lang.String` `getFormatName()`
`java.awt.Graphics` `getGraphics(int width, int height)` Return the applicable Graphics to use to paint the layers into.
`void` `setFormatName(java.lang.String formatName)`

Methods inherited from class com.bbn.openmap.image.AbstractImageFormatter
`getBufferedImage, getGraphics, getImageBytes, getImageFromMapBean, getImageFromMapBean, getImageFromMapBean, getProperties, getPropertyInfo, getPropertyPrefix, getScaledBufferedImage, getScaledImageBytes, makeClone, propertyChange, setBufferedImage, setProperties, setProperties, setPropertyPrefix`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.bbn.openmap.image.ImageFormatter
`getContentType, getFormatLabel`

Field Detail

### formatName

    protected java.lang.String formatName

Constructor Detail

### ImageIOFormatter

    public ImageIOFormatter()

Method Detail

### getFormatName

    public java.lang.String getFormatName()

### setFormatName

    public void setFormatName(java.lang.String formatName)

  Parameters:
    `formatName` - The formatName to set.

### formatImage

    public byte[] formatImage(java.awt.image.BufferedImage bi)

  Description copied from class: `AbstractImageFormatter`
  Convert a BufferedImage to a image file format...

  Specified by:
    `formatImage` in interface `ImageFormatter`
  Specified by:
    `formatImage` in class `AbstractImageFormatter`
  Parameters:
    `bi` - a BufferedImage..

### getGraphics

    public java.awt.Graphics getGraphics(int width,
                                         int height)

  Return the applicable Graphics to use to paint the layers into. If the internal BufferedImage hasn't been created yet, or has been set to null, then a new buffered Image is created, set to the size specified by the height and width. The ImageGenerator extends MapBean. Remember to dispose of the graphics object when you are done with it. Uses the BufferedImage.TYPE_INT_ARGB colormodel.

  Specified by:
    `getGraphics` in interface `ImageFormatter`
  Overrides:
    `getGraphics` in class `AbstractImageFormatter`
  Parameters:
    `width` - pixel width of Graphics.
    `height` - pixel height of Graphics.
  Returns:
    java.awt.Graphics object to use.
  See Also:
    `BufferedImage`

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details