Class TIFFEncoder
java.lang.Object
is.galia.codec.AbstractImageIOEncoder
is.galia.codec.tiff.TIFFEncoder
- All Implemented Interfaces:
Encoder,AutoCloseable
Implementation wrapping the default JDK Image I/O TIFF
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 baseNode) No-op.voidencode(RenderedImage image, OutputStream outputStream) Writes the given image to the given output stream.protected org.slf4j.Loggerprotected IIOMetadatagetMetadata(ImageWriteParam writeParam, RenderedImage image) protected 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, setArena, setEncode
-
Constructor Details
-
TIFFEncoder
public TIFFEncoder()
-
-
Method Details
-
addMetadata
No-op.- Specified by:
addMetadatain classAbstractImageIOEncoder- Parameters:
baseNode- Tree to embed the metadata into.- See Also:
-
getLogger
protected org.slf4j.Logger getLogger()- Specified by:
getLoggerin classAbstractImageIOEncoder
-
getMetadata
protected IIOMetadata getMetadata(ImageWriteParam writeParam, RenderedImage image) throws IOException - Overrides:
getMetadatain classAbstractImageIOEncoder- Parameters:
writeParam- Write parameters on which to base the metadata.image- Image to apply the metadata to.- Returns:
- Image metadata with added metadata corresponding to any writer-specific operations applied.
- Throws:
IOException
-
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
Writes the given image to the given output stream.- Specified by:
encodein interfaceEncoder- Parameters:
image- Image to write.outputStream- Stream to write the image to.- Throws:
IOException
-