public class TIFFImageEncoder extends ImageEncoderImpl
output, param| Constructor and Description |
|---|
TIFFImageEncoder(java.io.OutputStream output,
ImageEncodeParam param) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(java.awt.image.RenderedImage im)
Encodes a RenderedImage and writes the output to the
OutputStream associated with this ImageEncoder.
|
java.lang.Object |
encodeMultiple(java.lang.Object context,
java.awt.image.RenderedImage img)
Encodes a RenderedImage as part of a multi-page file and writes the output to the
OutputStream associated with this ImageEncoder.
|
void |
finishMultiple(java.lang.Object context)
Signals the encoder that you've finished sending pages for a multi-page image files.
|
encode, getOutputStream, getParam, setParampublic TIFFImageEncoder(java.io.OutputStream output,
ImageEncodeParam param)
public void encode(java.awt.image.RenderedImage im)
throws java.io.IOException
encode in interface ImageEncoderencode in class ImageEncoderImpljava.io.IOExceptionpublic java.lang.Object encodeMultiple(java.lang.Object context,
java.awt.image.RenderedImage img)
throws java.io.IOException
When you sent all pages, make sure you call finishMultiple() in the end. Otherwise, the generated file will be corrupted.
context - the context object you receive as return value to a previous call to
encodeMultiple(). Set null for the first image.img - the imagejava.io.IOException - In case of an I/O errorpublic void finishMultiple(java.lang.Object context)
throws java.io.IOException
context - the context object you receive as return value to a previous call to
encodeMultiple()java.io.IOException - In case of an I/O errorCopyright 1999-2025 The Apache Software Foundation. All Rights Reserved.