|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.aerith.misao.image.io.Format
The Format
is an abstract class to read and save image
file. It is just an access interface to the file.
Field Summary | |
protected java.net.URL |
url
The url of the image file. |
Constructor Summary | |
Format()
|
Method Summary | |
static Format |
create(java.io.File file)
Creates the proper image file format object based on the specified file object. |
static Format |
create(java.io.File file,
java.lang.String format_id)
Creates the proper image file format object based on the specified file object and the file format ID recorded in an XML document. |
abstract java.lang.String |
getName()
Gets the name of the image format. |
static java.lang.String |
getTruncatedFilename(java.io.File file)
Gets the file name without extension. |
boolean |
isFits()
Returns true if the format is FITS. |
abstract MonoImage |
read()
Reads image file and creates image buffer. |
abstract void |
save(MonoImage image)
Saves image buffer into an image file. |
void |
setURL(java.net.URL url)
Sets the url of the image file. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.net.URL url
Constructor Detail |
public Format()
Method Detail |
public void setURL(java.net.URL url)
url
- the url of the image file.public boolean isFits()
public static Format create(java.io.File file) throws java.io.FileNotFoundException, java.net.MalformedURLException, UnsupportedFileTypeException
file
- the image file.public static Format create(java.io.File file, java.lang.String format_id) throws java.io.FileNotFoundException, java.net.MalformedURLException, UnsupportedFileTypeException
file
- the image file.format_id
- the file format ID.public static java.lang.String getTruncatedFilename(java.io.File file)
file
- the image file.public abstract java.lang.String getName()
public abstract MonoImage read() throws java.io.IOException, UnsupportedBufferTypeException, UnsupportedFileTypeException
public abstract void save(MonoImage image) throws java.io.IOException, UnsupportedBufferTypeException, UnsupportedFileTypeException
image
- the monochrome image buffer to save.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |