https://github.com/Tommy-Geenexus/exif-interface-extended
AndroidX ExifInterface with an extended API
https://github.com/Tommy-Geenexus/exif-interface-extended
android exif library
Last synced: about 2 months ago
JSON representation
AndroidX ExifInterface with an extended API
- Host: GitHub
- URL: https://github.com/Tommy-Geenexus/exif-interface-extended
- Owner: Tommy-Geenexus
- License: apache-2.0
- Created: 2020-12-04T08:33:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T13:50:05.000Z (5 months ago)
- Last Synced: 2025-01-06T14:46:43.547Z (5 months ago)
- Topics: android, exif, library
- Language: Java
- Homepage:
- Size: 6.77 MB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-list - Tommy-Geenexus/exif-interface-extended - AndroidX ExifInterface with an extended API (Java)
README
[](https://opensource.org/licenses/Apache-2.0)
[](https://github.com/Tommy-Geenexus/exif-interface-extended/actions?query=workflow%3A%22Instrumentation+Tests%22)
[](https://maven-badges.herokuapp.com/maven-central/io.github.tommy-geenexus/exif-interface-extended)
# exif-interface-extended
This library
- includes the full [AndroidX ExifInterface](https://developer.android.com/reference/androidx/exifinterface/media/ExifInterface) API,
without major behavioral changes*- is kept in sync with [AndroidX ExifInterface](https://developer.android.com/reference/androidx/exifinterface/media/ExifInterface)
*Minor changes include bug fixes as well as additional sanity checks for I/O operations. Major changes were made only to reading metadata from JPEG, PNG or WebP images, where additional metadata (XMP for PNG/WebP, ExtendedXMP/Photoshop for JPEG, ICC profile for JPEG/PNG/WebP) will be recognized.
## Usage
```kotlin
implementation("io.github.tommy-geenexus:exif-interface-extended:1.0.4")
```## API Examples
**Save the JPEG, PNG or WebP image without metadata**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
exifInterfaceExtended.saveExclusive(source, sink, preserveOrientation)
```**Check whether the JPEG, PNG or WebP image has attributes**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
val hasAttributes = exifInterfaceExtended.hasAttributes(ignoreImageWidthAndLength)
```**Check whether the JPEG, PNG or WebP image contains XMP metadata**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
val hasXmp = exifInterfaceExtended.hasXmp()
```**Check whether the JPEG image contains ExtendedXMP metadata**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
val hasExtendedXmp = exifInterfaceExtended.hasExtendedXmp()
```**Check whether the JPEG image contains Photoshop metadata**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
val hasPhotoshopImageResources = exifInterfaceExtended.hasPhotoshopImageResources()
```**Check whether the JPEG, PNG or WebP image contains an embedded ICC profile**
```kotlin
val exifInterfaceExtended = ExifInterfaceExtended(source)
val hasIccProfile = exifInterfaceExtended.hasIccProfile()
```