@lodev09/react-native-exify 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![CI](https://github.com/lodev09/react-native-exify/actions/workflows/ci.yml/badge.svg)](https://github.com/lodev09/react-native-exify/actions/workflows/ci.yml)
4
4
  ![NPM Downloads](https://img.shields.io/npm/dw/%40lodev09%2Freact-native-exify)
5
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/lodev09/react-native-exify)
5
6
 
6
7
  A simple library to read and write image Exif metadata for your React Native Apps. 🏷️
7
8
 
@@ -133,7 +133,14 @@ class ExifyModule(
133
133
 
134
134
  ReadableType.Number -> {
135
135
  when (valType) {
136
- "double" -> exif.setAttribute(tag, tags.getDouble(tag).toBigDecimal().toPlainString())
136
+ "double" -> {
137
+ val value = tags.getDouble(tag)
138
+ if (tag.startsWith("GPS")) {
139
+ exif.setAttribute(tag, ExifyUtils.decimalToRational(value))
140
+ } else {
141
+ exif.setAttribute(tag, value.toBigDecimal().toPlainString())
142
+ }
143
+ }
137
144
  else -> exif.setAttribute(tag, tags.getDouble(tag).toInt().toString())
138
145
  }
139
146
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lodev09/react-native-exify",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Read and write exif data from/into an image",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",