org.jmol.export.image
public abstract class ImageEncoder extends Object implements ImageConsumer
Modifier and Type | Field and Description |
---|---|
private boolean |
accumulate |
private int[] |
accumulator |
private boolean |
encoding |
private int |
height |
private int |
hintflags |
private IOException |
iox |
protected OutputStream |
out |
private ImageProducer |
producer |
private static ColorModel |
rgbModel |
private boolean |
started |
private int |
width |
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor and Description |
---|
ImageEncoder(Image img,
OutputStream out) |
ImageEncoder(ImageProducer producer,
OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
encode() |
(package private) abstract void |
encodeDone() |
private void |
encodeFinish() |
(package private) abstract void |
encodePixels(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize) |
private void |
encodePixelsWrapper(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize) |
(package private) 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) |
private void |
stop() |
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 boolean accumulate
private int[] accumulator
public ImageEncoder(Image img, OutputStream out)
public ImageEncoder(ImageProducer producer, OutputStream out)
abstract void encodeStart(int w, int h) throws IOException
IOException
abstract void encodePixels(int x, int y, int w, int h, int[] rgbPixels, int off, int scansize) throws IOException
IOException
abstract void encodeDone() throws IOException
IOException
public void encode() throws IOException
IOException
private void encodePixelsWrapper(int x, int y, int w, int h, int[] rgbPixels, int off, int scansize) throws IOException
IOException
private void encodeFinish() throws IOException
IOException
private void stop()
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