@lodev09/react-native-exify 1.0.0 → 1.0.2
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
|
[](https://github.com/lodev09/react-native-exify/actions/workflows/ci.yml)
|
|
4
4
|

|
|
5
|
+
[](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" ->
|
|
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
|
}
|
|
@@ -112,7 +112,7 @@ val EXIFY_TAGS =
|
|
|
112
112
|
arrayOf("double", ExifInterface.TAG_GPS_DEST_LONGITUDE),
|
|
113
113
|
arrayOf("string", ExifInterface.TAG_GPS_DEST_LONGITUDE_REF),
|
|
114
114
|
arrayOf("int", ExifInterface.TAG_GPS_DIFFERENTIAL),
|
|
115
|
-
arrayOf("
|
|
115
|
+
arrayOf("double", ExifInterface.TAG_GPS_H_POSITIONING_ERROR),
|
|
116
116
|
arrayOf("double", ExifInterface.TAG_GPS_IMG_DIRECTION),
|
|
117
117
|
arrayOf("string", ExifInterface.TAG_GPS_IMG_DIRECTION_REF),
|
|
118
118
|
arrayOf("string", ExifInterface.TAG_GPS_LATITUDE_REF),
|
|
@@ -15,7 +15,7 @@ export interface ExifTags {
|
|
|
15
15
|
GPSDifferential?: number;
|
|
16
16
|
GPSDestLatitudeRef?: string;
|
|
17
17
|
GPSDestDistanceRef?: string;
|
|
18
|
-
GPSHPositioningError?:
|
|
18
|
+
GPSHPositioningError?: number;
|
|
19
19
|
GPSDestDistance?: number;
|
|
20
20
|
GPSDestBearing?: number;
|
|
21
21
|
GPSDateStamp?: string;
|
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface ExifTags {
|
|
|
15
15
|
GPSDifferential?: number;
|
|
16
16
|
GPSDestLatitudeRef?: string;
|
|
17
17
|
GPSDestDistanceRef?: string;
|
|
18
|
-
GPSHPositioningError?:
|
|
18
|
+
GPSHPositioningError?: number;
|
|
19
19
|
GPSDestDistance?: number;
|
|
20
20
|
GPSDestBearing?: number;
|
|
21
21
|
GPSDateStamp?: string;
|