Exifinterface
Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
---|---|---|---|---|
November 13, 2024 | 1.3.7 | - | - | 1.4.0-alpha01 |
Declaring dependencies
To add a dependency on Exifinterface, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies { implementation "androidx.exifinterface:exifinterface:1.3.7" }
Kotlin
dependencies { implementation("androidx.exifinterface:exifinterface:1.3.7") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
Version 1.4
Version 1.4.0-alpha01
November 13, 2024
androidx.exifinterface:exifinterface:1.4.0-alpha01
is released. Version 1.4.0-alpha01 contains these commits.
New Features
- Add support for reading XMP data from HEIF images.
- Add support for reading Exif and XMP from AVIF images.
API Changes
- Indicate that the
location
param forsetGpsInfo
is@Nullable
and that passingnull
will result in a No-Op. (If924c, b/236484611)
Bug Fixes
- Continue parsing after encountering an invalid IFD offset (b/264729367).
- Handle WebP images which incorrectly contain a JPEG APP1 marker before their Exif data (b/281638358).
- Ensure XMP changes in JPEGs with a separate XMP segment are stored into the same separate XMP segment by
saveAttributes()
, instead of being written to TIFF/Exif tag 700 which is not supported by the XMP spec and where many tools won't find them. - Avoid duplicating XMP data from a separate segment into the TIFF preview directory when saving (b/309843390).
- Improve precision of double to rational conversions. (b/312680558).
- Accept rational format (x/y) to
setAttribute
for 'legacy' rational tags which are auto-converted to decimal when returned fromgetAttribute
(b/312680558). - Ensure XMP data added to a JPEG image which doesn't already contain XMP is written to a separate segment, as specified by the XMP spec.
ExifInterface
is documented to prefer the XMP in the Exif 700 tag in JPEG images (violating the spec), so this behavior is preserved when reading/writing images with existing XMP data. - Fix corrupted output when writing WebP images with a height or width greater than 8191px (b/342697059).
- This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler arguments to enforce correct usage:
-Xjspecify-annotations=strict, -Xtype-enhancement-improvements-strict-mode
(I5cd0f, b/326456246) - Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. (If6b4c, b/345472586)
Version 1.3.7
Version 1.3.7
December 13, 2023
androidx.exifinterface:exifinterface:1.3.7
is released. Version 1.3.7 contains these commits.
Bug Fixes
- Throw an exception from
ExifInterface.saveAttributes()
when trying to write a JPEG APP1 segment that's too large (previously we would write an invalid APP1 segment with an incorrect, truncated, length:(b/263747161)). Continue parsing after encountering an invalid IFD offset (previously parsing would halt immediately, which could result in incorrect values being returned: (b/264729367)).
Version 1.3.6
Version 1.3.6
February 8, 2023
androidx.exifinterface:exifinterface:1.3.6
is released. Version 1.3.6 contains these commits.
Bug Fixes
- Fix reading of alpha bit from WebP VP8L chunks (b/255405635).
Version 1.3.5
Version 1.3.5
October 24, 2022
androidx.exifinterface:exifinterface:1.3.5
is released. Version 1.3.5 contains these commits.
Bug Fixes
- Fix two cases of
saveAttributes()
producing invalid WebP files.
Version 1.3.4
Version 1.3.4
October 5, 2022
androidx.exifinterface:exifinterface:1.3.4
is released. Version 1.3.4 contains these commits.
Bug Fixes
- Remove support for saving attributes to DNG files. The support added in 1.3.3 was incomplete and produced corrupted files.
Version 1.3.3
Version 1.3.3
August 4, 2021
androidx.exifinterface:exifinterface:1.3.3
is released. Version 1.3.3 contains these commits.
Bug Fixes
- Fix parsing subsec-related tags. (aosp/1508143)
- Prevent RuntimeException when calling setDataSource. (c8e66e9)
- Prevent skipBytes from infinitely looping. (fdbe88b)
- Catch RuntimeException from MediaMetadataRetriever. (389b21a)
- Add support for saving attributes for DNG files (3017dbc)
- Replace non-thumbnail tags with thumbnail tags. (e1b916d)
Version 1.3.2
Version 1.3.2
December 2, 2020
androidx.exifinterface:exifinterface:1.3.2
is released. Version 1.3.2 contains these commits.
Bug Fixes
- Allows
SRATIONAL
forGPS_LATITUDE
andGPS_LONGITUDE
. - Added support for reading/writing a secondary format (2020-01-01 00:00:00) of the DateTime tag.
- Prevented the temporary removal of the origin file while calling saveAttribute().
Version 1.3.1
Version 1.3.1
October 14, 2020
androidx.exifinterface:exifinterface:1.3.1
is released. Version 1.3.1 contains these commits.
Bug Fixes
- Fix saveAttributes implementation to keep the image data in MediaProvider
Version 1.3.0
Version 1.3.0
September 16, 2020
androidx.exifinterface:exifinterface:1.3.0
is released. Version 1.3.0 contains these commits.
Major changes since 1.2.0
- Extended WebP EXIF writing support to include files that only contain VP8 or VP8L chunks.
- Removed unnecessary buffering, which was causing OutOfMemory exceptions for large image files.
- Removed
INVALID_DATE_TIME
. Instead useNULL
to return invalid datetime values. - Made
getGpsDateTime
returnLong.MIN_VALUE
instead of-1
for an invalid value.
Version 1.3.0-rc01
September 2, 2020
androidx.exifinterface:exifinterface:1.3.0-rc01
is released with no changes since 1.3.0-beta01
. Version 1.3.0-rc01 contains these commits.
Version 1.3.0-beta01
August 19, 2020
androidx.exifinterface:exifinterface:1.3.0-beta01
is released. Version 1.3.0-beta01 contains these commits.
New Features
- Extended WebP EXIF writing support to include files that only contain VP8 or VP8L chunks.
API Changes
- Removed
INVALID_DATE_TIME
. Instead useNULL
to return invalid datetime value.
Bug Fixes
- Made
getGpsDateTime
returnLong.MIN_VALUE
instead of-1
becuase-1
is a valid value - Made DateTime-related getters consider offset value (+/-) of date string.
- Removed unnecessary buffering, which was causing OutOfMemory exceptions for large image files.
- Set default locale to US
- Replaced adding “.tmp” for creating temp files to adding a prefix.
Version 1.3.0-alpha01
February 19, 2020
androidx.exifinterface:exifinterface:1.3.0-alpha01
is released. Version 1.3.0-alpha01 contains these commits.
API Changes
- Added a new method:
ExifInterface.getGpsDateTime()
Version 1.2.0
Version 1.2.0
April 1, 2020
androidx.exifinterface:exifinterface:1.2.0
is released. Version 1.2.0 contains these commits.
Major changes since 1.1.0
- Added support for adding EXIF to PNG files
- Added support for WebP files and EXIF data only stream
- Added an API to check if the specified mime type is supported
- Added more tags for offset time:
TAG_OFFSET_TIME
,TAF_OFFSET_TIME_DIGITIZED
, andTAG_OFFSET_TIME_ORIGINAL
Version 1.2.0-rc01
February 19, 2020
androidx.exifinterface:exifinterface:1.2.0-rc01
is released. Version 1.2.0-rc01 contains these commits.
Bug Fixes
- Fixed an issue where JPEG files were incorrected saved if the JPEG had XMP data
Version 1.2.0-beta01
December 18, 2019
androidx.exifinterface:exifinterface:1.2.0-beta01
is released. Version 1.2.0-beta01 contains these commits.
New features
- Added support for adding EXIF to PNG files
- Added support support for reading and writing EXIF from WebP files
- Added support for an EXIF data only stream
API changes
- Added an API to check if the specified mime type is supported
- Exposed the read and write OffsetTime* tags
Bug fixes
- Fixed an issue where the incorrect offsets were being returned for
getAttributeRange()
Version 1.1.0
Version 1.1.0
November 20, 2019
androidx.exifinterface:exifinterface:1.1.0
is released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
- Support for HEIF format and more XMP tags
- Added support for constructing an
ExifInterface
object from aFile
orFileDescriptor
- Added more methods for getting attribute:
hasAttribute
,getAttributeBytes
, andgetAttributesRange
Version 1.1.0-rc01
October 9, 2019
androidx.exifinterface:exifinterface:1.1.0-rc01
is released. Version 1.1.0-rc01 contains these commits.
Bug fixes
- Added a missing format name (IFD) to prevent an
ArrayIndexOutOfBoundsException
onloadAttributes
- Prevented the deletion of the origin file when an exception happens while calling
saveAttributes
- Fixed an exception issue when there is a call to
saveAttributes()
after overwriting a file.
Version 1.1.0-beta01
July 2, 2019
androidx.exifinterface:exifinterface:1.1.0-beta01
is released. The commits included in this version can be found here.
New features
- Throws
NullPointerException
whennull
is set for@NonNull
arguments - Support for XMP tags
API changes
- Added more methods for getting attribute info
hasAttribute
,getAttributeBytes
, andgetAttributesRange
Bug fixes
- Prevent file descriptor memory leak
Version 1.1.0-alpha01
March 13, 2019
androidx.exifinterface:exifinterface:1.1.0-alpha01
is released. The full list of commits included in this version can be found here.
New features
- Support HEIF format
API changes
- Added more constructors of ExifInterface
- Fixed Typo:
TAG_CAMARA_OWNER_NAME
->TAG_CAMERA_OWNER_NAME
Bug fixes
- Fixed the check of possible overflow for thumbnail image (aosp/748608)