fi.faidon.jis
Class TIFFImageSaver

java.lang.Object
  |
  +--fi.faidon.jis.ImageSaverInterface
        |
        +--fi.faidon.jis.TIFFImageSaver
All Implemented Interfaces:
java.awt.image.ImageConsumer, java.io.Serializable

public class TIFFImageSaver
extends ImageSaverInterface
implements java.io.Serializable, java.awt.image.ImageConsumer

Class for saving an image in the TIFF format. Only uncompressed supported for the moment.

See Also:
Serialized Form

Field Summary
static java.lang.String FORMAT_CODE
           
static java.lang.String FORMAT_COMPLETE_NAME
           
static java.lang.String FORMAT_EXTENSION
           
 
Fields inherited from class fi.faidon.jis.ImageSaverInterface
saveImage, savePath
 
Fields inherited from interface java.awt.image.ImageConsumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
 
Constructor Summary
TIFFImageSaver()
           
 
Method Summary
 int checkSave()
          Return ImageObserver constants for indicating the state of the image saving.
 java.lang.String getFormatCode()
          ImageSaverInterface method implementations.
 java.lang.String getFormatExtension()
           
 java.lang.String getFormatString()
           
 void imageComplete(int status)
          Get imageComplete message so that we can close the output file.
 boolean saveIt()
          Save the image.
 void setColorModel(java.awt.image.ColorModel model)
           
 void setDimensions(int w, int h)
          Override the source image's dimensions and pass the dimensions of the rectangular cropped region to the ImageConsumer.
 void setHints(int hintflags)
           
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, byte[] pixels, int off, int scansize)
          Write the pixels into the file as RGB data.
 void setPixels(int x, int y, int w, int h, java.awt.image.ColorModel model, int[] pixels, int off, int scansize)
          Write the pixels into the file as RGB data.
 void setProperties(java.util.Hashtable props)
          ImageConsumer method implementations.
 
Methods inherited from class fi.faidon.jis.ImageSaverInterface
getSaveImage, getSavePath, setSaveImage, setSavePath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_CODE

public static final java.lang.String FORMAT_CODE
See Also:
Constant Field Values

FORMAT_COMPLETE_NAME

public static final java.lang.String FORMAT_COMPLETE_NAME
See Also:
Constant Field Values

FORMAT_EXTENSION

public static final java.lang.String FORMAT_EXTENSION
See Also:
Constant Field Values
Constructor Detail

TIFFImageSaver

public TIFFImageSaver()
Method Detail

getFormatCode

public java.lang.String getFormatCode()
ImageSaverInterface method implementations.

Specified by:
getFormatCode in class ImageSaverInterface

getFormatString

public java.lang.String getFormatString()
Specified by:
getFormatString in class ImageSaverInterface

getFormatExtension

public java.lang.String getFormatExtension()
Specified by:
getFormatExtension in class ImageSaverInterface

saveIt

public boolean saveIt()
Save the image.

Specified by:
saveIt in class ImageSaverInterface

checkSave

public int checkSave()
Return ImageObserver constants for indicating the state of the image saving.

Specified by:
checkSave in class ImageSaverInterface

setProperties

public void setProperties(java.util.Hashtable props)
ImageConsumer method implementations.

Specified by:
setProperties in interface java.awt.image.ImageConsumer

setHints

public void setHints(int hintflags)
Specified by:
setHints in interface java.awt.image.ImageConsumer

setColorModel

public void setColorModel(java.awt.image.ColorModel model)
Specified by:
setColorModel in interface java.awt.image.ImageConsumer

setDimensions

public void setDimensions(int w,
                          int h)
Override the source image's dimensions and pass the dimensions of the rectangular cropped region to the ImageConsumer.

Specified by:
setDimensions in interface java.awt.image.ImageConsumer
See Also:
ImageConsumer.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
Write the pixels into the file as RGB data.

Specified by:
setPixels in interface java.awt.image.ImageConsumer
See Also:
ImageConsumer.

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      java.awt.image.ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
Write the pixels into the file as RGB data.

Specified by:
setPixels in interface java.awt.image.ImageConsumer
See Also:
ImageConsumer.

imageComplete

public void imageComplete(int status)
Get imageComplete message so that we can close the output file.

Specified by:
imageComplete in interface java.awt.image.ImageConsumer
See Also:
ImageConsumer.