ImageEncoder (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Acme.JPM.Encoders
Class ImageEncoder

    java.lang.Object
      Acme.JPM.Encoders.ImageEncoder

All Implemented Interfaces:
  java.awt.image.ImageConsumer

Direct Known Subclasses:
  GifEncoder, PpmEncoder

    public abstract class ImageEncoder

extends java.lang.Object
implements java.awt.image.ImageConsumer

Abstract class for writing out an image.

A framework for classes that encode and write out an image in a particular file format.

This provides a simplified rendition of the ImageConsumer interface. It always delivers the pixels as ints in the RGBdefault color model. It always provides them in top-down left-right order. If you want more flexibility you can always implement ImageConsumer directly.

Fetch the software.
Fetch the entire Acme package.

See Also:
  `GifEncoder`, `PpmEncoder`

Field Summary
`protected java.io.OutputStream` | `out`

Fields inherited from interface java.awt.image.ImageConsumer
`COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT`

Constructor Summary
`ImageEncoder(java.awt.Image img, java.io.OutputStream out)`
`ImageEncoder(java.awt.image.ImageProducer producer, java.io.OutputStream out)`

Method Summary
`void` | `encode()`
`java.util.Hashtable` | `getProperties()`
`void` | `imageComplete(int status)`
`void` | `setColorModel(java.awt.image.ColorModel model)`
`void` | `setDimensions(int width, int height)`
`void` | `setHints(int hintflags)`
`void` | `setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)`
`void` | `setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)`
`void` | `setProperties(java.util.Hashtable props)`

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

Field Detail

### out

    protected java.io.OutputStream out

Constructor Detail

### ImageEncoder

    public ImageEncoder(java.awt.Image img,
                        java.io.OutputStream out)
                 throws java.io.IOException

Throws:
  `java.io.IOException`

### ImageEncoder

    public ImageEncoder(java.awt.image.ImageProducer producer,
                        java.io.OutputStream out)
                 throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### encode

    public void encode()
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### setDimensions

    public void setDimensions(int width,
                              int height)

  Specified by:
    `setDimensions` in interface `java.awt.image.ImageConsumer`

### setProperties

    public void setProperties(java.util.Hashtable props)

  Specified by:
    `setProperties` in interface `java.awt.image.ImageConsumer`

### getProperties

    public java.util.Hashtable getProperties()

### setColorModel

    public void setColorModel(java.awt.image.ColorModel model)

  Specified by:
    `setColorModel` in interface `java.awt.image.ImageConsumer`

### setHints

    public void setHints(int hintflags)

  Specified by:
    `setHints` in interface `java.awt.image.ImageConsumer`

### setPixels

    public void setPixels(int x,
                          int y,
                          int w,
                          int h,
                          java.awt.image.ColorModel model,
                          byte[] pixels,
                          int off,
                          int scansize)

  Specified by:
    `setPixels` in interface `java.awt.image.ImageConsumer`

### setPixels

    public void setPixels(int x,
                          int y,
                          int w,
                          int h,
                          java.awt.image.ColorModel model,
                          int[] pixels,
                          int off,
                          int scansize)

  Specified by:
    `setPixels` in interface `java.awt.image.ImageConsumer`

### imageComplete

    public void imageComplete(int status)

  Specified by:
    `imageComplete` in interface `java.awt.image.ImageConsumer`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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