public class TiffParser extends Object implements Serializable
A TIFF IFD consists of a set of TIFFField tags. Methods are provided to query the set of tags and to obtain the raw field array. In addition, convenience methods are provided for acquiring the values of tags that contain a single value that fits into a byte, int, long, float, or double.
Every TIFF file is made up of one or more public IFDs that are joined in a linked list, rooted in the file header. A file may also contain so-called private IFDs that are referenced from tag data and do not appear in the main list.
This class is not a committed part of the JAI API. It may be removed or changed in future releases of JAI.
TiffField
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
COMPRESSION_CCITTFAX3 |
static int |
COMPRESSION_CCITTFAX4 |
static int |
TIFFTAG_COMPRESSION |
static int |
TIFFTAG_IMAGELENGTH |
static int |
TIFFTAG_IMAGEWIDTH |
static int |
TIFFTAG_ROWSPERSTRIP |
static int |
TIFFTAG_STRIPBYTECOUNTS |
static int |
TIFFTAG_STRIPOFFSETS |
static int |
TIFFTAG_TILEWIDTH |
Constructor and Description |
---|
TiffParser(com.pd4ml.util.RandomAccessArray stream,
int directory) |
TiffParser(com.pd4ml.util.RandomAccessArray stream,
long ifd_offset,
int directory) |
Modifier and Type | Method and Description |
---|---|
static long[] |
getArrayLongShort(TiffParser dir,
int tag) |
TiffField |
getField(int tag) |
byte |
getFieldAsByte(int tag) |
byte |
getFieldAsByte(int tag,
int index) |
double |
getFieldAsDouble(int tag) |
double |
getFieldAsDouble(int tag,
int index) |
float |
getFieldAsFloat(int tag) |
float |
getFieldAsFloat(int tag,
int index) |
long |
getFieldAsLong(int tag) |
long |
getFieldAsLong(int tag,
int index) |
TiffField[] |
getFields() |
long |
getIFDOffset() |
long |
getNextIFDOffset() |
static int |
getNumDirectories(com.pd4ml.util.RandomAccessArray stream) |
int |
getNumEntries() |
int[] |
getTags() |
boolean |
isBigEndian() |
boolean |
isTagPresent(int tag) |
public static final int TIFFTAG_IMAGEWIDTH
public static final int TIFFTAG_IMAGELENGTH
public static final int TIFFTAG_COMPRESSION
public static final int COMPRESSION_CCITTFAX3
public static final int COMPRESSION_CCITTFAX4
public static final int TIFFTAG_STRIPOFFSETS
public static final int TIFFTAG_ROWSPERSTRIP
public static final int TIFFTAG_STRIPBYTECOUNTS
public static final int TIFFTAG_TILEWIDTH
public TiffParser(com.pd4ml.util.RandomAccessArray stream, int directory) throws IOException
IOException
public TiffParser(com.pd4ml.util.RandomAccessArray stream, long ifd_offset, int directory) throws IOException
IOException
public int getNumEntries()
public TiffField getField(int tag)
public boolean isTagPresent(int tag)
public int[] getTags()
public TiffField[] getFields()
public byte getFieldAsByte(int tag, int index)
public byte getFieldAsByte(int tag)
public long getFieldAsLong(int tag, int index)
public long getFieldAsLong(int tag)
public float getFieldAsFloat(int tag, int index)
public float getFieldAsFloat(int tag)
public double getFieldAsDouble(int tag, int index)
public double getFieldAsDouble(int tag)
public static int getNumDirectories(com.pd4ml.util.RandomAccessArray stream) throws IOException
IOException
public boolean isBigEndian()
public long getIFDOffset()
public long getNextIFDOffset()
public static long[] getArrayLongShort(TiffParser dir, int tag)
Revision 4.0.15 / 20220727-0149