public abstract class ImageEncoder extends Object implements ImageConsumer
Modifier and Type | Field and Description |
---|---|
protected DataOutput |
out |
protected Hashtable<?,?> |
props |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor and Description |
---|
ImageEncoder(Image img,
DataOutput dos) |
ImageEncoder(ImageProducer producer,
DataOutput dos) |
Modifier and Type | Method and Description |
---|---|
void |
encode() |
protected abstract void |
encodeDone() |
protected abstract void |
encodePixels(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize) |
protected abstract void |
encodeStart(int w,
int h) |
void |
imageComplete(int status) |
void |
setColorModel(ColorModel model) |
void |
setDimensions(int width,
int height) |
void |
setHints(int hintflags) |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize) |
void |
setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize) |
void |
setProperties(Hashtable<?,?> props) |
protected DataOutput out
protected Hashtable<?,?> props
public ImageEncoder(Image img, DataOutput dos) throws IOException
IOException
public ImageEncoder(ImageProducer producer, DataOutput dos) throws IOException
IOException
protected abstract void encodeStart(int w, int h) throws IOException
IOException
protected abstract void encodePixels(int x, int y, int w, int h, int[] rgbPixels, int off, int scansize) throws IOException
IOException
protected abstract void encodeDone() throws IOException
IOException
public void encode() throws IOException
IOException
public void setDimensions(int width, int height)
setDimensions
in interface ImageConsumer
public void setProperties(Hashtable<?,?> props)
setProperties
in interface ImageConsumer
public void setColorModel(ColorModel model)
setColorModel
in interface ImageConsumer
public void setHints(int hintflags)
setHints
in interface ImageConsumer
public void setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
setPixels
in interface ImageConsumer
public void setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
setPixels
in interface ImageConsumer
public void imageComplete(int status)
imageComplete
in interface ImageConsumer
Copyright © 2014. All rights reserved.