public class TIFFImageFileDirectory extends java.lang.Object implements TIFFConstants
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
artist |
private int |
bitsPerPixel |
private int |
bitsPerRow |
private int[] |
bitsPerSample |
private int |
bytesBetweenSamples |
private int |
bytesPerRow |
private int[] |
bytesPerSample |
private int |
compression |
private java.lang.String |
copyright |
private java.util.Date |
date |
private java.lang.String |
dateTime |
private int |
dpiX |
private int |
dpiY |
private int[] |
extraSamples |
private int |
height |
private int |
horizontalTiles |
private java.lang.String |
hostComputer |
private java.lang.String |
imageDescription |
private int |
imageType |
private boolean |
invertGraySamples |
private java.lang.String |
make |
private java.lang.String |
model |
private int |
numStrips |
private int |
numTiles |
private int |
orientation |
private Palette |
palette |
private int |
photometricInterpretation |
private int |
pixelsPerRow |
private int |
planarConfiguration |
private int |
predictor |
private int |
resolutionUnit |
private double |
resolutionX |
private double |
resolutionY |
private int |
rowsPerStrip |
private int |
samplesPerPixel |
private int[] |
sampleTypes |
private java.lang.String |
software |
private java.util.Vector |
stripByteCounts |
private java.util.Vector |
stripOffsets |
private int |
t4Options |
private int |
t6Options |
private java.util.Vector |
tags |
private java.util.Vector |
tileByteCounts |
private int |
tileHeight |
private java.util.Vector |
tileOffsets |
private int |
tileWidth |
private java.util.TimeZone |
timeZone |
static int |
TYPE_BILEVEL_BYTE |
static int |
TYPE_BILEVEL_PACKED |
static int |
TYPE_CMYK32_INTERLEAVED |
static int |
TYPE_CMYK32_PLANAR |
static int |
TYPE_GRAY16 |
static int |
TYPE_GRAY4 |
static int |
TYPE_GRAY8 |
static int |
TYPE_LOGL |
static int |
TYPE_LOGLUV32_INTERLEAVED |
static int |
TYPE_PALETTED4 |
static int |
TYPE_PALETTED8 |
static int |
TYPE_RGB24_INTERLEAVED |
static int |
TYPE_RGB48_INTERLEAVED |
private int |
verticalTiles |
private int |
width |
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 and Description |
---|
TIFFImageFileDirectory()
Initializes all members to null or -1 and creates an internal list for
the tags that will be make up this directory.
|
Modifier and Type | Method and Description |
---|---|
void |
append(TIFFTag tag)
Adds a tag to the end of the internal list of tags.
|
private void |
checkContent() |
int |
computeNumBytes(int numPixels)
TODO: regard extra samples
|
java.lang.String |
getArtist()
Returns information on the person who created the image
(as stored in tag
TIFFConstants.TAG_ARTIST ). |
int |
getBitsPerPixel()
Returns the number of bits per pixel (not including transparency information).
|
int |
getByteCount(int tileIndex)
Returns the number of compressed byte for a given tile.
|
int |
getBytesPerRow() |
int |
getCompression()
Returns the compression method, encoded as a number as found in
TIFFConstants (more specifically, the COMPRESSION_xyz constants). |
static java.lang.String |
getCompressionName(int method)
Returns the name of a TIFF compression method.
|
java.lang.String |
getCopyright() |
java.util.Date |
getDateTime()
If a date / time tag was found in this image file directory and
initFromTags(boolean) was called already, it was attempted to
create a Date object from it. |
java.lang.String |
getDateTimeString()
If there was a date / time tag in this IFD, its String value
is returned.
|
int |
getDpiX() |
int |
getDpiY() |
int |
getHeight() |
java.lang.String |
getHostComputer() |
java.lang.String |
getImageDescription() |
int |
getImageType() |
java.lang.String |
getModel() |
int |
getNumHorizontalTiles() |
int |
getNumStrips() |
int |
getNumTiles() |
int |
getNumVerticalTiles() |
Palette |
getPalette() |
int |
getPhotometricInterpretation() |
int |
getPredictor() |
int |
getRowsPerStrip() |
int |
getSamplesPerPixel() |
java.lang.String |
getSoftware() |
java.util.Vector |
getStripOffsets() |
int |
getT4Options() |
int |
getT6Options() |
int |
getTileHeight() |
long |
getTileOffset(int tileIndex) |
int |
getTileWidth() |
int |
getTileX1(int tileIndex) |
int |
getTileX2(int tileIndex) |
int |
getTileY1(int tileIndex) |
int |
getTileY2(int tileIndex) |
int |
getWidth() |
void |
initFromTags(boolean check) |
void |
initMembers() |
boolean |
isGrayscale() |
boolean |
isPaletted() |
boolean |
isStriped()
Returns
true if the image belonging to this IFD
is stored as strips, false otherwise. |
boolean |
isTiled()
Returns
true if the image belonging to this IFD
is stored as tiles, false otherwise. |
void |
setTimeZone(java.util.TimeZone tz)
Sets the time zone to be used when trying to interpret dates
found in a
TIFFConstants.TAG_DATE_TIME tag. |
public static final int TYPE_BILEVEL_PACKED
public static final int TYPE_GRAY4
public static final int TYPE_GRAY8
public static final int TYPE_GRAY16
public static final int TYPE_PALETTED4
public static final int TYPE_PALETTED8
public static final int TYPE_RGB24_INTERLEAVED
public static final int TYPE_RGB48_INTERLEAVED
public static final int TYPE_BILEVEL_BYTE
public static final int TYPE_CMYK32_INTERLEAVED
public static final int TYPE_CMYK32_PLANAR
public static final int TYPE_LOGLUV32_INTERLEAVED
public static final int TYPE_LOGL
private java.lang.String artist
private int[] bitsPerSample
private int bitsPerPixel
private int bitsPerRow
private int bytesBetweenSamples
private int[] bytesPerSample
private int bytesPerRow
private int compression
private java.lang.String copyright
private java.util.Date date
private java.lang.String dateTime
private int dpiX
private int dpiY
private int[] extraSamples
private int height
private int horizontalTiles
private java.lang.String hostComputer
private java.lang.String imageDescription
private int imageType
private boolean invertGraySamples
private java.lang.String make
private java.lang.String model
private int numStrips
private int numTiles
private int orientation
private Palette palette
private int pixelsPerRow
private int planarConfiguration
private int photometricInterpretation
private int predictor
private int[] sampleTypes
private int resolutionUnit
private double resolutionX
private double resolutionY
private int rowsPerStrip
private int samplesPerPixel
private java.lang.String software
private java.util.Vector stripByteCounts
private java.util.Vector stripOffsets
private int t4Options
private int t6Options
private java.util.Vector tags
private java.util.Vector tileByteCounts
private java.util.Vector tileOffsets
private java.util.TimeZone timeZone
private int tileWidth
private int tileHeight
private int verticalTiles
private int width
public TIFFImageFileDirectory()
public void append(TIFFTag tag)
tag
- the TIFFTag instance to be appendedprivate void checkContent() throws InvalidFileStructureException, UnsupportedTypeException
public int computeNumBytes(int numPixels)
public java.lang.String getArtist()
TIFFConstants.TAG_ARTIST
).public int getBitsPerPixel()
public int getByteCount(int tileIndex)
tileIndex
- zero-based index of tile or strip for which the number of compressed bytes is to be returnedpublic int getBytesPerRow()
public int getCompression()
TIFFConstants
(more specifically, the COMPRESSION_xyz constants).
Use getCompressionName(int)
to get the English name
of this compression method.public static java.lang.String getCompressionName(int method)
getCompression()
.method
- the compression method numberpublic java.lang.String getCopyright()
public java.util.Date getDateTime()
initFromTags(boolean)
was called already, it was attempted to
create a Date
object from it.
This object (or null
) is returned.
Use setTimeZone(java.util.TimeZone)
to provide a time zone before the date
parsing is done.getDateTimeString()
public java.lang.String getDateTimeString()
getDateTime()
public int getDpiX()
public int getDpiY()
public int getHeight()
public java.lang.String getHostComputer()
public java.lang.String getImageDescription()
public int getImageType()
public java.lang.String getModel()
public int getNumHorizontalTiles()
public int getNumStrips()
public int getNumTiles()
public int getNumVerticalTiles()
public Palette getPalette()
public int getPhotometricInterpretation()
public int getPredictor()
public int getRowsPerStrip()
public int getSamplesPerPixel()
public java.lang.String getSoftware()
public java.util.Vector getStripOffsets()
public int getT4Options()
public int getT6Options()
public int getTileHeight()
public long getTileOffset(int tileIndex)
public int getTileWidth()
public int getTileX1(int tileIndex)
public int getTileX2(int tileIndex)
public int getTileY1(int tileIndex)
public int getTileY2(int tileIndex)
public int getWidth()
public void initMembers()
public void initFromTags(boolean check) throws InvalidFileStructureException, UnsupportedTypeException
public boolean isGrayscale()
public boolean isPaletted()
public boolean isStriped()
true
if the image belonging to this IFD
is stored as strips, false
otherwise.isTiled()
public boolean isTiled()
true
if the image belonging to this IFD
is stored as tiles, false
otherwise.isStriped()
public void setTimeZone(java.util.TimeZone tz)
TIFFConstants.TAG_DATE_TIME
tag.
Example call:
setTimeZone(TimeZone.getTimeZone("America/New_York");
.tz
- TimeZone object