All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----picture.ImageEncoder
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.
protected OutputStream out
private ImageProducer producer
private int width
private int height
private int hintflags
private boolean started
private boolean encoding
private IOException iox
private static final ColorModel rgbModel
private Hashtable props
private boolean accumulate
private int accumulator[]
public ImageEncoder(Image img, OutputStream out) throws IOException
public ImageEncoder(ImageProducer producer, OutputStream out) throws IOException
abstract void encodeStart(int w, int h) throws IOException
abstract void encodePixels(int x, int y, int w, int h, int rgbPixels[], int off, int scansize) throws IOException
abstract void encodeDone() throws IOException
public synchronized void encode() throws IOException
private void encodePixelsWrapper(int x, int y, int w, int h, int rgbPixels[], int off, int scansize) throws IOException
private void encodeFinish() throws IOException
private synchronized void stop()
public void setDimensions(int width, int height)
public void setProperties(Hashtable props)
public void setColorModel(ColorModel model)
public void setHints(int hintflags)
public void setPixels(int x, int y, int w, int h, ColorModel model, byte pixels[], int off, int scansize)
public void setPixels(int x, int y, int w, int h, ColorModel model, int pixels[], int off, int scansize)
public void imageComplete(int status)
All Packages Class Hierarchy This Package Previous Next Index