com.sun.jimi.core.decoder.xpm
Class XPMDecoder
com.sun.jimi.core.decoder.xpm.XPMDecoder
- public class XPMDecoder
Decoder for XPM X11 bitmaps.
parser_
protected XpmParser parser_
- XPM data parser.
jimiImage_
protected AdaptiveRasterImage jimiImage_
- JimiImage being written to.
state_
protected int state_
- State of decoder.
XPMDecoder
public XPMDecoder()
initDecoder
public void initDecoder(java.io.InputStream in,
AdaptiveRasterImage ji)
- Initializes the decoder without doing any parsing.
- Parameters:
in
- The input stream to read XPM data from.ji
- The JimiImage to write information to.
driveDecoder
public boolean driveDecoder()
throws JimiException
- Decode the image.
- Returns:
- False if there image loading has come to an end.
getState
public int getState()
freeDecoder
public void freeDecoder()
getJimiImage
public AdaptiveRasterImage getJimiImage()
xpmInitialize
protected void xpmInitialize(int w,
int h,
byte[] pixels,
java.awt.Color[] colorTable)
throws JimiException
- Initialize pixels from the xpm pixmap.
- Parameters:
w
- Width of pixmap.h
- Height of pixmap.pixels
- Pixel data.colorTable
- Colors.