TIFFConstants
public class TIFFTag extends Object implements TIFFConstants
TIFFConstants
for a list of allowed valuesTIFFConstants
TIFFCodec
for more details.TIFFImageFileDirectory
Modifier and Type | Field | Description |
---|---|---|
private int |
count |
|
private int |
id |
|
private Vector |
objects |
|
private int |
offset |
|
private int |
type |
COMPRESSION_CCITT_GROUP3_1D_MODIFIED_HUFFMAN, COMPRESSION_CCITT_T4, COMPRESSION_CCITT_T6, COMPRESSION_DEFLATED_INOFFICIAL, COMPRESSION_DEFLATED_OFFICIAL, COMPRESSION_JBIG, COMPRESSION_JBIG2, COMPRESSION_JPEG_6_0, COMPRESSION_JPEG_POST_6_0, COMPRESSION_LZW, COMPRESSION_NEXT, COMPRESSION_NONE, COMPRESSION_NONE_WORD_ALIGNED, COMPRESSION_PACKBITS, COMPRESSION_SGI_LOG_24_PACKED, COMPRESSION_SGI_LOG_RLE, COMPRESSION_THUNDERSCAN, PHOTOMETRIC_BLACK_IS_ZERO, PHOTOMETRIC_LOGL, PHOTOMETRIC_PALETTED, PHOTOMETRIC_TRUECOLOR_CMYK, PHOTOMETRIC_TRUECOLOR_LOGLUV, PHOTOMETRIC_TRUECOLOR_RGB, PHOTOMETRIC_WHITE_IS_ZERO, PLANAR_CONFIGURATION_CHUNKY, PLANAR_CONFIGURATION_PLANAR, TAG_ARTIST, TAG_BAD_FAX_LINES, TAG_BITS_PER_SAMPLE, TAG_CELL_LENGTH, TAG_CELL_WIDTH, TAG_CLEAN_FAX_DATA, TAG_COLOR_MAP, TAG_COMPRESSION, TAG_CONSECUTIVE_BAD_FAX_LINES, TAG_COPYRIGHT, TAG_DATE_TIME, TAG_DOCUMENT_NAME, TAG_EXTRA_SAMPLES, TAG_FILL_ORDER, TAG_FREE_BYTE_COUNTS, TAG_FREE_OFFSETS, TAG_GRAY_RESPONSE_CURVE, TAG_GRAY_RESPONSE_UNIT, TAG_HOST_COMPUTER, TAG_IMAGE_DESCRIPTION, TAG_IMAGE_LENGTH, TAG_IMAGE_WIDTH, TAG_LENGTH, TAG_MAKE, TAG_MAX_SAMPLE_VALUE, TAG_MIN_SAMPLE_VALUE, TAG_MODEL, TAG_NEW_SUBFILE_TYPE, TAG_ORIENTATION, TAG_PHOTOMETRIC_INTERPRETATION, TAG_PHOTOSHOP_IMAGE_RESOURCES, TAG_PLANAR_CONFIGURATION, TAG_PREDICTOR, TAG_RESOLUTION_UNIT, TAG_RESOLUTION_X, TAG_RESOLUTION_Y, TAG_ROWS_PER_STRIP, TAG_SAMPLES_PER_PIXEL, TAG_SOFTWARE, TAG_STRIP_BYTE_COUNTS, TAG_STRIP_OFFSETS, TAG_T4_OPTIONS, TAG_T6_OPTIONS, TAG_TILE_BYTE_COUNTS, TAG_TILE_HEIGHT, TAG_TILE_OFFSETS, TAG_TILE_WIDTH, TAG_TYPE_ASCII, TAG_TYPE_BYTE, TAG_TYPE_DOUBLE, TAG_TYPE_FLOAT, TAG_TYPE_LONG, TAG_TYPE_RATIONAL, TAG_TYPE_SBYTE, TAG_TYPE_SHORT, TAG_TYPE_SLONG, TAG_TYPE_SRATIONAL, TAG_TYPE_SSHORT, TAG_TYPE_UNDEFINED
Constructor | Description |
---|---|
TIFFTag(int id,
int type,
int count,
int offset) |
Creates a new tag with the given ID, type, number of objects / primitives stored in it
and offset value.
|
TIFFTag(int id,
int type,
int count,
int offset,
Vector vector) |
Modifier and Type | Method | Description |
---|---|---|
int |
getCount() |
Returns the number of items stored in this tag.
|
int |
getElementAsInt(int index) |
Returns an item stored in this tag an
int value. |
int |
getId() |
Returns the ID of this tag, which may be one of the TAG_xyz constants.
|
Object |
getObject(int index) |
Returns an object from this tag's Vector of items,
or
null if no such Vector exists. |
int |
getOffset() |
Returns the offset value stored in this tag.
|
String |
getString() |
If this tag has a Vector of items and if the first item
is a String, that String is returned,
null
otherwise. |
int |
getType() |
Returns the type of this tag's content as a TAG_TYPE_xyz constant.
|
Vector |
getVector() |
Returns the Vector encapsulating the items stored in this tag.
|
boolean |
isInt() |
Returns if the value(s) stored in this tag are of type BYTE, SHORT or
LONG.
|
void |
setVector(Vector vector) |
If this tag encapsulates more than one item or a single
item that does not fit into four bytes, this Vector
will store all elements in it.
|
private int id
private int type
private int count
private int offset
private Vector objects
public TIFFTag(int id, int type, int count, int offset)
public TIFFTag(int id, int type, int count, int offset, Vector vector)
public int getCount()
public int getElementAsInt(int index)
int
value.index
- zero-based index of the integer item to be returnedpublic int getId()
public Object getObject(int index)
null
if no such Vector exists.public int getOffset()
public String getString()
null
otherwise.public int getType()
public Vector getVector()
setVector(java.util.Vector)
public boolean isInt()
int
in Java.public void setVector(Vector vector)
vector
- the Vector with the items to be encapsulated by this taggetVector()