Class TiffDirectory
- java.lang.Object
-
- org.apache.commons.imaging.formats.tiff.TiffElement
-
- org.apache.commons.imaging.formats.tiff.TiffDirectory
-
public class TiffDirectory extends TiffElement
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TiffDirectory.ImageDataElement
-
Nested classes/interfaces inherited from class org.apache.commons.imaging.formats.tiff.TiffElement
TiffElement.DataElement, TiffElement.Stub
-
-
Field Summary
Fields Modifier and Type Field Description List<TiffField>
entries
long
nextDirectoryOffset
int
type
-
Fields inherited from class org.apache.commons.imaging.formats.tiff.TiffElement
COMPARATOR, length, offset
-
-
Constructor Summary
Constructors Constructor Description TiffDirectory(int type, List<TiffField> entries, long offset, long nextDirectoryOffset)
-
Method Summary
-
-
-
Method Detail
-
description
public String description()
-
getElementDescription
public String getElementDescription()
- Specified by:
getElementDescription
in classTiffElement
-
description
public static String description(int type)
-
dump
public void dump()
-
hasJpegImageData
public boolean hasJpegImageData() throws ImageReadException
- Throws:
ImageReadException
-
hasTiffImageData
public boolean hasTiffImageData() throws ImageReadException
- Throws:
ImageReadException
-
getTiffImage
public BufferedImage getTiffImage(ByteOrder byteOrder) throws ImageReadException, IOException
- Throws:
ImageReadException
IOException
-
getTiffImage
public BufferedImage getTiffImage(ByteOrder byteOrder, Map<String,Object> params) throws ImageReadException, IOException
- Throws:
ImageReadException
IOException
-
findField
public TiffField findField(TagInfo tag) throws ImageReadException
- Throws:
ImageReadException
-
findField
public TiffField findField(TagInfo tag, boolean failIfMissing) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public Object getFieldValue(TagInfo tag) throws ImageReadException
- Throws:
ImageReadException
-
getSingleFieldValue
public String getSingleFieldValue(TagInfoAscii tag) throws ImageReadException
- Throws:
ImageReadException
-
getSingleFieldValue
public int getSingleFieldValue(TagInfoShortOrLong tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public byte getFieldValue(TagInfoByte tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public byte[] getFieldValue(TagInfoBytes tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public String[] getFieldValue(TagInfoAscii tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public short getFieldValue(TagInfoShort tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public short[] getFieldValue(TagInfoShorts tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public int getFieldValue(TagInfoLong tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public int[] getFieldValue(TagInfoLongs tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public int[] getFieldValue(TagInfoShortOrLong tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public RationalNumber getFieldValue(TagInfoRational tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public RationalNumber[] getFieldValue(TagInfoRationals tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public byte getFieldValue(TagInfoSByte tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public byte[] getFieldValue(TagInfoSBytes tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public short getFieldValue(TagInfoSShort tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public short[] getFieldValue(TagInfoSShorts tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public int getFieldValue(TagInfoSLong tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public int[] getFieldValue(TagInfoSLongs tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public RationalNumber getFieldValue(TagInfoSRational tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public RationalNumber[] getFieldValue(TagInfoSRationals tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public float getFieldValue(TagInfoFloat tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public float[] getFieldValue(TagInfoFloats tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public double getFieldValue(TagInfoDouble tag) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public double[] getFieldValue(TagInfoDoubles tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public String getFieldValue(TagInfoGpsText tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getFieldValue
public String getFieldValue(TagInfoXpString tag, boolean mustExist) throws ImageReadException
- Throws:
ImageReadException
-
getTiffRawImageDataElements
public List<TiffDirectory.ImageDataElement> getTiffRawImageDataElements() throws ImageReadException
- Throws:
ImageReadException
-
imageDataInStrips
public boolean imageDataInStrips() throws ImageReadException
- Throws:
ImageReadException
-
getJpegRawImageDataElement
public TiffDirectory.ImageDataElement getJpegRawImageDataElement() throws ImageReadException
- Throws:
ImageReadException
-
setTiffImageData
public void setTiffImageData(TiffImageData rawImageData)
-
getTiffImageData
public TiffImageData getTiffImageData()
-
setJpegImageData
public void setJpegImageData(JpegImageData value)
-
getJpegImageData
public JpegImageData getJpegImageData()
-
-