|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.imageio.ImageWriter
com.twelvemonkeys.imageio.ImageWriterBase
public abstract class ImageWriterBase
Abstract base class for image writers.
| Field Summary | |
|---|---|
protected ImageOutputStream |
imageOutput
For convenience. |
| Fields inherited from class javax.imageio.ImageWriter |
|---|
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales |
| Constructor Summary | |
|---|---|
protected |
ImageWriterBase(ImageWriterSpi provider)
Constructs an ImageWriter and sets its
originatingProvider instance variable to the
supplied value. |
| Method Summary | |
|---|---|
protected void |
assertOutput()
Makes sure output is set. |
IIOMetadata |
convertStreamMetadata(IIOMetadata inData,
ImageWriteParam param)
Returns null |
protected static BufferedImage |
fakeAOI(BufferedImage pImage,
ImageWriteParam pParam)
Utility method for getting the area of interest (AOI) of an image. |
protected static Image |
fakeSubsampling(Image pImage,
ImageWriteParam pParam)
Utility method for getting the subsampled image. |
IIOMetadata |
getDefaultStreamMetadata(ImageWriteParam param)
Returns null |
String |
getFormatName()
|
protected static Rectangle |
getSourceRegion(ImageWriteParam pParam,
int pWidth,
int pHeight)
|
void |
reset()
|
protected void |
resetMembers()
|
void |
setOutput(Object output)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ImageOutputStream imageOutput
ImageInputStream.
setOutput(Object)| Constructor Detail |
|---|
protected ImageWriterBase(ImageWriterSpi provider)
ImageWriter and sets its
originatingProvider instance variable to the
supplied value.
Subclasses that make use of extensions should provide a
constructor with signature (ImageWriterSpi,
Object) in order to retrieve the extension object. If
the extension object is unsuitable, an
IllegalArgumentException should be thrown.
provider - the ImageWriterSpi that is constructing this object, or null.| Method Detail |
|---|
public String getFormatName()
throws IOException
IOExceptionpublic void setOutput(Object output)
setOutput in class ImageWriterprotected void assertOutput()
IllegalStateException - if getOutput() == null.public void reset()
reset in class ImageWriterprotected void resetMembers()
public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)
null
getDefaultStreamMetadata in class ImageWriterparam - ignored.
null.
public IIOMetadata convertStreamMetadata(IIOMetadata inData,
ImageWriteParam param)
null
convertStreamMetadata in interface ImageTranscoderconvertStreamMetadata in class ImageWriterinData - ignored.param - ignored.
null.
protected static Rectangle getSourceRegion(ImageWriteParam pParam,
int pWidth,
int pHeight)
protected static BufferedImage fakeAOI(BufferedImage pImage,
ImageWriteParam pParam)
IIOParam.setSourceRegion(java.awt.Rectangle)
method.
Note: If it is possible for the reader to read the AOI directly, such a
method should be used instead, for efficiency.
pImage - the image to get AOI frompParam - the param optionally specifying the AOI
BufferedImage containing the area of interest (source
region), or the original image, if no source region was set, or
pParam was null
protected static Image fakeSubsampling(Image pImage,
ImageWriteParam pParam)
IIOParam.setSourceSubsampling(int, int, int, int)
method.
NOTE: This method does not take the subsampling offsets into
consideration.
Note: If it is possible for the reader to subsample directly, such a
method should be used instead, for efficiency.
pImage - the image to subsamplepParam - the param optionally specifying subsampling
Image containing the subsampled image, or the
original image, if no subsampling was specified, or
pParam was null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||