]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - src/tim/prune/jpeg/InternalExifLibrary.java
Moved source into separate src directory due to popular request
[GpsPrune.git] / src / tim / prune / jpeg / InternalExifLibrary.java
diff --git a/src/tim/prune/jpeg/InternalExifLibrary.java b/src/tim/prune/jpeg/InternalExifLibrary.java
new file mode 100644 (file)
index 0000000..377155f
--- /dev/null
@@ -0,0 +1,28 @@
+package tim.prune.jpeg;
+
+import java.io.File;
+
+import tim.prune.jpeg.drew.ExifReader;
+import tim.prune.jpeg.drew.ExifException;
+
+/**
+ * Class to act as an entry point to the internal exif library functions.
+ * This should be the only class with dependence on the jpeg.drew package.
+ */
+public class InternalExifLibrary
+{
+       /**
+        * Use the _internal_ exif library to get the data from the given file
+        * @param inFile file to access
+        * @return Jpeg data if available, otherwise null
+        */
+       public JpegData getJpegData(File inFile)
+       {
+               JpegData data = null;
+               try {
+                       data = ExifReader.readMetadata(inFile);
+               }
+               catch (ExifException jpe) {} // data remains null
+               return data;
+       }
+}