public class TIFFImageEncoder extends ImageEncoderImpl
output, param
Constructor and Description |
---|
TIFFImageEncoder(OutputStream output,
ImageEncodeParam param) |
Modifier and Type | Method and Description |
---|---|
void |
encode(RenderedImage im)
Encodes a RenderedImage and writes the output to the
OutputStream associated with this ImageEncoder.
|
Object |
encodeMultiple(Object context,
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(Object context)
Signals the encoder that you've finished sending pages for a multi-page image files.
|
encode, getOutputStream, getParam, setParam
public TIFFImageEncoder(OutputStream output, ImageEncodeParam param)
public void encode(RenderedImage im) throws IOException
encode
in interface ImageEncoder
encode
in class ImageEncoderImpl
IOException
public Object encodeMultiple(Object context, RenderedImage img) throws 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 imageIOException
- In case of an I/O errorpublic void finishMultiple(Object context) throws IOException
context
- the context object you receive as return value to a previous call to
encodeMultiple()IOException
- In case of an I/O errorCopyright © 2018 Apache Software Foundation. All rights reserved.