public abstract class ImageWriterBase
extends javax.imageio.ImageWriter
| Modifier and Type | Field and Description |
|---|---|
protected javax.imageio.stream.ImageOutputStream |
imageOutput
For convenience.
|
| Modifier | Constructor and Description |
|---|---|
protected |
ImageWriterBase(javax.imageio.spi.ImageWriterSpi provider)
Constructs an
ImageWriter and sets its
originatingProvider instance variable to the
supplied value. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertOutput()
Makes sure output is set.
|
javax.imageio.metadata.IIOMetadata |
convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData,
javax.imageio.ImageWriteParam param)
Returns
null |
void |
dispose() |
protected static java.awt.image.BufferedImage |
fakeAOI(java.awt.image.BufferedImage pImage,
javax.imageio.ImageWriteParam pParam)
Utility method for getting the area of interest (AOI) of an image.
|
protected static java.awt.Image |
fakeSubsampling(java.awt.Image pImage,
javax.imageio.ImageWriteParam pParam)
Utility method for getting the subsampled image.
|
javax.imageio.metadata.IIOMetadata |
getDefaultStreamMetadata(javax.imageio.ImageWriteParam param)
Returns
null |
java.lang.String |
getFormatName() |
protected static java.awt.Rectangle |
getSourceRegion(javax.imageio.ImageWriteParam pParam,
int pWidth,
int pHeight) |
void |
reset() |
protected void |
resetMembers() |
void |
setOutput(java.lang.Object output) |
abort, abortRequested, addIIOWriteProgressListener, addIIOWriteWarningListener, canInsertEmpty, canInsertImage, canRemoveImage, canReplaceImageMetadata, canReplacePixels, canReplaceStreamMetadata, canWriteEmpty, canWriteRasters, canWriteSequence, clearAbortRequest, convertImageMetadata, endInsertEmpty, endReplacePixels, endWriteEmpty, endWriteSequence, getAvailableLocales, getDefaultImageMetadata, getDefaultWriteParam, getLocale, getNumThumbnailsSupported, getOriginatingProvider, getOutput, getPreferredThumbnailSizes, prepareInsertEmpty, prepareReplacePixels, prepareWriteEmpty, prepareWriteSequence, processImageComplete, processImageProgress, processImageStarted, processThumbnailComplete, processThumbnailProgress, processThumbnailStarted, processWarningOccurred, processWarningOccurred, processWriteAborted, removeAllIIOWriteProgressListeners, removeAllIIOWriteWarningListeners, removeIIOWriteProgressListener, removeIIOWriteWarningListener, removeImage, replaceImageMetadata, replacePixels, replacePixels, replaceStreamMetadata, setLocale, write, write, write, writeInsert, writeToSequenceprotected javax.imageio.stream.ImageOutputStream imageOutput
ImageInputStream.setOutput(Object)protected ImageWriterBase(javax.imageio.spi.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.public java.lang.String getFormatName()
throws java.io.IOException
java.io.IOExceptionpublic void setOutput(java.lang.Object output)
setOutput in class javax.imageio.ImageWriterprotected void assertOutput()
java.lang.IllegalStateException - if getOutput() == null.public void dispose()
dispose in class javax.imageio.ImageWriterpublic void reset()
reset in class javax.imageio.ImageWriterprotected void resetMembers()
public javax.imageio.metadata.IIOMetadata getDefaultStreamMetadata(javax.imageio.ImageWriteParam param)
nullgetDefaultStreamMetadata in class javax.imageio.ImageWriterparam - ignored.null.public javax.imageio.metadata.IIOMetadata convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData,
javax.imageio.ImageWriteParam param)
nullconvertStreamMetadata in interface javax.imageio.ImageTranscoderconvertStreamMetadata in class javax.imageio.ImageWriterinData - ignored.param - ignored.null.protected static java.awt.Rectangle getSourceRegion(javax.imageio.ImageWriteParam pParam,
int pWidth,
int pHeight)
protected static java.awt.image.BufferedImage fakeAOI(java.awt.image.BufferedImage pImage,
javax.imageio.ImageWriteParam pParam)
IIOParam.setSourceRegion(java.awt.Rectangle)
method.
Note: If it is possible for the writer to write the AOI directly, such a
method should be used instead, for efficiency.pImage - the image to get AOI frompParam - the param optionally specifying the AOIBufferedImage containing the area of interest (source
region), or the original image, if no source region was set, or
pParam was nullprotected static java.awt.Image fakeSubsampling(java.awt.Image pImage,
javax.imageio.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 writer to subsample directly, such a
method should be used instead, for efficiency.pImage - the image to subsamplepParam - the param optionally specifying subsamplingImage containing the subsampled image, or the
original image, if no subsampling was specified, or
pParam was nullCopyright © 2018. All Rights Reserved.