public class TIFFWriter extends ImageWriter implements Updatable<java.lang.Integer>
| Modifier and Type | Field and Description |
|---|---|
static int |
FIRST_WRITE_OFFSET |
static int |
OFFSET_TO_WRITE_FIRST_IFD_OFFSET |
static int |
STREAM_HEAD |
| Constructor and Description |
|---|
TIFFWriter() |
TIFFWriter(ImageParam param) |
| Modifier and Type | Method and Description |
|---|---|
IFD |
getIFD()
Copy the internal IFD
|
ImageType |
getImageType() |
void |
update(java.lang.Integer stripLen)
A call back method used by encoders to update the strip
length for multiple strip TIFF images.
|
protected void |
write(int[] pixels,
int imageWidth,
int imageHeight,
java.io.OutputStream os)
Write a self-contained single page TIFF image
|
int |
writePage(java.awt.image.BufferedImage frame,
int pageNumber,
int maxNumber,
RandomAccessOutputStream randomOutStream,
int offset)
Write a single page to TIFF stream.
|
getImageParam, setImageParam, writepublic static final int OFFSET_TO_WRITE_FIRST_IFD_OFFSET
public static final int FIRST_WRITE_OFFSET
public static final int STREAM_HEAD
public TIFFWriter()
public TIFFWriter(ImageParam param)
public IFD getIFD()
one of the use case is inserting pages into existing TIFFs.
See for example TIFFTweaker.insertPage(java.awt.image.BufferedImage, int, com.icafe4j.io.RandomAccessOutputStream, java.util.List<com.icafe4j.image.tiff.IFD>, int, com.icafe4j.image.writer.TIFFWriter)
public ImageType getImageType()
getImageType in class ImageWriterpublic void update(java.lang.Integer stripLen)
protected void write(int[] pixels,
int imageWidth,
int imageHeight,
java.io.OutputStream os)
throws java.lang.Exception
write in class ImageWriterpixels - input image array in ARGB formatimageWidth - image widthimageHeight - image heightos - OutputSteam to write the imagejava.lang.Exceptionpublic int writePage(java.awt.image.BufferedImage frame,
int pageNumber,
int maxNumber,
RandomAccessOutputStream randomOutStream,
int offset)
throws java.lang.Exception
Instead of writing a self-contained TIFF image as write(int[], int, int, java.io.OutputStream) does,
this method writes a bare-bone single page as part of a multiple page TIFF.
frame - input BufferedImagerandomOutStream - RandomAccessOutputStreamoffset - stream offset to write this pagejava.lang.Exception