jfig.utils
Class PPMWriter

java.lang.Object
  extended byjfig.utils.PPMWriter

public class PPMWriter
extends java.lang.Object

construct and dump portable pixmap format (PPM raw) data from a Java image


Field Summary
(package private)  boolean debug
           
(package private)  int height
           
(package private)  int maxvalue
           
(package private)  int[] pixels
           
(package private)  int width
           
 
Constructor Summary
PPMWriter()
           
 
Method Summary
static void main(java.lang.String[] argv)
          main: load and display an PPM image.
static void usage()
           
 void writePPM(java.awt.Image image, java.io.DataOutputStream stream)
          construct PPM (raw) data from Image 'image' and dump the PPM data to "outputstream".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

int width

height

int height

maxvalue

int maxvalue

pixels

int[] pixels

debug

boolean debug
Constructor Detail

PPMWriter

public PPMWriter()
Method Detail

writePPM

public void writePPM(java.awt.Image image,
                     java.io.DataOutputStream stream)
              throws java.lang.Exception
construct PPM (raw) data from Image 'image' and dump the PPM data to "outputstream". The caller is responsible to close() the outputstream.

Throws:
java.lang.Exception

usage

public static void usage()

main

public static void main(java.lang.String[] argv)
main: load and display an PPM image. Originally used for debugging, but may be used as a PPM viewer, too. After loading, write the image to "tmp.ppm".