com.sun.jimi.core.encoder.xbm
Class XBMEncoder
com.sun.jimi.core.encoder.xbm.XBMEncoder
- public class XBMEncoder
Encoder for XBM format.
output
protected java.io.PrintStream output
jimiImage
protected AdaptiveRasterImage jimiImage
state
protected int state
XBMEncoder
public XBMEncoder()
initSpecificEncoder
public void initSpecificEncoder(java.io.OutputStream out,
AdaptiveRasterImage image)
driveEncoder
public boolean driveEncoder()
throws JimiException
- Drive the encoder through the image encoding process.
getState
public int getState()
doImageEncode
protected void doImageEncode()
throws JimiException,
java.io.IOException
- Perform actual image encoding and write data to output stream.
writeHeader
protected void writeHeader()
- Write header.
writeImageData
protected void writeImageData()
throws JimiException
- Encode the pixel data.
intensity
protected int intensity(int rgb)
- Return the sum of the r/g/b components of an RGB value.
writeTrailer
protected void writeTrailer()
- Write the end of image marker.