org.freehep.graphicsio.ppm
Class ImageEncoder
java.lang.Object
org.freehep.graphicsio.ppm.ImageEncoder
- All Implemented Interfaces:
- ImageConsumer
- Direct Known Subclasses:
- PPMEncoder
- public abstract class ImageEncoder
- extends Object
- implements ImageConsumer
- Source Code:
- ImageEncoder.java
Method Summary |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
out
protected DataOutput out
ImageEncoder
public ImageEncoder(Image img,
DataOutput dos)
throws IOException
ImageEncoder
public ImageEncoder(ImageProducer producer,
DataOutput dos)
throws IOException
encodeStart
protected abstract void encodeStart(int w,
int h)
throws IOException
- Throws:
IOException
encodePixels
protected abstract void encodePixels(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize)
throws IOException
- Throws:
IOException
encodeDone
protected abstract void encodeDone()
throws IOException
- Throws:
IOException
encode
public void encode()
throws IOException
- Throws:
IOException
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
Copyright © 2000-2004 FreeHEP, All Rights Reserved.