|
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.ImageOutputStream
ImageOutputStream writes images to file. Images are saved in the following formats. BinayImage
is not supported but can be treated as GrayImage.
GrayImage -> PGM file
RealGrayImage -> PRGM file
ColorImage -> PPM file
RealColorImage -> PRCM file
ComplexImage -> PPM file
| Field Summary | |
protected BufferedOutputStream |
data
Data to dump |
protected int |
ndims
Number of dimensions |
protected int |
X
Height of the image |
protected int |
Y
Width of the image |
| Constructor Summary | |
ImageOutputStream()
Default ImageOutputStream, does nothing |
|
ImageOutputStream(ImageOutputStream stream)
Creates an ImageOutputStream from another ImageOutputStream |
|
ImageOutputStream(String fn)
Creates an ImageOutputStream from a filename |
|
| Method Summary | |
void |
close()
Closes the file |
int |
ndims()
Returns the number of dimensions |
boolean |
open(String fn)
Opens a file |
void |
write(ColorImage im)
Writes a ColorImage to a file |
void |
write(ComplexImage im)
Writes a ComplexImage to a file |
void |
write(GrayImage im)
Writes a GrayImage to a file |
void |
write(Image im)
Writes a JIGL image to a file |
void |
write(RealColorImage im)
Writes a RealColorImage to a file |
void |
write(RealGrayImage im)
Writes a RealGrayImage to a file |
(package private) void |
writeAsciiPGMHeader(int width,
int height,
int maxval)
Utility routine to write PGM_ASCII file header. |
(package private) void |
writeAsciiPPMHeader(int width,
int height,
int maxval)
Utility routine to write PPM_ASCII file header. |
void |
writeByteSized(ColorImage im)
Writes a ColorImage to a file byteSizing first |
void |
writeByteSized(GrayImage im)
Writes a GrayImage to a file, byteSizing it first |
void |
writeByteSized(RealColorImage im)
Writes a RealColorImage to a file, byteSizing first |
void |
writeByteSized(RealGrayImage im)
Writes a RealGrayImage to a file, byteSizing first |
(package private) void |
writeRawPGMHeader(int width,
int height)
Utility routine to write PGM_RAW file header. |
(package private) void |
writeRawPPMHeader(int width,
int height)
Utility routine to write PPM_RAW file header. |
(package private) void |
writeRawPRCMHeader(int width,
int height)
Utility routine to write PRCM_RAW file header. |
(package private) void |
writeRawPRGMHeader(int width,
int height)
Utility routine to write PRGM_RAW file header. |
(package private) static void |
writeString(OutputStream out,
String str)
Utility routine to write a String object to a OutputStream object. |
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 ndims
protected int X
protected int Y
| Constructor Detail |
public ImageOutputStream()
public ImageOutputStream(String fn)
throws IOException
fn - filenamepublic ImageOutputStream(ImageOutputStream stream)
| Method Detail |
public int ndims()
public int X()
public int Y()
public boolean open(String fn)
throws IOException
fn - filename
IOException
public void close()
throws IOException
IOException
public void write(Image im)
throws UnknownImageTypeException,
ColorModelNotSupportedException,
ColorModelUnknownException,
IOException
im - JIGL image
UnknownImageTypeException
ColorModelNotSupportedException
ColorModelUnknownException
IOException
public void write(GrayImage im)
throws IOException
im - the GrayImage
IOException
public void writeByteSized(GrayImage im)
throws IOException
im - the GrayImage
IOException
public void write(RealGrayImage im)
throws IOException
IOException
public void write(ColorImage im)
throws IOException
im - the ColorImage
IOException
public void write(RealColorImage im)
throws IOException
im - the RealColorImage
IOException
public void write(ComplexImage im)
throws IOException
im - the ComplexImage
IOException
void writeRawPGMHeader(int width,
int height)
throws IOException
IOException
void writeRawPRGMHeader(int width,
int height)
throws IOException
IOException
void writeAsciiPGMHeader(int width,
int height,
int maxval)
throws IOException
IOException
void writeRawPPMHeader(int width,
int height)
throws IOException
IOException
void writeRawPRCMHeader(int width,
int height)
throws IOException
IOException
void writeAsciiPPMHeader(int width,
int height,
int maxval)
throws IOException
IOException
static void writeString(OutputStream out,
String str)
throws IOException
IOException
public void writeByteSized(RealGrayImage im)
throws IOException
IOException
public void writeByteSized(ColorImage im)
throws IOException
im - the ColorImage
IOException
public void writeByteSized(RealColorImage im)
throws IOException
im - the RealColorImage
IOException
|
JIGL v1.6 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||