org.apache.sanselan.sampleUsage
Class WriteExifMetadataExample

java.lang.Object
  extended by org.apache.sanselan.sampleUsage.WriteExifMetadataExample

public class WriteExifMetadataExample
extends java.lang.Object


Constructor Summary
WriteExifMetadataExample()
           
 
Method Summary
 void changeExifMetadata(java.io.File jpegImageFile, java.io.File dst)
          This example illustrates how to add/update EXIF metadata in a JPEG file.
 void removeExifMetadata(java.io.File jpegImageFile, java.io.File dst)
           
 void removeExifTag(java.io.File jpegImageFile, java.io.File dst)
          This example illustrates how to remove a tag (if present) from EXIF metadata in a JPEG file.
 void setExifGPSTag(java.io.File jpegImageFile, java.io.File dst)
          This example illustrates how to set the GPS values in JPEG EXIF metadata.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WriteExifMetadataExample

public WriteExifMetadataExample()
Method Detail

removeExifMetadata

public void removeExifMetadata(java.io.File jpegImageFile,
                               java.io.File dst)
                        throws java.io.IOException,
                               org.apache.sanselan.ImageReadException,
                               org.apache.sanselan.ImageWriteException
Throws:
java.io.IOException
org.apache.sanselan.ImageReadException
org.apache.sanselan.ImageWriteException

changeExifMetadata

public void changeExifMetadata(java.io.File jpegImageFile,
                               java.io.File dst)
                        throws java.io.IOException,
                               org.apache.sanselan.ImageReadException,
                               org.apache.sanselan.ImageWriteException
This example illustrates how to add/update EXIF metadata in a JPEG file.

Parameters:
jpegImageFile - A source image file.
dst - The output file.
Throws:
java.io.IOException
org.apache.sanselan.ImageReadException
org.apache.sanselan.ImageWriteException

removeExifTag

public void removeExifTag(java.io.File jpegImageFile,
                          java.io.File dst)
                   throws java.io.IOException,
                          org.apache.sanselan.ImageReadException,
                          org.apache.sanselan.ImageWriteException
This example illustrates how to remove a tag (if present) from EXIF metadata in a JPEG file. In this case, we remove the "aperture" tag from the EXIF metadata if present.

Parameters:
jpegImageFile - A source image file.
dst - The output file.
Throws:
java.io.IOException
org.apache.sanselan.ImageReadException
org.apache.sanselan.ImageWriteException

setExifGPSTag

public void setExifGPSTag(java.io.File jpegImageFile,
                          java.io.File dst)
                   throws java.io.IOException,
                          org.apache.sanselan.ImageReadException,
                          org.apache.sanselan.ImageWriteException
This example illustrates how to set the GPS values in JPEG EXIF metadata.

Parameters:
jpegImageFile - A source image file.
dst - The output file.
Throws:
java.io.IOException
org.apache.sanselan.ImageReadException
org.apache.sanselan.ImageWriteException


Copyright © 2007-2009. All Rights Reserved.