se.datadosen.imaging.exif
Class ImageInfoFormatter

java.lang.Object
  extended by se.datadosen.imaging.exif.ImageInfoFormatter
All Implemented Interfaces:
java.io.Serializable

public class ImageInfoFormatter
extends java.lang.Object
implements java.io.Serializable

Formats raw EXIF metadata in a display-friendly way.

See Also:
Serialized Form

Field Summary
protected static TagFormatter commentFormatter
          This formatter makes sure that a comment is ALWAYS a string.
protected  TagFormatter dateFormatter
           
protected static TagFormatter floatFormatter
           
protected static TagFormatter meterFormatter
           
protected  TagFormatter millimeter35EqFormatter
           
protected static TagFormatter millimeterFormatter
           
protected static TagFormatter secondFormatter
           
 
Constructor Summary
ImageInfoFormatter()
           
ImageInfoFormatter(com.drew.metadata.Metadata info)
           
 
Method Summary
 java.lang.Object format(int tagType)
          Format the specified tagType to the most natural form This version requires a Metadata object to be passed to the constructor
 java.lang.Object format(java.lang.Object data, int tagType)
          Format the specified tagType to the most natural form
 java.text.DateFormat getDateFormat()
           
static void main(java.lang.String[] args)
          Command line method, for testing.
static java.util.Date parseExifDate(java.lang.String exifDate)
           
 void put(int tagType, TagFormatter tf)
           
protected static float roundOneDec(float f)
           
 void setDateFormat(java.text.DateFormat df)
           
 void setMetadata(com.drew.metadata.Metadata info)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

meterFormatter

protected static TagFormatter meterFormatter

millimeterFormatter

protected static TagFormatter millimeterFormatter

millimeter35EqFormatter

protected TagFormatter millimeter35EqFormatter

floatFormatter

protected static TagFormatter floatFormatter

commentFormatter

protected static TagFormatter commentFormatter
This formatter makes sure that a comment is ALWAYS a string. Will be an Integer for numeric data otherwize. (Bugfix since 4.2.2)


secondFormatter

protected static TagFormatter secondFormatter

dateFormatter

protected TagFormatter dateFormatter
Constructor Detail

ImageInfoFormatter

public ImageInfoFormatter()

ImageInfoFormatter

public ImageInfoFormatter(com.drew.metadata.Metadata info)
Method Detail

roundOneDec

protected static float roundOneDec(float f)

setDateFormat

public void setDateFormat(java.text.DateFormat df)

getDateFormat

public java.text.DateFormat getDateFormat()

setMetadata

public void setMetadata(com.drew.metadata.Metadata info)

parseExifDate

public static java.util.Date parseExifDate(java.lang.String exifDate)

put

public void put(int tagType,
                TagFormatter tf)

format

public java.lang.Object format(java.lang.Object data,
                               int tagType)
                        throws com.drew.metadata.MetadataException
Format the specified tagType to the most natural form

Parameters:
data -
tagType -
Returns:
Throws:
com.drew.metadata.MetadataException
Since:
v5.2

format

public java.lang.Object format(int tagType)
                        throws com.drew.metadata.MetadataException
Format the specified tagType to the most natural form This version requires a Metadata object to be passed to the constructor

Parameters:
tagType -
Returns:
Throws:
com.drew.metadata.MetadataException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Command line method, for testing.

Parameters:
args -
Throws:
java.lang.Exception