About the Support ExifInterface
Version 25.1.0 of the Android Support library has debuted a new
com.android.support:exifinterface artifact, which offers a standalone
ExifInterface, a Java class for reading the EXIF
tags from JPEG and raw files.
If that class name sounds familiar, that is because:
in May, I suggested moving
ExifInterfaceinto Android Support, to provide
InputStreamas a data source, to better work with
in September, I suggested moving
ExifInterfaceinto Android Support, to give us an implementation that was free of the security bug that Tim Strazzere uncovered
ExifInterface is not showing up in
the online Android developer documentation.
Also, there are no JavaDocs in the Android Support Repository (the
JavaDocs JAR is effectively empty). Hopefully,
this is a temporary hiccup.
Based on eyeballing the source to
it seems like they matched the API of the Android 7.0
This solves two problems:
We now have an
ExifInterfaceconstructor that takes an
This implementation is pure Java, and so it avoids the buggy JHEAD implementation that was the source of the security flaw
Note though that this class — and its SDK counterpart —
offers a limited API compared with
elsewhere in the AOSP. In particular:
You cannot modify the thumbnail image
You cannot save modified EXIF tags, thumbnails, etc. to a different JPEG file than the one that you started with
Hence, you may find yourself still needing to use a separate EXIF parser, just to get needed functionality.
That being said, though, the
ExifInterface in the the Android Support
library is a welcome addition, and I am very grateful to the engineers
who took the time to create it!