|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--jigl.image.io.ImageOutputStreamJAI
ImageOutputStreamJAI writes images to file (formats supported - PGM,PPM,TIFF,JPEG,BMP,PNG) using Java Advanced Imaging API and com.sun.media.jai.codec package.
| Field Summary | |
static int |
BMP
Flag for one image file type |
protected BufferedOutputStream |
data
Data to dump |
static int |
GIF
Flag for one image file type |
(package private) boolean |
isGray
|
static int |
JPEG
Flag for one image file type |
static int |
PGM
Flag for one image file type |
static int |
PNG
Flag for one image file type |
static int |
PPM
Flag for one image file type |
static int |
TIFF
Flag for one image file type |
protected int |
X
Height of the image |
protected int |
Y
Width of the image |
| Constructor Summary | |
ImageOutputStreamJAI()
Default ImageBufferedOutputStream, does nothing |
|
ImageOutputStreamJAI(ImageOutputStreamJAI stream)
Creates an ImageBufferedOutputStream from another ImageBufferedOutputStream |
|
ImageOutputStreamJAI(String fn)
Creates an ImageBufferedOutputStream from a file |
|
| Method Summary | |
boolean |
open(String fn)
Opens a file |
void |
writeBMP(Image im)
This function writes out a jigl image in BMP format. |
void |
writeImage(Image image,
int type,
ImageEncodeParam param)
This function writes out an image (formats supported - PGM,PPM,TIFF,JPEG,BMP,PNG). |
void |
writeJPEG(Image im)
This function writes out a jigl image in JPEG format with .75 quality value |
void |
writeJPEG(Image im,
float quality)
This function writes out a jigl image in JPEG format. |
void |
writePGM(Image im)
This function writes out a jigl image in PGM format as a binary raw file. |
void |
writePGM(Image im,
boolean raw)
This function writes out a jigl image in PGM format. |
void |
writePNG(Image im)
This function writes out a jigl image in PNG format. |
void |
writePPM(Image im)
This function writes out a jigl image in PPM format as a binary raw file. |
void |
writePPM(Image im,
boolean raw)
This function writes out a jigl image in PPM format. |
void |
writeTIFF(Image im)
This function writes out a jigl image in TIFF format. |
int |
X()
Returns the width |
int |
Y()
Returns the height |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected BufferedOutputStream data
protected int X
protected int Y
boolean isGray
public static final int PGM
public static final int PPM
public static final int TIFF
public static final int JPEG
public static final int BMP
public static final int GIF
public static final int PNG
| Constructor Detail |
public ImageOutputStreamJAI()
public ImageOutputStreamJAI(String fn)
throws IOException
fn - filenamepublic ImageOutputStreamJAI(ImageOutputStreamJAI stream)
| Method Detail |
public int X()
public int Y()
public boolean open(String fn)
throws IOException
IOException
public void writePGM(Image im,
boolean raw)
throws ImageNotSupportedException
im - jigl image to be written outraw - true = binary raw format, false = ASCII format; note that writing
in ASCII format is slower than binary because of the way JAVA handles writing
ASCII characters to a file
ImageNotSupportedException
public void writePGM(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writePPM(Image im,
boolean raw)
throws ImageNotSupportedException
im - jigl image to be written outraw - true = binary raw format, false = ASCII format; note that writing
in ASCII format is slower than binary because of the way JAVA handles writing
ASCII characters to a file
ImageNotSupportedException
public void writePPM(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writeTIFF(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writeBMP(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writeJPEG(Image im,
float quality)
throws ImageNotSupportedException
im - jigl image to be written outquality - Some guidelines: 0.75 high quality
0.5 medium quality
0.25 low quality
ImageNotSupportedException
public void writeJPEG(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writePNG(Image im)
throws ImageNotSupportedException
im - jigl image to be written out
ImageNotSupportedException
public void writeImage(Image image,
int type,
ImageEncodeParam param)
throws ImageNotSupportedException
image - jigl image to be written outtype - either PGM,PPM,TIFF,JPEG,BMP,PNGparam - EncodeParam type, may be null
ImageNotSupportedException
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||