All Packages  Class Hierarchy  This Package  Previous  Next  Index


Class Acme.JPM.Encoders.ImageEncoder

java.lang.Object
   |
   +----Acme.JPM.Encoders.ImageEncoder

public abstract class ImageEncoder
extends Object
implements 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, ImageDecoder

Variable Index

 o out

Constructor Index

 o ImageEncoder(Image, OutputStream)
Constructor.
 o ImageEncoder(ImageProducer, OutputStream)
Constructor.

Method Index

 o encode()
Call this after initialization to get things going.
 o imageComplete(int)
 o setColorModel(ColorModel)
 o setDimensions(int, int)
 o setHints(int)
 o setPixels(int, int, int, int, ColorModel, byte[], int, int)
 o setPixels(int, int, int, int, ColorModel, int[], int, int)
 o setProperties(Hashtable)

Variables

 o out
 protected OutputStream out

Constructors

 o ImageEncoder
 public ImageEncoder(Image img,
                     OutputStream out) throws IOException
Constructor.

Parameters:
img - The image to encode.
out - The stream to write the bytes to.
 o ImageEncoder
 public ImageEncoder(ImageProducer producer,
                     OutputStream out) throws IOException
Constructor.

Parameters:
producer - The ImageProducer to encode.
out - The stream to write the bytes to.

Methods

 o encode
 public synchronized void encode() throws IOException
Call this after initialization to get things going.

 o setDimensions
 public void setDimensions(int width,
                           int height)
 o setProperties
 public void setProperties(Hashtable props)
 o setColorModel
 public void setColorModel(ColorModel model)
 o setHints
 public void setHints(int hintflags)
 o setPixels
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       ColorModel model,
                       byte pixels[],
                       int off,
                       int scansize)
 o setPixels
 public void setPixels(int x,
                       int y,
                       int w,
                       int h,
                       ColorModel model,
                       int pixels[],
                       int off,
                       int scansize)
 o imageComplete
 public void imageComplete(int status)

All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs