|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectj2d.face.PPMFile
public class PPMFile
PPM File reader/writer. Works with type 2,4-6.
| Constructor Summary | |
|---|---|
PPMFile(java.io.File filename)
Read the PPM File. |
|
| Method Summary | |
|---|---|
byte[] |
getBytes()
Get the data as byte array. |
double[] |
getDouble()
Get the data as double array. |
int |
getHeight()
Get the height of the PPM image. |
int |
getWidth()
Get the width of the PPM image. |
static void |
main(java.lang.String[] args)
|
static void |
writeImage(java.lang.String fn,
byte[] data,
int width,
int height)
Write to
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PPMFile(java.io.File filename)
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException - if the directory/image
specified is wrong
java.io.IOException - if there are problems reading
the file.| Method Detail |
|---|
public int getHeight()
public int getWidth()
public byte[] getBytes()
public double[] getDouble()
public static void writeImage(java.lang.String fn,
byte[] data,
int width,
int height)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException - if the directory/image
specified is wrong
java.io.IOException - if there are problems reading
the file.
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||