|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.sun.media.imageio.plugins.tiff.TIFFCompressor
An abstract superclass for pluggable TIFF compressors.
| Field Summary | |
protected IIOMetadata |
metadata
The IIOMetadata object containing metadata for the
current image. |
protected ImageOutputStream |
stream
The ImageOutputStream to be written. |
protected ImageWriter |
writer
The ImageWriter calling this
TIFFCompressor. |
| Constructor Summary | |
TIFFCompressor()
|
|
| Method Summary | |
abstract int |
encode(byte[] b,
int off,
int width,
int height,
int[] bitsPerSample,
int scanlineStride)
Encodes the supplied image data, writing to the currently set ImageOutputStream. |
IIOMetadata |
getMetadata()
Returns the current IIOMetadata object. |
ImageOutputStream |
getStream()
Returns the ImageOutputStream that will be written. |
ImageWriter |
getWriter()
Returns the current ImageWriter. |
void |
setMetadata(IIOMetadata metadata)
Sets the value of the metadata field. |
void |
setStream(ImageOutputStream stream)
Sets the ImageOutputStream to be written. |
void |
setWriter(ImageWriter writer)
Sets the value of the writer field. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected ImageWriter writer
ImageWriter calling this
TIFFCompressor.
protected IIOMetadata metadata
IIOMetadata object containing metadata for the
current image.
protected ImageOutputStream stream
ImageOutputStream to be written.
| Constructor Detail |
public TIFFCompressor()
| Method Detail |
public void setStream(ImageOutputStream stream)
ImageOutputStream to be written.
stream - an ImageOutputStream to be written.getStream()public ImageOutputStream getStream()
ImageOutputStream that will be written.
ImageOutputStream.setStream(ImageOutputStream)public void setWriter(ImageWriter writer)
writer field.
writer - the current ImageWriter.getWriter()public ImageWriter getWriter()
ImageWriter.
ImageWriter.setWriter(ImageWriter)public void setMetadata(IIOMetadata metadata)
metadata field.
metadata - the IIOMetadata object for the
image being written.getMetadata()public IIOMetadata getMetadata()
IIOMetadata object.
IIOMetadata object for the image being
written.setMetadata(IIOMetadata)
public abstract int encode(byte[] b,
int off,
int width,
int height,
int[] bitsPerSample,
int scanlineStride)
throws IOException
ImageOutputStream.
b - an array of bytes containing the packed
but uncompressed image data.off - the starting offset of the data to be written in the
array b.width - the width of the rectangle of pixels to be written.height - the height of the rectangle of pixels to be written.bitsPerSample - an array of ints indicting
the number of bits used to represent each image sample within
a pixel.scanlineStride - the number of bytes separating each
row of the input data.
IOException - if the supplied data cannot be encoded by
this TIFFCompressor, or if any I/O error occurs
during writing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||