All Packages Class Hierarchy This Package Previous Next Index
Class picture.PpmEncoder
java.lang.Object
|
+----picture.ImageEncoder
|
+----picture.PpmEncoder
- public class PpmEncoder
- extends ImageEncoder
Write out an image as a PPM.
Writes an image onto a specified OutputStream in the PPM file format.
Fetch the software.
Fetch the entire Acme package.
- See Also:
- ToPpm
-
PpmEncoder(Image, OutputStream)
- Constructor.
-
PpmEncoder(ImageProducer, OutputStream)
- Constructor.
-
encodeDone()
- Subclasses implement this to finish an encoding.
-
encodePixels(int, int, int, int, int[], int, int)
- Subclasses implement this to actually write out some bits.
-
encodeStart(int, int)
- Subclasses implement this to initialize an encoding.
-
writeString(OutputStream, String)
-
PpmEncoder
public PpmEncoder(Image img,
OutputStream out) throws IOException
- Constructor.
- Parameters:
- img - The image to encode.
- out - The stream to write the PPM to.
PpmEncoder
public PpmEncoder(ImageProducer prod,
OutputStream out) throws IOException
- Constructor.
- Parameters:
- prod - The ImageProducer to encode.
- out - The stream to write the PPM to.
encodeStart
void encodeStart(int width,
int height) throws IOException
- Subclasses implement this to initialize an encoding.
- Overrides:
- encodeStart in class ImageEncoder
writeString
static void writeString(OutputStream out,
String str) throws IOException
encodePixels
void encodePixels(int x,
int y,
int w,
int h,
int rgbPixels[],
int off,
int scansize) throws IOException
- Subclasses implement this to actually write out some bits.
- Overrides:
- encodePixels in class ImageEncoder
encodeDone
void encodeDone() throws IOException
- Subclasses implement this to finish an encoding.
- Overrides:
- encodeDone in class ImageEncoder
All Packages Class Hierarchy This Package Previous Next Index