|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.imageio.ImageWriter
com.gif4j.imageio.GifImageWriter
Method Summary | |
javax.imageio.metadata.IIOMetadata |
convertImageMetadata(javax.imageio.metadata.IIOMetadata inData,
javax.imageio.ImageTypeSpecifier imageType,
javax.imageio.ImageWriteParam param)
Returns an IIOMetadata object that may be used for
encoding and optionally modified using its document interfaces
or other interfaces specific to the writer plug-in that will be
used for encoding.
|
javax.imageio.metadata.IIOMetadata |
convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData,
javax.imageio.ImageWriteParam param)
Returns an IIOMetadata object that may be used for
encoding and optionally modified using its document interfaces
or other interfaces specific to the writer plug-in that will be
used for encoding.
|
javax.imageio.metadata.IIOMetadata |
getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier imageType,
javax.imageio.ImageWriteParam param)
Returns an IIOMetadata object containing default
values for encoding an image of the given type. |
javax.imageio.metadata.IIOMetadata |
getDefaultStreamMetadata(javax.imageio.ImageWriteParam param)
Returns an IIOMetadata object containing default
values for encoding a stream of images. |
void |
setOutput(java.lang.Object output)
Sets the destination to the given ImageOutputStream or other Object .
|
void |
write(javax.imageio.metadata.IIOMetadata streamMetadata,
javax.imageio.IIOImage image,
javax.imageio.ImageWriteParam param)
Appends a complete image stream containing a single image and associated stream and image metadata and thumbnails to the output. |
Methods inherited from class javax.imageio.ImageWriter |
abort, addIIOWriteProgressListener, addIIOWriteWarningListener, canInsertEmpty, canInsertImage, canRemoveImage, canReplaceImageMetadata, canReplacePixels, canReplaceStreamMetadata, canWriteEmpty, canWriteRasters, canWriteSequence, dispose, endInsertEmpty, endReplacePixels, endWriteEmpty, endWriteSequence, getAvailableLocales, getDefaultWriteParam, getLocale, getNumThumbnailsSupported, getOriginatingProvider, getOutput, getPreferredThumbnailSizes, prepareInsertEmpty, prepareReplacePixels, prepareWriteEmpty, prepareWriteSequence, removeAllIIOWriteProgressListeners, removeAllIIOWriteWarningListeners, removeIIOWriteProgressListener, removeIIOWriteWarningListener, removeImage, replaceImageMetadata, replacePixels, replacePixels, replaceStreamMetadata, reset, setLocale, write, write, writeInsert, writeToSequence |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public javax.imageio.metadata.IIOMetadata getDefaultStreamMetadata(javax.imageio.ImageWriteParam param)
javax.imageio.ImageWriter
IIOMetadata
object containing default
values for encoding a stream of images. The contents of the
object may be manipulated using either the XML tree structure
returned by the IIOMetadata.getAsTree
method, an
IIOMetadataController
object, or via plug-in
specific interfaces, and the resulting data supplied to one of
the write
methods that take a stream metadata
parameter.
An optional ImageWriteParam
may be supplied
for cases where it may affect the structure of the stream
metadata.
If the supplied ImageWriteParam
contains
optional setting values not supported by this writer, they
will be ignored.
Writers that do not make use of stream metadata
(e.g., writers for single-image formats) should return
null
.
param
- an ImageWriteParam
that will be used to
encode the image, or null
.
IIOMetadata
object.public javax.imageio.metadata.IIOMetadata getDefaultImageMetadata(javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)
javax.imageio.ImageWriter
IIOMetadata
object containing default
values for encoding an image of the given type. The contents
of the object may be manipulated using either the XML tree
structure returned by the IIOMetadata.getAsTree
method, an IIOMetadataController
object, or via
plug-in specific interfaces, and the resulting data supplied to
one of the write
methods that take a stream
metadata parameter.
An optional ImageWriteParam
may be supplied
for cases where it may affect the structure of the image
metadata.
If the supplied ImageWriteParam
contains
optional setting values not supported by this writer, they
will be ignored.
imageType
- an ImageTypeSpecifier
indicating the
format of the image to be written later.param
- an ImageWriteParam
that will be used to
encode the image, or null
.
IIOMetadata
object.public javax.imageio.metadata.IIOMetadata convertStreamMetadata(javax.imageio.metadata.IIOMetadata inData, javax.imageio.ImageWriteParam param)
javax.imageio.ImageTranscoder
IIOMetadata
object that may be used for
encoding and optionally modified using its document interfaces
or other interfaces specific to the writer plug-in that will be
used for encoding.
An optional ImageWriteParam
may be supplied
for cases where it may affect the structure of the stream
metadata.
If the supplied ImageWriteParam
contains
optional setting values not understood by this writer or
transcoder, they will be ignored.
public javax.imageio.metadata.IIOMetadata convertImageMetadata(javax.imageio.metadata.IIOMetadata inData, javax.imageio.ImageTypeSpecifier imageType, javax.imageio.ImageWriteParam param)
javax.imageio.ImageTranscoder
IIOMetadata
object that may be used for
encoding and optionally modified using its document interfaces
or other interfaces specific to the writer plug-in that will be
used for encoding.
An optional ImageWriteParam
may be supplied
for cases where it may affect the structure of the image
metadata.
If the supplied ImageWriteParam
contains
optional setting values not understood by this writer or
transcoder, they will be ignored.
public void setOutput(java.lang.Object output)
javax.imageio.ImageWriter
ImageOutputStream
or other Object
.
The destination is assumed to be ready to accept data, and will
not be closed at the end of each write. This allows distributed
imaging applications to transmit a series of images over a
single network connection. If output
is
null
, any currently set output will be removed.
If output
is an
ImageOutputStream
, calls to the
write
, writeToSequence
, and
prepareWriteEmpty
/endWriteEmpty
methods will preserve the existing contents of the stream.
Other write methods, such as writeInsert
,
replaceStreamMetadata
,
replaceImageMetadata
, replacePixels
,
prepareInsertEmpty
/endInsertEmpty
,
and endWriteSequence
, require the full contents
of the stream to be readable and writable, and may alter any
portion of the stream.
Use of a general Object
other than an
ImageOutputStream
is intended for writers that
interact directly with an output device or imaging protocol.
The set of legal classes is advertised by the writer's service
provider's getOutputTypes
method; most writers
will return a single-element array containing only
ImageOutputStream.class
to indicate that they
accept only an ImageOutputStream
.
The default implementation sets the output
instance variable to the value of output
after
checking output
against the set of classes
advertised by the originating provider, if there is one.
output
- the ImageOutputStream
or other
Object
to use for future writing.ImageWriter.getOutput()
public void write(javax.imageio.metadata.IIOMetadata streamMetadata, javax.imageio.IIOImage image, javax.imageio.ImageWriteParam param) throws java.io.IOException
javax.imageio.ImageWriter
ImageOutputStream
, its existing
contents prior to the current seek position are not affected,
and need not be readable or writable.
The output must have been set beforehand using the
setOutput
method.
Stream metadata may optionally be supplied; if it is
null
, default stream metadata will be used.
If canWriteRasters
returns true
,
the IIOImage
may contain a Raster
source. Otherwise, it must contain a
RenderedImage
source.
The supplied thumbnails will be resized if needed, and any thumbnails in excess of the supported number will be ignored. If the format requires additional thumbnails that are not provided, the writer should generate them internally.
An ImageWriteParam
may
optionally be supplied to control the writing process. If
param
is null
, a default write param
will be used.
If the supplied ImageWriteParam
contains
optional setting values not supported by this writer, they
will be ignored.
streamMetadata
- an IIOMetadata
object representing
stream metadata, or null
to use default values.image
- an IIOImage
object containing an
image, thumbnails, and metadata to be written.param
- an ImageWriteParam
, or
null
to use a default
ImageWriteParam
.
java.io.IOException
- if an error occurs during writing.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |