org.jmol.export.image
Class ImageEncoder
java.lang.Object
org.jmol.export.image.ImageEncoder
- All Implemented Interfaces:
- ImageConsumer
- Direct Known Subclasses:
- GifEncoder, PpmEncoder
public abstract class ImageEncoder
- extends Object
- implements ImageConsumer
Method Summary |
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected OutputStream out
producer
private ImageProducer producer
width
private int width
height
private int height
hintflags
private int hintflags
started
private boolean started
encoding
private boolean encoding
iox
private IOException iox
rgbModel
private static final ColorModel rgbModel
accumulate
private boolean accumulate
accumulator
private int[] accumulator
ImageEncoder
public ImageEncoder(Image img,
OutputStream out)
ImageEncoder
public ImageEncoder(ImageProducer producer,
OutputStream out)
encodeStart
abstract void encodeStart(int w,
int h)
throws IOException
- Throws:
IOException
encodePixels
abstract void encodePixels(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize)
throws IOException
- Throws:
IOException
encodeDone
abstract void encodeDone()
throws IOException
- Throws:
IOException
encode
public void encode()
throws IOException
- Throws:
IOException
encodePixelsWrapper
private void encodePixelsWrapper(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize)
throws IOException
- Throws:
IOException
encodeFinish
private void encodeFinish()
throws IOException
- Throws:
IOException
stop
private void stop()
setDimensions
public void setDimensions(int width,
int height)
- Specified by:
setDimensions
in interface ImageConsumer
setProperties
public void setProperties(Hashtable props)
- Specified by:
setProperties
in interface ImageConsumer
setColorModel
public void setColorModel(ColorModel model)
- Specified by:
setColorModel
in interface ImageConsumer
setHints
public void setHints(int hintflags)
- Specified by:
setHints
in interface ImageConsumer
setPixels
public void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
byte[] pixels,
int off,
int scansize)
- Specified by:
setPixels
in interface ImageConsumer
setPixels
public void setPixels(int x,
int y,
int w,
int h,
ColorModel model,
int[] pixels,
int off,
int scansize)
- Specified by:
setPixels
in interface ImageConsumer
imageComplete
public void imageComplete(int status)
- Specified by:
imageComplete
in interface ImageConsumer