net.aerith.misao.image.io
Class RawGray

java.lang.Object
  |
  +--net.aerith.misao.image.io.Format
        |
        +--net.aerith.misao.image.io.RawGray

public class RawGray
extends Format
implements Bitmap

The RawGray is a class to read and save 8-bit raw gray image file. It is just an access interface to 8-bit raw gray image file.


Fields inherited from class net.aerith.misao.image.io.Format
url
 
Constructor Summary
RawGray(java.net.URL url)
          Constructs a RawGray with URL.
 
Method Summary
 java.lang.String getName()
          Gets the name of the image format.
 MonoImage read()
          Reads image file and creates image buffer.
 void save(MonoImage image)
          Saves image buffer into an image file.
 void save(MonoImage image, LevelAdjustmentSet set)
          Saves an image buffer into an image file, using the specified LevelAdjustmentSet.
 
Methods inherited from class net.aerith.misao.image.io.Format
create, create, getTruncatedFilename, isFits, setURL
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

RawGray

public RawGray(java.net.URL url)
Constructs a RawGray with URL.
Parameters:
url - the URL of the 8-bit raw gray image file.
Method Detail

getName

public java.lang.String getName()
Gets the name of the image format.
Overrides:
getName in class Format
Returns:
the name of the image format.

read

public MonoImage read()
               throws java.io.IOException,
                      UnsupportedBufferTypeException,
                      UnsupportedFileTypeException
Reads image file and creates image buffer. The url of the image file must be set previously.
Overrides:
read in class Format
Returns:
the monochrome image buffer.
Throws:
java.io.IOException - if I/O error occurs.
UnsupportedBufferTypeException - if the data type is unsupported.
UnsupportedFileTypeException - if the file type is unsupported.

save

public void save(MonoImage image)
          throws java.io.IOException,
                 UnsupportedBufferTypeException,
                 UnsupportedFileTypeException
Saves image buffer into an image file. The url of the image file must be set previously.
Overrides:
save in class Format
Parameters:
image - the monochrome image buffer to save.
Throws:
java.io.IOException - if I/O error occurs.
UnsupportedBufferTypeException - if the data type is unsupported.
UnsupportedFileTypeException - if the file type is unsupported.

save

public void save(MonoImage image,
                 LevelAdjustmentSet set)
          throws java.io.IOException,
                 UnsupportedFileTypeException
Saves an image buffer into an image file, using the specified LevelAdjustmentSet. The url of the image file must be set previously.
Specified by:
save in interface Bitmap
Parameters:
image - the monochrome image buffer to save.
Throws:
java.io.IOException - if I/O error occurs.
UnsupportedFileTypeException - if the file type is unsupported.