com.drew.metadata.exif
Class ExifThumbnailDirectory

java.lang.Object
  extended by com.drew.metadata.Directory
      extended by com.drew.metadata.exif.ExifThumbnailDirectory

public class ExifThumbnailDirectory
extends Directory

One of several Exif directories. Otherwise known as IFD1, this directory holds information about an embedded thumbnail image.

Author:
Drew Noakes http://drewnoakes.com

Field Summary
protected static HashMap<Integer,String> _tagNameMap
           
static int TAG_BITS_PER_SAMPLE
          When image format is no compression, this value shows the number of bits per component for each pixel.
static int TAG_ORIENTATION
           
static int TAG_PHOTOMETRIC_INTERPRETATION
          Shows the color space of the image data components.
static int TAG_PLANAR_CONFIGURATION
           
static int TAG_REFERENCE_BLACK_WHITE
           
static int TAG_RESOLUTION_UNIT
           
static int TAG_ROWS_PER_STRIP
          The raster is codified by a single block of data holding this many rows.
static int TAG_SAMPLES_PER_PIXEL
          Each pixel is composed of this many samples.
static int TAG_STRIP_BYTE_COUNTS
          The size of the raster data in bytes.
static int TAG_STRIP_OFFSETS
          The position in the file of raster data.
static int TAG_THUMBNAIL_COMPRESSION
          Shows compression method for Thumbnail.
static int TAG_THUMBNAIL_IMAGE_HEIGHT
           
static int TAG_THUMBNAIL_IMAGE_WIDTH
           
static int TAG_THUMBNAIL_LENGTH
          The size of the thumbnail image data in bytes.
static int TAG_THUMBNAIL_OFFSET
          The offset to thumbnail image bytes.
static int TAG_X_RESOLUTION
          When image format is no compression YCbCr, this value shows byte aligns of YCbCr data.
static int TAG_Y_RESOLUTION
           
static int TAG_YCBCR_COEFFICIENTS
           
static int TAG_YCBCR_POSITIONING
           
static int TAG_YCBCR_SUBSAMPLING
           
 
Fields inherited from class com.drew.metadata.Directory
_definedTagList, _descriptor, _tagMap
 
Constructor Summary
ExifThumbnailDirectory()
           
 
Method Summary
 String getName()
          Provides the name of the directory, for display purposes.
protected  HashMap<Integer,String> getTagNameMap()
          Provides the map of tag names, hashed by tag type identifier.
 byte[] getThumbnailData()
           
 boolean hasThumbnailData()
           
 void setThumbnailData(byte[] data)
           
 void writeThumbnail(String filename)
           
 
Methods inherited from class com.drew.metadata.Directory
addError, containsTag, getBoolean, getBooleanObject, getByteArray, getDate, getDate, getDescription, getDouble, getDoubleObject, getErrorCount, getErrors, getFloat, getFloatObject, getInt, getIntArray, getInteger, getLong, getLongObject, getObject, getRational, getRationalArray, getString, getString, getStringArray, getTagCount, getTagName, getTags, hasErrors, setBoolean, setByteArray, setDate, setDescriptor, setDouble, setDoubleArray, setFloat, setFloatArray, setInt, setIntArray, setLong, setObject, setObjectArray, setRational, setRationalArray, setString, setStringArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_THUMBNAIL_IMAGE_WIDTH

public static final int TAG_THUMBNAIL_IMAGE_WIDTH
See Also:
Constant Field Values

TAG_THUMBNAIL_IMAGE_HEIGHT

public static final int TAG_THUMBNAIL_IMAGE_HEIGHT
See Also:
Constant Field Values

TAG_BITS_PER_SAMPLE

public static final int TAG_BITS_PER_SAMPLE
When image format is no compression, this value shows the number of bits per component for each pixel. Usually this value is '8,8,8'.

See Also:
Constant Field Values

TAG_THUMBNAIL_COMPRESSION

public static final int TAG_THUMBNAIL_COMPRESSION
Shows compression method for Thumbnail. 1 = Uncompressed 2 = CCITT 1D 3 = T4/Group 3 Fax 4 = T6/Group 4 Fax 5 = LZW 6 = JPEG (old-style) 7 = JPEG 8 = Adobe Deflate 9 = JBIG B&W 10 = JBIG Color 32766 = Next 32771 = CCIRLEW 32773 = PackBits 32809 = Thunderscan 32895 = IT8CTPAD 32896 = IT8LW 32897 = IT8MP 32898 = IT8BL 32908 = PixarFilm 32909 = PixarLog 32946 = Deflate 32947 = DCS 34661 = JBIG 34676 = SGILog 34677 = SGILog24 34712 = JPEG 2000 34713 = Nikon NEF Compressed

See Also:
Constant Field Values

TAG_PHOTOMETRIC_INTERPRETATION

public static final int TAG_PHOTOMETRIC_INTERPRETATION
Shows the color space of the image data components. 0 = WhiteIsZero 1 = BlackIsZero 2 = RGB 3 = RGB Palette 4 = Transparency Mask 5 = CMYK 6 = YCbCr 8 = CIELab 9 = ICCLab 10 = ITULab 32803 = Color Filter Array 32844 = Pixar LogL 32845 = Pixar LogLuv 34892 = Linear Raw

See Also:
Constant Field Values

TAG_STRIP_OFFSETS

public static final int TAG_STRIP_OFFSETS
The position in the file of raster data.

See Also:
Constant Field Values

TAG_ORIENTATION

public static final int TAG_ORIENTATION
See Also:
Constant Field Values

TAG_SAMPLES_PER_PIXEL

public static final int TAG_SAMPLES_PER_PIXEL
Each pixel is composed of this many samples.

See Also:
Constant Field Values

TAG_ROWS_PER_STRIP

public static final int TAG_ROWS_PER_STRIP
The raster is codified by a single block of data holding this many rows.

See Also:
Constant Field Values

TAG_STRIP_BYTE_COUNTS

public static final int TAG_STRIP_BYTE_COUNTS
The size of the raster data in bytes.

See Also:
Constant Field Values

TAG_X_RESOLUTION

public static final int TAG_X_RESOLUTION
When image format is no compression YCbCr, this value shows byte aligns of YCbCr data. If value is '1', Y/Cb/Cr value is chunky format, contiguous for each subsampling pixel. If value is '2', Y/Cb/Cr value is separated and stored to Y plane/Cb plane/Cr plane format.

See Also:
Constant Field Values

TAG_Y_RESOLUTION

public static final int TAG_Y_RESOLUTION
See Also:
Constant Field Values

TAG_PLANAR_CONFIGURATION

public static final int TAG_PLANAR_CONFIGURATION
See Also:
Constant Field Values

TAG_RESOLUTION_UNIT

public static final int TAG_RESOLUTION_UNIT
See Also:
Constant Field Values

TAG_THUMBNAIL_OFFSET

public static final int TAG_THUMBNAIL_OFFSET
The offset to thumbnail image bytes.

See Also:
Constant Field Values

TAG_THUMBNAIL_LENGTH

public static final int TAG_THUMBNAIL_LENGTH
The size of the thumbnail image data in bytes.

See Also:
Constant Field Values

TAG_YCBCR_COEFFICIENTS

public static final int TAG_YCBCR_COEFFICIENTS
See Also:
Constant Field Values

TAG_YCBCR_SUBSAMPLING

public static final int TAG_YCBCR_SUBSAMPLING
See Also:
Constant Field Values

TAG_YCBCR_POSITIONING

public static final int TAG_YCBCR_POSITIONING
See Also:
Constant Field Values

TAG_REFERENCE_BLACK_WHITE

public static final int TAG_REFERENCE_BLACK_WHITE
See Also:
Constant Field Values

_tagNameMap

protected static final HashMap<Integer,String> _tagNameMap
Constructor Detail

ExifThumbnailDirectory

public ExifThumbnailDirectory()
Method Detail

getName

public String getName()
Description copied from class: Directory
Provides the name of the directory, for display purposes. E.g. Exif

Specified by:
getName in class Directory
Returns:
the name of the directory

getTagNameMap

protected HashMap<Integer,String> getTagNameMap()
Description copied from class: Directory
Provides the map of tag names, hashed by tag type identifier.

Specified by:
getTagNameMap in class Directory
Returns:
the map of tag names

hasThumbnailData

public boolean hasThumbnailData()

getThumbnailData

public byte[] getThumbnailData()

setThumbnailData

public void setThumbnailData(byte[] data)

writeThumbnail

public void writeThumbnail(String filename)
                    throws MetadataException,
                           IOException
Throws:
MetadataException
IOException


Copyright © 2012. All Rights Reserved.