X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=src%2Ftim%2Fprune%2Fjpeg%2FInternalExifLibrary.java;fp=src%2Ftim%2Fprune%2Fjpeg%2FInternalExifLibrary.java;h=377155fd2f862fc1a30f040fda7a16c52273b505;hp=0000000000000000000000000000000000000000;hb=ce6f2161b8596f7018d6a76bff79bc9e571f35fd;hpb=2d8cb72e84d5cc1089ce77baf1e34ea3ea2f8465 diff --git a/src/tim/prune/jpeg/InternalExifLibrary.java b/src/tim/prune/jpeg/InternalExifLibrary.java new file mode 100644 index 0000000..377155f --- /dev/null +++ b/src/tim/prune/jpeg/InternalExifLibrary.java @@ -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; + } +}