exifreader 4.3.0 → 4.5.0
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 +10 -0
- package/exif-reader.d.ts +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -94,6 +94,8 @@ Usage
|
|
|
94
94
|
|
|
95
95
|
### Importing
|
|
96
96
|
|
|
97
|
+
*NOTE: See React Native instructions below.*
|
|
98
|
+
|
|
97
99
|
ES module syntax:
|
|
98
100
|
|
|
99
101
|
```javascript
|
|
@@ -165,6 +167,14 @@ directions on how to use the library.
|
|
|
165
167
|
|
|
166
168
|
#### Using React Native
|
|
167
169
|
|
|
170
|
+
Import ExifReader like this:
|
|
171
|
+
|
|
172
|
+
```javascript
|
|
173
|
+
import ExifReader from './node_modules/exifreader/src/exif-reader.js';
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Make sure to update the path to point to where your `node_modules` is located.
|
|
177
|
+
|
|
168
178
|
For local files on the device you need to load the file yourself first, then
|
|
169
179
|
pass in the buffer to ExifReader. Here is a template from user @hungdev:
|
|
170
180
|
|
package/exif-reader.d.ts
CHANGED
|
@@ -179,6 +179,9 @@ interface MPFImageTags {
|
|
|
179
179
|
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer): Tags & XmpTags & IccTags;
|
|
180
180
|
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded: true}): ExpandedTags;
|
|
181
181
|
export function load(data: ArrayBuffer | SharedArrayBuffer | Buffer, options: {expanded?: false}): Tags & XmpTags & IccTags;
|
|
182
|
+
export function load(data: string | File): Promise<Tags & XmpTags & IccTags>;
|
|
183
|
+
export function load(data: string | File, options: {expanded: true}): Promise<ExpandedTags>;
|
|
184
|
+
export function load(data: string | File, options: {expanded?: false}): Promise<Tags & XmpTags & IccTags>;
|
|
182
185
|
export function loadView(data: DataView): Tags & XmpTags & IccTags;
|
|
183
186
|
export function loadView(data: DataView, options: {expanded: true}): ExpandedTags;
|
|
184
187
|
export function loadView(data: DataView, options: {expanded?: false}): Tags & XmpTags & IccTags;
|
|
@@ -417,7 +420,9 @@ interface Tags {
|
|
|
417
420
|
'Size Mode'?: NumberArrayTag, // NumberTag
|
|
418
421
|
'Max Subfile Size'?: NumberArrayTag, // NumberTag
|
|
419
422
|
'ObjectData Size Announced'?: NumberArrayTag, // NumberTag
|
|
420
|
-
'Maximum ObjectData Size'?: NumberArrayTag // NumberTag
|
|
423
|
+
'Maximum ObjectData Size'?: NumberArrayTag, // NumberTag
|
|
424
|
+
|
|
425
|
+
'Thumbnail'?: ThumbnailTags
|
|
421
426
|
}
|
|
422
427
|
|
|
423
428
|
interface IccTags {
|