@mapcatch/util 1.0.15-a → 2.0.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.
Files changed (80) hide show
  1. package/dist/catchUtil.min.esm.js +67981 -14008
  2. package/dist/catchUtil.min.js +2695 -55
  3. package/package.json +22 -3
  4. package/src/constants/annotation_color.js +7 -0
  5. package/src/constants/annotation_draw_style.js +228 -0
  6. package/src/constants/annotation_label_style.js +76 -0
  7. package/src/constants/annotation_style.js +118 -0
  8. package/src/constants/cameras.js +1 -1
  9. package/src/constants/crs.js +31473 -31473
  10. package/src/constants/error_codes.js +44 -0
  11. package/src/constants/height_colors.js +1 -0
  12. package/src/constants/index.js +9 -2
  13. package/src/constants/map_style.js +11 -0
  14. package/src/{event.js → event/event.js} +1 -14
  15. package/src/event/event_bus.js +5 -0
  16. package/src/event/index.js +2 -0
  17. package/src/gl-operations/constants.js +9 -11
  18. package/src/gl-operations/default_options.js +5 -5
  19. package/src/gl-operations/index.js +166 -239
  20. package/src/gl-operations/reglCommands/contours.js +20 -20
  21. package/src/gl-operations/reglCommands/default.js +34 -34
  22. package/src/gl-operations/reglCommands/hillshading.js +116 -116
  23. package/src/gl-operations/reglCommands/index.js +6 -6
  24. package/src/gl-operations/reglCommands/multiLayers.js +55 -55
  25. package/src/gl-operations/reglCommands/transitions.js +24 -24
  26. package/src/gl-operations/reglCommands/util.js +54 -54
  27. package/src/gl-operations/renderer.js +69 -69
  28. package/src/gl-operations/shaders/transform.js +2 -2
  29. package/src/gl-operations/shaders/util/rgbaToFloat.glsl +11 -11
  30. package/src/gl-operations/texture_manager.js +58 -58
  31. package/src/gl-operations/util.js +154 -154
  32. package/src/index.js +14 -2
  33. package/src/measure/index.js +198 -0
  34. package/src/measure/tile_cache.js +88 -0
  35. package/src/mvs/index.js +26 -0
  36. package/src/mvs/protos/index.js +12 -0
  37. package/src/mvs/protos/proto_10.js +155 -0
  38. package/src/observation_pretict.js +168 -0
  39. package/src/photo-parser/exif/gps_tags.js +33 -0
  40. package/src/photo-parser/exif/ifd1_tags.js +22 -0
  41. package/src/photo-parser/exif/index.js +130 -0
  42. package/src/photo-parser/exif/parse_image.js +290 -0
  43. package/src/photo-parser/exif/string_values.js +137 -0
  44. package/src/photo-parser/exif/tags.js +75 -0
  45. package/src/photo-parser/exif/tiff_tags.js +35 -0
  46. package/src/photo-parser/exif/util.js +103 -0
  47. package/src/photo-parser/image-size/detector.js +24 -0
  48. package/src/photo-parser/image-size/fromFile.js +55 -0
  49. package/src/photo-parser/image-size/index.js +2 -0
  50. package/src/photo-parser/image-size/lookup.js +37 -0
  51. package/src/photo-parser/image-size/types/bmp.js +10 -0
  52. package/src/photo-parser/image-size/types/cur.js +16 -0
  53. package/src/photo-parser/image-size/types/dds.js +10 -0
  54. package/src/photo-parser/image-size/types/gif.js +11 -0
  55. package/src/photo-parser/image-size/types/heif.js +35 -0
  56. package/src/photo-parser/image-size/types/icns.js +112 -0
  57. package/src/photo-parser/image-size/types/ico.js +74 -0
  58. package/src/photo-parser/image-size/types/index.js +43 -0
  59. package/src/photo-parser/image-size/types/j2c.js +11 -0
  60. package/src/photo-parser/image-size/types/jp2.js +22 -0
  61. package/src/photo-parser/image-size/types/jpg.js +157 -0
  62. package/src/photo-parser/image-size/types/ktx.js +18 -0
  63. package/src/photo-parser/image-size/types/png.js +36 -0
  64. package/src/photo-parser/image-size/types/pnm.js +74 -0
  65. package/src/photo-parser/image-size/types/psd.js +10 -0
  66. package/src/photo-parser/image-size/types/svg.js +100 -0
  67. package/src/photo-parser/image-size/types/tga.js +14 -0
  68. package/src/photo-parser/image-size/types/tiff.js +92 -0
  69. package/src/photo-parser/image-size/types/utils.js +83 -0
  70. package/src/photo-parser/image-size/types/webp.js +67 -0
  71. package/src/photo-parser/index.js +181 -0
  72. package/src/report/annotations_report.js +446 -0
  73. package/src/report/index.js +2 -0
  74. package/src/report/map_util.js +81 -0
  75. package/src/report/pdf_creator.js +247 -0
  76. package/src/report/report.js +583 -0
  77. package/src/transform.js +204 -0
  78. package/src/util.js +371 -75
  79. package/CHANGELOG.md +0 -60
  80. /package/src/constants/{colors.js → dsm_colors.js} +0 -0
@@ -0,0 +1,22 @@
1
+ export default {
2
+ 0x0100: 'ImageWidth',
3
+ 0x0101: 'ImageHeight',
4
+ 0x0102: 'BitsPerSample',
5
+ 0x0103: 'Compression',
6
+ 0x0106: 'PhotometricInterpretation',
7
+ 0x0111: 'StripOffsets',
8
+ 0x0112: 'Orientation',
9
+ 0x0115: 'SamplesPerPixel',
10
+ 0x0116: 'RowsPerStrip',
11
+ 0x0117: 'StripByteCounts',
12
+ 0x011A: 'XResolution',
13
+ 0x011B: 'YResolution',
14
+ 0x011C: 'PlanarConfiguration',
15
+ 0x0128: 'ResolutionUnit',
16
+ 0x0201: 'JpegIFOffset', // When image format is JPEG, this value show offset to JPEG data stored.(aka "ThumbnailOffset" or "JPEGInterchangeFormat")
17
+ 0x0202: 'JpegIFByteCount', // When image format is JPEG, this value shows data size of JPEG image (aka "ThumbnailLength" or "JPEGInterchangeFormatLength")
18
+ 0x0211: 'YCbCrCoefficients',
19
+ 0x0212: 'YCbCrSubSampling',
20
+ 0x0213: 'YCbCrPositioning',
21
+ 0x0214: 'ReferenceBlackWhite'
22
+ }
@@ -0,0 +1,130 @@
1
+ import {getData} from './parse_image'
2
+ import {imageSize} from '../image-size'
3
+ import util from './util'
4
+
5
+ export const getPhotoMetadata = async (file) => {
6
+ let extent = getFileExtent(file)
7
+ let data = {}
8
+ if (extent === 'jpg' || extent === 'jpeg') {
9
+ try {
10
+ data = await _formatMetadata(file)
11
+ } catch(err) {
12
+ return await getImageSize(file)
13
+ }
14
+ } else {
15
+ data = await getImageSize(file)
16
+ }
17
+ data.filesize = getFileSize(file)
18
+ return data
19
+ }
20
+
21
+ async function _formatMetadata (file, index = 1) {
22
+ let buffer = await getFileBuffer(file, index)
23
+ return new Promise((resolve, reject) => {
24
+ getData(buffer, function (img, err) {
25
+ if (err) {
26
+ if (err.message === 'Offset is outside the bounds of the DataView' && index < 3) {// 如果前64kb没找到,则尝试搜索128k,最多搜索192k
27
+ return resolve(_formatMetadata(file, index + 1))
28
+ } else {
29
+ return reject(err)
30
+ }
31
+ }
32
+ let {exif, xmp} = getAllTags(img)
33
+ exif = JSON.parse(JSON.stringify(exif).replaceAll('\\u0000', '')) || {}
34
+ if (exif.PixelXDimension && exif.PixelYDimension && exif.PixelXDimension != 65535 && exif.PixelYDimension != 65535) {
35
+ resolve({
36
+ exif, xmp,
37
+ width: exif.PixelXDimension,
38
+ height: exif.PixelYDimension
39
+ })
40
+ } else {
41
+ getImageSize(file).then(size => {
42
+ resolve({
43
+ exif, xmp,
44
+ width: size.width,
45
+ height: size.height
46
+ })
47
+ })
48
+ }
49
+ })
50
+ })
51
+ }
52
+
53
+ async function getImageSize (file) {
54
+ try {
55
+ let buffer = await getFileBuffer(file)
56
+ let size = imageSize(buffer)
57
+ return {
58
+ width: size.width,
59
+ height: size.height
60
+ }
61
+ } catch (err) {
62
+ return {
63
+ width: 0,
64
+ height: 0
65
+ }
66
+ }
67
+ }
68
+
69
+ function getAllTags (img) {
70
+ if (!util.imageHasData(img)) return {
71
+ exif: {},
72
+ xmp: {}
73
+ }
74
+ return {
75
+ exif: img.exifdata || {},
76
+ xmp: img.xmpdata || {}
77
+ }
78
+ }
79
+
80
+ function getFileExtent (file) {
81
+ if (typeof file === 'string') {
82
+ return file.split('.').pop().toLowerCase()
83
+ } else {
84
+ return file.name.split('.').pop().toLowerCase()
85
+ }
86
+ }
87
+
88
+ async function getFileBuffer (file, index) {
89
+ if ((typeof file) === 'string') {
90
+ const fs = require('fs')
91
+ if (!index) {
92
+ let buffer = fs.readFileSync(file)
93
+ return buffer.buffer
94
+ } else {
95
+ let fd = fs.openSync(file)
96
+ let buffer = Buffer.alloc(65536 * index)
97
+ await new Promise((resolve) => {
98
+ fs.read(fd, buffer, 0, buffer.length, 0, () => {
99
+ resolve()
100
+ fs.closeSync(fd)
101
+ })
102
+ })
103
+ return buffer.buffer
104
+ }
105
+ } else {
106
+ if (index) {
107
+ file = file.slice(0, 65536 * index)
108
+ }
109
+ return await new Promise((resolve, reject) => {
110
+ var fileReader = new FileReader()
111
+ fileReader.readAsArrayBuffer(file)
112
+ fileReader.onload = (e) => {
113
+ resolve(e.target.result)
114
+ }
115
+ fileReader.onerror = (error) => {
116
+ reject(error)
117
+ }
118
+ })
119
+
120
+ }
121
+ }
122
+
123
+ function getFileSize(file) {
124
+ if (typeof file === 'string') {
125
+ let stat = fs.statSync(file)
126
+ data.filesize = stat.size
127
+ } else {
128
+ return file.size
129
+ }
130
+ }
@@ -0,0 +1,290 @@
1
+ import util from './util'
2
+ import TiffTags from './tiff_tags'
3
+ import ExifTags from './tags'
4
+ import StringValues from './string_values'
5
+ import GPSTags from './gps_tags'
6
+ import { DOMParser } from '@xmldom/xmldom'
7
+
8
+ export const getData = function (img, callback) {
9
+ if (!util.imageHasData(img)) {
10
+ getImageData(img, callback)
11
+ } else {
12
+ if (callback) {
13
+ callback(img)
14
+ }
15
+ }
16
+ return true
17
+ }
18
+
19
+ function getImageData (img, callback) {
20
+ try {
21
+ var data = findEXIFinJPEG(img)
22
+ img.exifdata = data.exif
23
+ img.xmpdata = data.xmp
24
+ if (callback) {
25
+ callback(img)
26
+ }
27
+ } catch (err) {
28
+ img.exifdata = {}
29
+ img.xmpdata = {}
30
+ callback(img, err)
31
+ }
32
+ }
33
+
34
+ function findEXIFinJPEG (file) {
35
+ var dataView = new DataView(file)
36
+ let exif, xmp
37
+
38
+ var offset = 2,
39
+ length = file.byteLength,
40
+ dom = new DOMParser(),
41
+ marker
42
+
43
+ while (offset < length) {
44
+ if (dataView.getUint8(offset) != 0xFF) {
45
+ break
46
+ }
47
+
48
+ marker = dataView.getUint8(offset + 1)
49
+
50
+ // we could implement handling for other markers here,
51
+ // but we're only looking for 0xFFE1 for EXIF data
52
+
53
+ if (marker == 225) {
54
+ if (util.getStringFromDB(dataView, offset + 4, 4) == 'http') { // 这个是‘xmp’
55
+ var startOffset = offset + 3
56
+ var sectionLength = dataView.getUint16(offset + 2) - 1
57
+ var xmpString = util.getStringFromDB(dataView, startOffset, sectionLength)
58
+ var xmpEndIndex = xmpString.indexOf('xmpmeta>') + 8
59
+ xmpString = xmpString.substring(xmpString.indexOf('<x:xmpmeta'), xmpEndIndex)
60
+
61
+ var indexOfXmp = xmpString.indexOf('x:xmpmeta') + 10
62
+ //Many custom written programs embed xmp/xml without any namespace. Following are some of them.
63
+ //Without these namespaces, XML is thought to be invalid by parsers
64
+ xmpString = xmpString.slice(0, indexOfXmp)
65
+ + 'xmlns:Iptc4xmpCore="http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/" '
66
+ + 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '
67
+ + 'xmlns:tiff="http://ns.adobe.com/tiff/1.0/" '
68
+ + 'xmlns:plus="http://schemas.android.com/apk/lib/com.google.android.gms.plus" '
69
+ + 'xmlns:ext="http://www.gettyimages.com/xsltExtension/1.0" '
70
+ + 'xmlns:exif="http://ns.adobe.com/exif/1.0/" '
71
+ + 'xmlns:stEvt="http://ns.adobe.com/xap/1.0/sType/ResourceEvent#" '
72
+ + 'xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#" '
73
+ + 'xmlns:crs="http://ns.adobe.com/camera-raw-settings/1.0/" '
74
+ + 'xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/" '
75
+ + 'xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/" '
76
+ + xmpString.slice(indexOfXmp)
77
+
78
+ var domDocument = dom.parseFromString(xmpString, 'text/xml')
79
+ xmp = util.xml2Object(domDocument)
80
+ } else { // 这个是exif
81
+ exif = readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2)
82
+ }
83
+ }
84
+ if (xmp && exif) {
85
+ break
86
+ }
87
+ offset += 2 + dataView.getUint16(offset + 2)
88
+ }
89
+ return {exif: exif || {}, xmp: xmp || {}}
90
+
91
+ }
92
+
93
+
94
+ function readEXIFData (file, start) {
95
+ if (util.getStringFromDB(file, start, 4) != 'Exif') {
96
+ return false
97
+ }
98
+
99
+ var bigEnd,
100
+ tags, tag,
101
+ exifData, gpsData,
102
+ tiffOffset = start + 6
103
+
104
+ // test for TIFF validity and endianness
105
+ if (file.getUint16(tiffOffset) == 0x4949) {
106
+ bigEnd = false
107
+ } else if (file.getUint16(tiffOffset) == 0x4D4D) {
108
+ bigEnd = true
109
+ } else {
110
+ return false
111
+ }
112
+
113
+ if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002A) {
114
+ return false
115
+ }
116
+
117
+ var firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd)
118
+
119
+ if (firstIFDOffset < 0x00000008) {
120
+ return false
121
+ }
122
+
123
+ tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd)
124
+
125
+ if (tags.ExifIFDPointer) {
126
+ exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd)
127
+ for (tag in exifData) {
128
+ switch (tag) {
129
+ case 'LightSource':
130
+ case 'Flash':
131
+ case 'MeteringMode':
132
+ case 'ExposureProgram':
133
+ case 'SensingMethod':
134
+ case 'SceneCaptureType':
135
+ case 'SceneType':
136
+ case 'CustomRendered':
137
+ case 'WhiteBalance':
138
+ case 'GainControl':
139
+ case 'Contrast':
140
+ case 'Saturation':
141
+ case 'Sharpness':
142
+ case 'SubjectDistanceRange':
143
+ case 'FileSource':
144
+ exifData[tag] = StringValues[tag][exifData[tag]]
145
+ break
146
+
147
+ case 'ExifVersion':
148
+ case 'FlashpixVersion':
149
+ exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3])
150
+ break
151
+
152
+ case 'ComponentsConfiguration':
153
+ exifData[tag] =
154
+ StringValues.Components[exifData[tag][0]] +
155
+ StringValues.Components[exifData[tag][1]] +
156
+ StringValues.Components[exifData[tag][2]] +
157
+ StringValues.Components[exifData[tag][3]]
158
+ break
159
+ }
160
+ tags[tag] = exifData[tag]
161
+ }
162
+ }
163
+
164
+ if (tags.GPSInfoIFDPointer) {
165
+ gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd)
166
+ for (tag in gpsData) {
167
+ switch (tag) {
168
+ case 'GPSVersionID':
169
+ gpsData[tag] = gpsData[tag][0] +
170
+ '.' + gpsData[tag][1] +
171
+ '.' + gpsData[tag][2] +
172
+ '.' + gpsData[tag][3]
173
+ break
174
+ }
175
+ tags[tag] = gpsData[tag]
176
+ }
177
+ }
178
+
179
+ // extract thumbnail
180
+ //tags['thumbnail'] = readThumbnailImage(file, tiffOffset, firstIFDOffset, bigEnd);
181
+
182
+ return tags
183
+ }
184
+
185
+ function readTags (file, tiffStart, dirStart, strings, bigEnd) {
186
+ var entries = file.getUint16(dirStart, !bigEnd),
187
+ tags = {},
188
+ entryOffset, tag,
189
+ i
190
+
191
+ for (i = 0; i < entries; i++) {
192
+ entryOffset = dirStart + i * 12 + 2
193
+ tag = strings[file.getUint16(entryOffset, !bigEnd)]
194
+ tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd)
195
+ }
196
+ return tags
197
+ }
198
+
199
+ function readTagValue (file, entryOffset, tiffStart, dirStart, bigEnd) {
200
+ var type = file.getUint16(entryOffset + 2, !bigEnd),
201
+ numValues = file.getUint32(entryOffset + 4, !bigEnd),
202
+ valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart,
203
+ offset,
204
+ vals, val, n,
205
+ numerator, denominator
206
+
207
+ switch (type) {
208
+ case 1: // byte, 8-bit unsigned int
209
+ case 7: // undefined, 8-bit byte, value depending on field
210
+ if (numValues == 1) {
211
+ return file.getUint8(entryOffset + 8, !bigEnd)
212
+ } else {
213
+ offset = numValues > 4 ? valueOffset : (entryOffset + 8)
214
+ vals = []
215
+ for (n = 0; n < numValues; n++) {
216
+ vals[n] = file.getUint8(offset + n)
217
+ }
218
+ return vals
219
+ }
220
+
221
+ case 2: // ascii, 8-bit byte
222
+ offset = numValues > 4 ? valueOffset : (entryOffset + 8)
223
+ return util.getStringFromDB(file, offset, numValues - 1)
224
+
225
+ case 3: // short, 16 bit int
226
+ if (numValues == 1) {
227
+ return file.getUint16(entryOffset + 8, !bigEnd)
228
+ } else {
229
+ offset = numValues > 2 ? valueOffset : (entryOffset + 8)
230
+ vals = []
231
+ for (n = 0; n < numValues; n++) {
232
+ vals[n] = file.getUint16(offset + 2 * n, !bigEnd)
233
+ }
234
+ return vals
235
+ }
236
+
237
+ case 4: // long, 32 bit int
238
+ if (numValues == 1) {
239
+ return file.getUint32(entryOffset + 8, !bigEnd)
240
+ } else {
241
+ vals = []
242
+ for (n = 0; n < numValues; n++) {
243
+ vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd)
244
+ }
245
+ return vals
246
+ }
247
+
248
+ case 5: // rational = two long values, first is numerator, second is denominator
249
+ if (numValues == 1) {
250
+ numerator = file.getUint32(valueOffset, !bigEnd)
251
+ denominator = file.getUint32(valueOffset + 4, !bigEnd)
252
+ val = new Number(numerator / denominator)
253
+ val.numerator = numerator
254
+ val.denominator = denominator
255
+ return val
256
+ } else {
257
+ vals = []
258
+ for (n = 0; n < numValues; n++) {
259
+ numerator = file.getUint32(valueOffset + 8 * n, !bigEnd)
260
+ denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd)
261
+ vals[n] = new Number(numerator / denominator)
262
+ vals[n].numerator = numerator
263
+ vals[n].denominator = denominator
264
+ }
265
+ return vals
266
+ }
267
+
268
+ case 9: // slong, 32 bit signed int
269
+ if (numValues == 1) {
270
+ return file.getInt32(entryOffset + 8, !bigEnd)
271
+ } else {
272
+ vals = []
273
+ for (n = 0; n < numValues; n++) {
274
+ vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd)
275
+ }
276
+ return vals
277
+ }
278
+
279
+ case 10: // signed rational, two slongs, first is numerator, second is denominator
280
+ if (numValues == 1) {
281
+ return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd)
282
+ } else {
283
+ vals = []
284
+ for (n = 0; n < numValues; n++) {
285
+ vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd)
286
+ }
287
+ return vals
288
+ }
289
+ }
290
+ }
@@ -0,0 +1,137 @@
1
+ export default {
2
+ ExposureProgram: {
3
+ 0: 'Not defined',
4
+ 1: 'Manual',
5
+ 2: 'Normal program',
6
+ 3: 'Aperture priority',
7
+ 4: 'Shutter priority',
8
+ 5: 'Creative program',
9
+ 6: 'Action program',
10
+ 7: 'Portrait mode',
11
+ 8: 'Landscape mode'
12
+ },
13
+ MeteringMode: {
14
+ 0: 'Unknown',
15
+ 1: 'Average',
16
+ 2: 'CenterWeightedAverage',
17
+ 3: 'Spot',
18
+ 4: 'MultiSpot',
19
+ 5: 'Pattern',
20
+ 6: 'Partial',
21
+ 255: 'Other'
22
+ },
23
+ LightSource: {
24
+ 0: 'Unknown',
25
+ 1: 'Daylight',
26
+ 2: 'Fluorescent',
27
+ 3: 'Tungsten (incandescent light)',
28
+ 4: 'Flash',
29
+ 9: 'Fine weather',
30
+ 10: 'Cloudy weather',
31
+ 11: 'Shade',
32
+ 12: 'Daylight fluorescent (D 5700 - 7100K)',
33
+ 13: 'Day white fluorescent (N 4600 - 5400K)',
34
+ 14: 'Cool white fluorescent (W 3900 - 4500K)',
35
+ 15: 'White fluorescent (WW 3200 - 3700K)',
36
+ 17: 'Standard light A',
37
+ 18: 'Standard light B',
38
+ 19: 'Standard light C',
39
+ 20: 'D55',
40
+ 21: 'D65',
41
+ 22: 'D75',
42
+ 23: 'D50',
43
+ 24: 'ISO studio tungsten',
44
+ 255: 'Other'
45
+ },
46
+ Flash: {
47
+ 0x0000: 'Flash did not fire',
48
+ 0x0001: 'Flash fired',
49
+ 0x0005: 'Strobe return light not detected',
50
+ 0x0007: 'Strobe return light detected',
51
+ 0x0009: 'Flash fired, compulsory flash mode',
52
+ 0x000D: 'Flash fired, compulsory flash mode, return light not detected',
53
+ 0x000F: 'Flash fired, compulsory flash mode, return light detected',
54
+ 0x0010: 'Flash did not fire, compulsory flash mode',
55
+ 0x0018: 'Flash did not fire, auto mode',
56
+ 0x0019: 'Flash fired, auto mode',
57
+ 0x001D: 'Flash fired, auto mode, return light not detected',
58
+ 0x001F: 'Flash fired, auto mode, return light detected',
59
+ 0x0020: 'No flash function',
60
+ 0x0041: 'Flash fired, red-eye reduction mode',
61
+ 0x0045: 'Flash fired, red-eye reduction mode, return light not detected',
62
+ 0x0047: 'Flash fired, red-eye reduction mode, return light detected',
63
+ 0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode',
64
+ 0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
65
+ 0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
66
+ 0x0059: 'Flash fired, auto mode, red-eye reduction mode',
67
+ 0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
68
+ 0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode'
69
+ },
70
+ SensingMethod: {
71
+ 1: 'Not defined',
72
+ 2: 'One-chip color area sensor',
73
+ 3: 'Two-chip color area sensor',
74
+ 4: 'Three-chip color area sensor',
75
+ 5: 'Color sequential area sensor',
76
+ 7: 'Trilinear sensor',
77
+ 8: 'Color sequential linear sensor'
78
+ },
79
+ SceneCaptureType: {
80
+ 0: 'Standard',
81
+ 1: 'Landscape',
82
+ 2: 'Portrait',
83
+ 3: 'Night scene'
84
+ },
85
+ SceneType: {
86
+ 1: 'Directly photographed'
87
+ },
88
+ CustomRendered: {
89
+ 0: 'Normal process',
90
+ 1: 'Custom process'
91
+ },
92
+ WhiteBalance: {
93
+ 0: 'Auto white balance',
94
+ 1: 'Manual white balance'
95
+ },
96
+ GainControl: {
97
+ 0: 'None',
98
+ 1: 'Low gain up',
99
+ 2: 'High gain up',
100
+ 3: 'Low gain down',
101
+ 4: 'High gain down'
102
+ },
103
+ Contrast: {
104
+ 0: 'Normal',
105
+ 1: 'Soft',
106
+ 2: 'Hard'
107
+ },
108
+ Saturation: {
109
+ 0: 'Normal',
110
+ 1: 'Low saturation',
111
+ 2: 'High saturation'
112
+ },
113
+ Sharpness: {
114
+ 0: 'Normal',
115
+ 1: 'Soft',
116
+ 2: 'Hard'
117
+ },
118
+ SubjectDistanceRange: {
119
+ 0: 'Unknown',
120
+ 1: 'Macro',
121
+ 2: 'Close view',
122
+ 3: 'Distant view'
123
+ },
124
+ FileSource: {
125
+ 3: 'DSC'
126
+ },
127
+
128
+ Components: {
129
+ 0: '',
130
+ 1: 'Y',
131
+ 2: 'Cb',
132
+ 3: 'Cr',
133
+ 4: 'R',
134
+ 5: 'G',
135
+ 6: 'B'
136
+ }
137
+ }
@@ -0,0 +1,75 @@
1
+ export default {
2
+
3
+ // version tags
4
+ 0x9000: 'ExifVersion', // EXIF version
5
+ 0xA000: 'FlashpixVersion', // Flashpix format version
6
+
7
+ // colorspace tags
8
+ 0xA001: 'ColorSpace', // Color space information tag
9
+
10
+ // image configuration
11
+ 0xA002: 'PixelXDimension', // Valid width of meaningful image
12
+ 0xA003: 'PixelYDimension', // Valid height of meaningful image
13
+ 0x9101: 'ComponentsConfiguration', // Information about channels
14
+ 0x9102: 'CompressedBitsPerPixel', // Compressed bits per pixel
15
+
16
+ // user information
17
+ //0x927C: "MakerNote", // Any desired information written by the manufacturer
18
+ //0x9286: "UserComment", // Comments by user
19
+
20
+ // related file
21
+ 0xA004: 'RelatedSoundFile', // Name of related sound file
22
+
23
+ // date and time
24
+ 0x9003: 'DateTimeOriginal', // Date and time when the original image was generated
25
+ 0x9004: 'DateTimeDigitized', // Date and time when the image was stored digitally
26
+ 0x9290: 'SubsecTime', // Fractions of seconds for DateTime
27
+ 0x9291: 'SubsecTimeOriginal', // Fractions of seconds for DateTimeOriginal
28
+ 0x9292: 'SubsecTimeDigitized', // Fractions of seconds for DateTimeDigitized
29
+
30
+ // picture-taking conditions
31
+ 0x829A: 'ExposureTime', // Exposure time (in seconds)
32
+ 0x829D: 'FNumber', // F number
33
+ 0x8822: 'ExposureProgram', // Exposure program
34
+ 0x8824: 'SpectralSensitivity', // Spectral sensitivity
35
+ 0x8827: 'ISOSpeedRatings', // ISO speed rating
36
+ 0x8828: 'OECF', // Optoelectric conversion factor
37
+ 0x9201: 'ShutterSpeedValue', // Shutter speed
38
+ 0x9202: 'ApertureValue', // Lens aperture
39
+ 0x9203: 'BrightnessValue', // Value of brightness
40
+ 0x9204: 'ExposureBias', // Exposure bias
41
+ 0x9205: 'MaxApertureValue', // Smallest F number of lens
42
+ 0x9206: 'SubjectDistance', // Distance to subject in meters
43
+ 0x9207: 'MeteringMode', // Metering mode
44
+ 0x9208: 'LightSource', // Kind of light source
45
+ 0x9209: 'Flash', // Flash status
46
+ 0x9214: 'SubjectArea', // Location and area of main subject
47
+ 0x920A: 'FocalLength', // Focal length of the lens in mm
48
+ 0xA20B: 'FlashEnergy', // Strobe energy in BCPS
49
+ 0xA20C: 'SpatialFrequencyResponse', //
50
+ 0xA20E: 'FocalPlaneXResolution', // Number of pixels in width direction per FocalPlaneResolutionUnit
51
+ 0xA20F: 'FocalPlaneYResolution', // Number of pixels in height direction per FocalPlaneResolutionUnit
52
+ 0xA210: 'FocalPlaneResolutionUnit', // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
53
+ 0xA214: 'SubjectLocation', // Location of subject in image
54
+ 0xA215: 'ExposureIndex', // Exposure index selected on camera
55
+ 0xA217: 'SensingMethod', // Image sensor type
56
+ 0xA300: 'FileSource', // Image source (3 == DSC)
57
+ 0xA301: 'SceneType', // Scene type (1 == directly photographed)
58
+ 0xA302: 'CFAPattern', // Color filter array geometric pattern
59
+ 0xA401: 'CustomRendered', // Special processing
60
+ 0xA402: 'ExposureMode', // Exposure mode
61
+ 0xA403: 'WhiteBalance', // 1 = auto white balance, 2 = manual
62
+ 0xA404: 'DigitalZoomRation', // Digital zoom ratio
63
+ 0xA405: 'FocalLengthIn35mmFilm', // Equivalent foacl length assuming 35mm film camera (in mm)
64
+ 0xA406: 'SceneCaptureType', // Type of scene
65
+ 0xA407: 'GainControl', // Degree of overall image gain adjustment
66
+ 0xA408: 'Contrast', // Direction of contrast processing applied by camera
67
+ 0xA409: 'Saturation', // Direction of saturation processing applied by camera
68
+ 0xA40A: 'Sharpness', // Direction of sharpness processing applied by camera
69
+ 0xA40B: 'DeviceSettingDescription', //
70
+ 0xA40C: 'SubjectDistanceRange', // Distance to subject
71
+
72
+ // other tags
73
+ 0xA005: 'InteroperabilityIFDPointer',
74
+ 0xA420: 'ImageUniqueID' // Identifier assigned uniquely to each image
75
+ }
@@ -0,0 +1,35 @@
1
+ export default {
2
+ 0x0100: 'ImageWidth',
3
+ 0x0101: 'ImageHeight',
4
+ 0x8769: 'ExifIFDPointer',
5
+ 0x8825: 'GPSInfoIFDPointer',
6
+ 0xA005: 'InteroperabilityIFDPointer',
7
+ 0x0102: 'BitsPerSample',
8
+ 0x0103: 'Compression',
9
+ 0x0106: 'PhotometricInterpretation',
10
+ 0x0112: 'Orientation',
11
+ 0x0115: 'SamplesPerPixel',
12
+ 0x011C: 'PlanarConfiguration',
13
+ 0x0212: 'YCbCrSubSampling',
14
+ 0x0213: 'YCbCrPositioning',
15
+ 0x011A: 'XResolution',
16
+ 0x011B: 'YResolution',
17
+ 0x0128: 'ResolutionUnit',
18
+ 0x0111: 'StripOffsets',
19
+ 0x0116: 'RowsPerStrip',
20
+ 0x0117: 'StripByteCounts',
21
+ 0x0201: 'JPEGInterchangeFormat',
22
+ 0x0202: 'JPEGInterchangeFormatLength',
23
+ 0x012D: 'TransferFunction',
24
+ 0x013E: 'WhitePoint',
25
+ 0x013F: 'PrimaryChromaticities',
26
+ 0x0211: 'YCbCrCoefficients',
27
+ 0x0214: 'ReferenceBlackWhite',
28
+ 0x0132: 'DateTime',
29
+ 0x010E: 'ImageDescription',
30
+ 0x010F: 'Make',
31
+ 0x0110: 'Model',
32
+ 0x0131: 'Software',
33
+ 0x013B: 'Artist',
34
+ 0x8298: 'Copyright'
35
+ }