Class GIFEncoder
java.lang.Object
is.galia.codec.AbstractImageIOEncoder
is.galia.codec.gif.GIFEncoder
- All Implemented Interfaces:
Encoder,AutoCloseable
Implementation wrapping the default JDK Image I/O GIF
ImageWriter.- See Also:
-
Field Summary
Fields inherited from class is.galia.codec.AbstractImageIOEncoder
arena, encode, iioWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMetadata(IIOMetadataNode baseTree) Embeds metadata fromAbstractImageIOEncoder.encodeinto the given tree.voidencode(BufferedImageSequence sequence, OutputStream outputStream) Encodes the given image sequence to the given stream.voidencode(RenderedImage image, OutputStream outputStream) Encodes the given image to the given stream.protected org.slf4j.Loggerprotected String[]N.B.: This method returns a list of strings rather thanclassesbecause some readers reside under the com.sun package, which is encapsulated in Java 9.Methods inherited from class is.galia.codec.AbstractImageIOEncoder
close, getMetadata, setArena, setEncode
-
Constructor Details
-
GIFEncoder
public GIFEncoder()
-
-
Method Details
-
addMetadata
Description copied from class:AbstractImageIOEncoderEmbeds metadata from
AbstractImageIOEncoder.encodeinto the given tree.Writers for formats that don't support metadata may simply do nothing.
- Specified by:
addMetadatain classAbstractImageIOEncoder- Parameters:
baseTree- Tree to embed the metadata into.
-
getLogger
protected org.slf4j.Logger getLogger()- Specified by:
getLoggerin classAbstractImageIOEncoder
-
getPreferredIIOImplementations
Description copied from class:AbstractImageIOEncoderN.B.: This method returns a list of strings rather thanclassesbecause some readers reside under the com.sun package, which is encapsulated in Java 9.- Specified by:
getPreferredIIOImplementationsin classAbstractImageIOEncoder- Returns:
- Plugins preferred by the application, in order of most to least preferred, or an empty array if there is no preference.
-
getSupportedFormats
- Specified by:
getSupportedFormatsin interfaceEncoder- Returns:
- All formats supported by the instance. Note that the
implementation must create the instances from scratch and
not obtain them from the
format registry, which may be empty at the time this method is invoked.
-
encode
Description copied from interface:EncoderEncodes the given image to the given stream.- Specified by:
encodein interfaceEncoder- Parameters:
image- Image to write.outputStream- Stream to write the image to, which will not be closed.- Throws:
IOException
-
encode
Description copied from interface:EncoderEncodes the given image sequence to the given stream.
The default implementation throws
UnsupportedOperationException.- Specified by:
encodein interfaceEncoder- Parameters:
sequence- Image sequence to write.outputStream- Stream to write the image to, which will not be closed.- Throws:
IOException
-