org.jmol.export.image
Class PpmEncoder
java.lang.Object
org.jmol.export.image.ImageEncoder
org.jmol.export.image.PpmEncoder
- All Implemented Interfaces:
- ImageConsumer
public class PpmEncoder
- extends ImageEncoder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PpmEncoder
public PpmEncoder(Image img,
OutputStream out)
PpmEncoder
public PpmEncoder(ImageProducer prod,
OutputStream out)
getBytes
public static byte[] getBytes(Image image)
write
public static void write(Image image,
OutputStream os)
throws IOException
- Throws:
IOException
encodeStart
void encodeStart(int width,
int height)
throws IOException
- Specified by:
encodeStart
in class ImageEncoder
- Throws:
IOException
writeString
static void writeString(OutputStream out,
String str)
throws IOException
- Throws:
IOException
encodePixels
void encodePixels(int x,
int y,
int w,
int h,
int[] rgbPixels,
int off,
int scansize)
throws IOException
- Specified by:
encodePixels
in class ImageEncoder
- Throws:
IOException
encodeDone
void encodeDone()
throws IOException
- Specified by:
encodeDone
in class ImageEncoder
- Throws:
IOException