dpzvc3-ui 3.1.4 → 3.1.6

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 (279) hide show
  1. package/README.md +1 -1
  2. package/dist/dpzvc3.esm.js +5 -4
  3. package/dist/dpzvc3.esm.js.map +1 -1
  4. package/dist/dpzvc3.esm.min.js +1 -1
  5. package/dist/dpzvc3.esm.min.js.map +1 -1
  6. package/dist/dpzvc3.js +5 -4
  7. package/dist/dpzvc3.js.map +1 -1
  8. package/dist/dpzvc3.min.js +1 -1
  9. package/dist/dpzvc3.min.js.map +1 -1
  10. package/dist/types/components/actionSheet/index.d.ts +6 -1
  11. package/dist/types/components/actionSheet/index.d.ts.map +1 -1
  12. package/dist/types/index.d.ts +2 -2
  13. package/package.json +7 -2
  14. package/build-style.js +0 -58
  15. package/dist-prod/91.05c8ec5277a15f939b0f.js +0 -3
  16. package/dist-prod/91.05c8ec5277a15f939b0f.js.LICENSE.txt +0 -25
  17. package/dist-prod/91.05c8ec5277a15f939b0f.js.map +0 -1
  18. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js +0 -2
  19. package/dist-prod/actionsheet.0d67b6b08a62cf9360be.chunk.js.map +0 -1
  20. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js +0 -2
  21. package/dist-prod/badge.16ab5c05734fe1530701.chunk.js.map +0 -1
  22. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js +0 -2
  23. package/dist-prod/button.39ac33aa7aaccc24b6a1.chunk.js.map +0 -1
  24. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js +0 -2
  25. package/dist-prod/card.16ed7eafe471bcc60ec6.chunk.js.map +0 -1
  26. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js +0 -2
  27. package/dist-prod/cell.70ff74fba57e27df7f5a.chunk.js.map +0 -1
  28. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js +0 -2
  29. package/dist-prod/cellswipe.f3ec62abd60729d8bc5a.chunk.js.map +0 -1
  30. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js +0 -2
  31. package/dist-prod/checkbox.05c63a947ac98293c9f2.chunk.js.map +0 -1
  32. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js +0 -2
  33. package/dist-prod/guide.24f1968a568f20fbc84b.chunk.js.map +0 -1
  34. package/dist-prod/header.eb10433dd892738ee95a.chunk.js +0 -2
  35. package/dist-prod/header.eb10433dd892738ee95a.chunk.js.map +0 -1
  36. package/dist-prod/index.html +0 -19
  37. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js +0 -2
  38. package/dist-prod/indicator.0c09e3f238791cb478e0.chunk.js.map +0 -1
  39. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js +0 -2
  40. package/dist-prod/loadmore.9bad88767cc43603f473.chunk.js.map +0 -1
  41. package/dist-prod/main.662ad15361e7f3d20234.js +0 -2
  42. package/dist-prod/main.662ad15361e7f3d20234.js.map +0 -1
  43. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js +0 -2
  44. package/dist-prod/message.de17fea3de4daa70bab4.chunk.js.map +0 -1
  45. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js +0 -2
  46. package/dist-prod/modal.f9ec857acd9fbdf53f3b.chunk.js.map +0 -1
  47. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js +0 -2
  48. package/dist-prod/picker.bca059ef59e3c42a401f.chunk.js.map +0 -1
  49. package/dist-prod/popup.538422c7e188363a468d.chunk.js +0 -2
  50. package/dist-prod/popup.538422c7e188363a468d.chunk.js.map +0 -1
  51. package/dist-prod/progress.240de4b633002f573030.chunk.js +0 -2
  52. package/dist-prod/progress.240de4b633002f573030.chunk.js.map +0 -1
  53. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js +0 -2
  54. package/dist-prod/prompt.dcda0b05ea02d59106b7.chunk.js.map +0 -1
  55. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js +0 -2
  56. package/dist-prod/radiobox.7c10f77aba5ae04b2e5c.chunk.js.map +0 -1
  57. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js +0 -2
  58. package/dist-prod/rater.d46ae462c598c458e5a8.chunk.js.map +0 -1
  59. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js +0 -2
  60. package/dist-prod/slidebar.833e75b9eb0abef92453.chunk.js.map +0 -1
  61. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js +0 -2
  62. package/dist-prod/spinner.6afb4f84cc29f0e2f8eb.chunk.js.map +0 -1
  63. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js +0 -2
  64. package/dist-prod/swipe.3fe6ee6638765ec52d94.chunk.js.map +0 -1
  65. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js +0 -2
  66. package/dist-prod/switchbar.f24c76a03120f1bd961a.chunk.js.map +0 -1
  67. package/dist-prod/tab.29f19483f699b7811259.chunk.js +0 -2
  68. package/dist-prod/tab.29f19483f699b7811259.chunk.js.map +0 -1
  69. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js +0 -2
  70. package/dist-prod/text.a6e4251f772d23843e2b.chunk.js.map +0 -1
  71. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js +0 -2
  72. package/dist-prod/totop.713c5ab7f7dbcffbf2a3.chunk.js.map +0 -1
  73. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js +0 -2
  74. package/dist-prod/upload.0638581e551ed9afaba2.chunk.js.map +0 -1
  75. package/postcss.config.js +0 -5
  76. package/src/components/Indicator/Indicator.tsx +0 -67
  77. package/src/components/Indicator/Indicator.vue +0 -82
  78. package/src/components/Indicator/index.ts +0 -111
  79. package/src/components/Indicator/types.ts +0 -15
  80. package/src/components/Text/index.ts +0 -14
  81. package/src/components/Text/textBar.tsx +0 -104
  82. package/src/components/Text/types.ts +0 -13
  83. package/src/components/actionSheet/actionSheet.d.ts +0 -16
  84. package/src/components/actionSheet/actionSheet.tsx +0 -86
  85. package/src/components/actionSheet/index.ts +0 -6
  86. package/src/components/actionSheet/types.ts +0 -10
  87. package/src/components/app.vue +0 -59
  88. package/src/components/badge/badge.tsx +0 -80
  89. package/src/components/badge/index.ts +0 -12
  90. package/src/components/badge/types.ts +0 -8
  91. package/src/components/button/button.tsx +0 -105
  92. package/src/components/button/index.ts +0 -13
  93. package/src/components/button/types.ts +0 -13
  94. package/src/components/card/card.d.ts +0 -16
  95. package/src/components/card/card.tsx +0 -38
  96. package/src/components/card/index.ts +0 -12
  97. package/src/components/card/types.ts +0 -3
  98. package/src/components/cell/cell.tsx +0 -89
  99. package/src/components/cell/index.ts +0 -12
  100. package/src/components/cell/types.ts +0 -8
  101. package/src/components/cellSwipe/cellSwipe.tsx +0 -188
  102. package/src/components/cellSwipe/index.ts +0 -13
  103. package/src/components/cellSwipe/types.ts +0 -17
  104. package/src/components/checkBox/checkbox-group.tsx +0 -75
  105. package/src/components/checkBox/checkbox.tsx +0 -107
  106. package/src/components/checkBox/index.ts +0 -29
  107. package/src/components/checkBox/types.ts +0 -32
  108. package/src/components/header/header.tsx +0 -119
  109. package/src/components/header/index.ts +0 -13
  110. package/src/components/header/types.ts +0 -7
  111. package/src/components/loadMore/index.ts +0 -14
  112. package/src/components/loadMore/loadMore.tsx +0 -265
  113. package/src/components/loadMore/types.ts +0 -26
  114. package/src/components/message/confirm.ts +0 -104
  115. package/src/components/message/index.ts +0 -113
  116. package/src/components/message/message.tsx +0 -100
  117. package/src/components/message/messageGroup.tsx +0 -59
  118. package/src/components/message/types.ts +0 -48
  119. package/src/components/modal/confirm.ts +0 -123
  120. package/src/components/modal/index.ts +0 -68
  121. package/src/components/modal/modal.tsx +0 -248
  122. package/src/components/modal/types.ts +0 -51
  123. package/src/components/number/Number.tsx +0 -143
  124. package/src/components/number/index.ts +0 -10
  125. package/src/components/number/types.ts +0 -13
  126. package/src/components/picker/area-picker/area-picker.vue +0 -230
  127. package/src/components/picker/area-picker/props.js +0 -17
  128. package/src/components/picker/date-picker/date-picker.vue +0 -191
  129. package/src/components/picker/date-picker/props.js +0 -24
  130. package/src/components/picker/index.ts +0 -12
  131. package/src/components/picker/normal-picker/normal-picker.vue +0 -120
  132. package/src/components/picker/normal-picker/props.js +0 -20
  133. package/src/components/picker/picker-slot.vue +0 -217
  134. package/src/components/picker/picker.tsx +0 -112
  135. package/src/components/picker/types.ts +0 -17
  136. package/src/components/popup/index.ts +0 -12
  137. package/src/components/popup/popup.d.ts +0 -16
  138. package/src/components/popup/popup.tsx +0 -68
  139. package/src/components/popup/types.ts +0 -9
  140. package/src/components/progress/index.ts +0 -12
  141. package/src/components/progress/progress.tsx +0 -81
  142. package/src/components/progress/types.ts +0 -9
  143. package/src/components/prompt/confirm.ts +0 -104
  144. package/src/components/prompt/index.ts +0 -50
  145. package/src/components/prompt/prompt.tsx +0 -161
  146. package/src/components/prompt/types.ts +0 -45
  147. package/src/components/radioBox/index.ts +0 -34
  148. package/src/components/radioBox/radiobox-group.tsx +0 -66
  149. package/src/components/radioBox/radiobox-group1.vue +0 -66
  150. package/src/components/radioBox/radiobox.tsx +0 -115
  151. package/src/components/radioBox/radiobox1.vue +0 -89
  152. package/src/components/radioBox/types.ts +0 -24
  153. package/src/components/rater/index.ts +0 -12
  154. package/src/components/rater/rater.d.ts +0 -16
  155. package/src/components/rater/raters.tsx +0 -101
  156. package/src/components/rater/types.ts +0 -10
  157. package/src/components/slideBar/index.ts +0 -13
  158. package/src/components/slideBar/slideBar.tsx +0 -288
  159. package/src/components/slideBar/types.ts +0 -20
  160. package/src/components/spinner/behavior/blade.vue +0 -42
  161. package/src/components/spinner/behavior/double-bounce.vue +0 -38
  162. package/src/components/spinner/behavior/fading-circle.vue +0 -55
  163. package/src/components/spinner/behavior/snake.vue +0 -41
  164. package/src/components/spinner/behavior/triple-bounce.vue +0 -52
  165. package/src/components/spinner/index.ts +0 -13
  166. package/src/components/spinner/props.js +0 -28
  167. package/src/components/spinner/spinner.tsx +0 -85
  168. package/src/components/spinner/types.ts +0 -20
  169. package/src/components/swipe/index.ts +0 -13
  170. package/src/components/swipe/swipe.tsx +0 -292
  171. package/src/components/swipe/types.ts +0 -21
  172. package/src/components/switchbar/index.ts +0 -13
  173. package/src/components/switchbar/switchbar.tsx +0 -58
  174. package/src/components/switchbar/types.ts +0 -6
  175. package/src/components/tab/index.ts +0 -12
  176. package/src/components/tab/tab.tsx +0 -71
  177. package/src/components/tab/types.ts +0 -15
  178. package/src/components/toTop/index.ts +0 -13
  179. package/src/components/toTop/toTop.tsx +0 -54
  180. package/src/components/toTop/types.ts +0 -7
  181. package/src/components/upload/index.ts +0 -13
  182. package/src/components/upload/types.ts +0 -9
  183. package/src/components/upload/upload.tsx +0 -180
  184. package/src/config/config.js +0 -16
  185. package/src/directives/clickoutside.js +0 -42
  186. package/src/directives/tranferDom.js +0 -66
  187. package/src/index.d.ts +0 -131
  188. package/src/index.ts +0 -136
  189. package/src/lib/MegaPixImage.js +0 -164
  190. package/src/lib/MegaPixImageOld.js +0 -153
  191. package/src/lib/exif-js.js +0 -235
  192. package/src/lib/exif.js +0 -789
  193. package/src/lib/lib.js +0 -22
  194. package/src/main.ts +0 -33
  195. package/src/mixin/emitter.js +0 -72
  196. package/src/mixin/input.js +0 -41
  197. package/src/router.ts +0 -36
  198. package/src/shims-vue.d.ts +0 -37
  199. package/src/styles/base/font.less +0 -99
  200. package/src/styles/base/reset.less +0 -135
  201. package/src/styles/base/variable.less +0 -108
  202. package/src/styles/components/actionSheet.less +0 -43
  203. package/src/styles/components/badge.less +0 -81
  204. package/src/styles/components/button.less +0 -124
  205. package/src/styles/components/card.less +0 -31
  206. package/src/styles/components/cell-swipe.less +0 -20
  207. package/src/styles/components/cell.less +0 -75
  208. package/src/styles/components/checkBox.less +0 -113
  209. package/src/styles/components/editor.less +0 -3
  210. package/src/styles/components/header.less +0 -72
  211. package/src/styles/components/indicator.less +0 -39
  212. package/src/styles/components/loadmore.less +0 -48
  213. package/src/styles/components/message.less +0 -57
  214. package/src/styles/components/modal.less +0 -84
  215. package/src/styles/components/number.less +0 -60
  216. package/src/styles/components/picker.less +0 -152
  217. package/src/styles/components/popup.less +0 -46
  218. package/src/styles/components/progress.less +0 -52
  219. package/src/styles/components/prompt.less +0 -37
  220. package/src/styles/components/radioBox.less +0 -142
  221. package/src/styles/components/rater.less +0 -16
  222. package/src/styles/components/slide-Bar.less +0 -149
  223. package/src/styles/components/spinner.less +0 -329
  224. package/src/styles/components/swipe.less +0 -125
  225. package/src/styles/components/switchBar.less +0 -88
  226. package/src/styles/components/tab.less +0 -71
  227. package/src/styles/components/text.less +0 -82
  228. package/src/styles/components/toTop.less +0 -28
  229. package/src/styles/components/upload.less +0 -23
  230. package/src/styles/index.less +0 -39
  231. package/src/styles/utils/1px.less +0 -206
  232. package/src/styles/utils/animation.less +0 -165
  233. package/src/styles/utils/nowrap.less +0 -19
  234. package/src/template/index.ejs +0 -40
  235. package/src/types/index.d.ts +0 -127
  236. package/src/types/js-shims.d.ts +0 -36
  237. package/src/utils/test.ts +0 -2
  238. package/src/utils/util.ts +0 -168
  239. package/src/utils/util1.js +0 -202
  240. package/src/vconsole-resources.min.js +0 -6
  241. package/src/vconsole-sources.min.js +0 -6
  242. package/src/vconsole.min.js +0 -7
  243. package/src/views/ActionSheet.vue +0 -46
  244. package/src/views/Badge/Badge.less +0 -12
  245. package/src/views/Badge/Badge.tsx +0 -23
  246. package/src/views/Badge.vue +0 -53
  247. package/src/views/Button.vue +0 -69
  248. package/src/views/Card.vue +0 -89
  249. package/src/views/Cell.vue +0 -31
  250. package/src/views/CellSwipe.vue +0 -80
  251. package/src/views/CheckBox.vue +0 -78
  252. package/src/views/Header.vue +0 -71
  253. package/src/views/Indicator.vue +0 -82
  254. package/src/views/LoadMore.vue +0 -76
  255. package/src/views/Message.vue +0 -61
  256. package/src/views/Modal.vue +0 -69
  257. package/src/views/Picker.vue +0 -142
  258. package/src/views/Popup.vue +0 -103
  259. package/src/views/Progress.vue +0 -49
  260. package/src/views/Prompt.vue +0 -43
  261. package/src/views/RadioBox.vue +0 -70
  262. package/src/views/Rater.vue +0 -53
  263. package/src/views/SlideBar.vue +0 -62
  264. package/src/views/Spinner.vue +0 -27
  265. package/src/views/Swipe.vue +0 -59
  266. package/src/views/SwitchBar.vue +0 -49
  267. package/src/views/Tab.vue +0 -55
  268. package/src/views/Text.vue +0 -97
  269. package/src/views/ToTop.vue +0 -31
  270. package/src/views/Upload.vue +0 -65
  271. package/src/views/guide.vue +0 -164
  272. package/src/views/index.vue +0 -554
  273. package/tsconfig.build.json +0 -31
  274. package/tsconfig.json +0 -41
  275. package/webpack.base.config.js +0 -85
  276. package/webpack.dev.config.js +0 -43
  277. package/webpack.dist.dev.config.js +0 -76
  278. package/webpack.dist.prod.config.js +0 -90
  279. package/webpack.prod.config.js +0 -52
package/src/lib/exif.js DELETED
@@ -1,789 +0,0 @@
1
- /**
2
- * Created by admin on 2017/5/26.
3
- */
4
- (function () {
5
- const debug = false
6
-
7
- const root = this
8
-
9
- const EXIF = function (obj) {
10
- if (obj instanceof EXIF) return obj
11
- if (!(this instanceof EXIF)) return new EXIF(obj)
12
- this.EXIFwrapped = obj
13
- }
14
-
15
- if (typeof exports !== 'undefined') {
16
- if (typeof module !== 'undefined' && module.exports) {
17
- exports = module.exports = EXIF
18
- }
19
- exports.EXIF = EXIF
20
- } else {
21
- root.EXIF = EXIF
22
- }
23
-
24
- const ExifTags = EXIF.Tags = {
25
-
26
- // version tags
27
- 0x9000: 'ExifVersion', // EXIF version
28
- 0xA000: 'FlashpixVersion', // Flashpix format version
29
-
30
- // colorspace tags
31
- 0xA001: 'ColorSpace', // Color space information tag
32
-
33
- // image configuration
34
- 0xA002: 'PixelXDimension', // Valid width of meaningful image
35
- 0xA003: 'PixelYDimension', // Valid height of meaningful image
36
- 0x9101: 'ComponentsConfiguration', // Information about channels
37
- 0x9102: 'CompressedBitsPerPixel', // Compressed bits per pixel
38
-
39
- // user information
40
- 0x927C: 'MakerNote', // Any desired information written by the manufacturer
41
- 0x9286: 'UserComment', // Comments by user
42
-
43
- // related file
44
- 0xA004: 'RelatedSoundFile', // Name of related sound file
45
-
46
- // date and time
47
- 0x9003: 'DateTimeOriginal', // Date and time when the original image was generated
48
- 0x9004: 'DateTimeDigitized', // Date and time when the image was stored digitally
49
- 0x9290: 'SubsecTime', // Fractions of seconds for DateTime
50
- 0x9291: 'SubsecTimeOriginal', // Fractions of seconds for DateTimeOriginal
51
- 0x9292: 'SubsecTimeDigitized', // Fractions of seconds for DateTimeDigitized
52
-
53
- // picture-taking conditions
54
- 0x829A: 'ExposureTime', // Exposure time (in seconds)
55
- 0x829D: 'FNumber', // F number
56
- 0x8822: 'ExposureProgram', // Exposure program
57
- 0x8824: 'SpectralSensitivity', // Spectral sensitivity
58
- 0x8827: 'ISOSpeedRatings', // ISO speed rating
59
- 0x8828: 'OECF', // Optoelectric conversion factor
60
- 0x9201: 'ShutterSpeedValue', // Shutter speed
61
- 0x9202: 'ApertureValue', // Lens aperture
62
- 0x9203: 'BrightnessValue', // Value of brightness
63
- 0x9204: 'ExposureBias', // Exposure bias
64
- 0x9205: 'MaxApertureValue', // Smallest F number of lens
65
- 0x9206: 'SubjectDistance', // Distance to subject in meters
66
- 0x9207: 'MeteringMode', // Metering mode
67
- 0x9208: 'LightSource', // Kind of light source
68
- 0x9209: 'Flash', // Flash status
69
- 0x9214: 'SubjectArea', // Location and area of main subject
70
- 0x920A: 'FocalLength', // Focal length of the lens in mm
71
- 0xA20B: 'FlashEnergy', // Strobe energy in BCPS
72
- 0xA20C: 'SpatialFrequencyResponse', //
73
- 0xA20E: 'FocalPlaneXResolution', // Number of pixels in width direction per FocalPlaneResolutionUnit
74
- 0xA20F: 'FocalPlaneYResolution', // Number of pixels in height direction per FocalPlaneResolutionUnit
75
- 0xA210: 'FocalPlaneResolutionUnit', // Unit for measuring FocalPlaneXResolution and FocalPlaneYResolution
76
- 0xA214: 'SubjectLocation', // Location of subject in image
77
- 0xA215: 'ExposureIndex', // Exposure index selected on camera
78
- 0xA217: 'SensingMethod', // Image sensor type
79
- 0xA300: 'FileSource', // Image source (3 == DSC)
80
- 0xA301: 'SceneType', // Scene type (1 == directly photographed)
81
- 0xA302: 'CFAPattern', // Color filter array geometric pattern
82
- 0xA401: 'CustomRendered', // Special processing
83
- 0xA402: 'ExposureMode', // Exposure mode
84
- 0xA403: 'WhiteBalance', // 1 = auto white balance, 2 = manual
85
- 0xA404: 'DigitalZoomRation', // Digital zoom ratio
86
- 0xA405: 'FocalLengthIn35mmFilm', // Equivalent foacl length assuming 35mm film camera (in mm)
87
- 0xA406: 'SceneCaptureType', // Type of scene
88
- 0xA407: 'GainControl', // Degree of overall image gain adjustment
89
- 0xA408: 'Contrast', // Direction of contrast processing applied by camera
90
- 0xA409: 'Saturation', // Direction of saturation processing applied by camera
91
- 0xA40A: 'Sharpness', // Direction of sharpness processing applied by camera
92
- 0xA40B: 'DeviceSettingDescription', //
93
- 0xA40C: 'SubjectDistanceRange', // Distance to subject
94
-
95
- // other tags
96
- 0xA005: 'InteroperabilityIFDPointer',
97
- 0xA420: 'ImageUniqueID' // Identifier assigned uniquely to each image
98
- }
99
-
100
- const TiffTags = EXIF.TiffTags = {
101
- 0x0100: 'ImageWidth',
102
- 0x0101: 'ImageHeight',
103
- 0x8769: 'ExifIFDPointer',
104
- 0x8825: 'GPSInfoIFDPointer',
105
- 0xA005: 'InteroperabilityIFDPointer',
106
- 0x0102: 'BitsPerSample',
107
- 0x0103: 'Compression',
108
- 0x0106: 'PhotometricInterpretation',
109
- 0x0112: 'Orientation',
110
- 0x0115: 'SamplesPerPixel',
111
- 0x011C: 'PlanarConfiguration',
112
- 0x0212: 'YCbCrSubSampling',
113
- 0x0213: 'YCbCrPositioning',
114
- 0x011A: 'XResolution',
115
- 0x011B: 'YResolution',
116
- 0x0128: 'ResolutionUnit',
117
- 0x0111: 'StripOffsets',
118
- 0x0116: 'RowsPerStrip',
119
- 0x0117: 'StripByteCounts',
120
- 0x0201: 'JPEGInterchangeFormat',
121
- 0x0202: 'JPEGInterchangeFormatLength',
122
- 0x012D: 'TransferFunction',
123
- 0x013E: 'WhitePoint',
124
- 0x013F: 'PrimaryChromaticities',
125
- 0x0211: 'YCbCrCoefficients',
126
- 0x0214: 'ReferenceBlackWhite',
127
- 0x0132: 'DateTime',
128
- 0x010E: 'ImageDescription',
129
- 0x010F: 'Make',
130
- 0x0110: 'Model',
131
- 0x0131: 'Software',
132
- 0x013B: 'Artist',
133
- 0x8298: 'Copyright'
134
- }
135
-
136
- const GPSTags = EXIF.GPSTags = {
137
- 0x0000: 'GPSVersionID',
138
- 0x0001: 'GPSLatitudeRef',
139
- 0x0002: 'GPSLatitude',
140
- 0x0003: 'GPSLongitudeRef',
141
- 0x0004: 'GPSLongitude',
142
- 0x0005: 'GPSAltitudeRef',
143
- 0x0006: 'GPSAltitude',
144
- 0x0007: 'GPSTimeStamp',
145
- 0x0008: 'GPSSatellites',
146
- 0x0009: 'GPSStatus',
147
- 0x000A: 'GPSMeasureMode',
148
- 0x000B: 'GPSDOP',
149
- 0x000C: 'GPSSpeedRef',
150
- 0x000D: 'GPSSpeed',
151
- 0x000E: 'GPSTrackRef',
152
- 0x000F: 'GPSTrack',
153
- 0x0010: 'GPSImgDirectionRef',
154
- 0x0011: 'GPSImgDirection',
155
- 0x0012: 'GPSMapDatum',
156
- 0x0013: 'GPSDestLatitudeRef',
157
- 0x0014: 'GPSDestLatitude',
158
- 0x0015: 'GPSDestLongitudeRef',
159
- 0x0016: 'GPSDestLongitude',
160
- 0x0017: 'GPSDestBearingRef',
161
- 0x0018: 'GPSDestBearing',
162
- 0x0019: 'GPSDestDistanceRef',
163
- 0x001A: 'GPSDestDistance',
164
- 0x001B: 'GPSProcessingMethod',
165
- 0x001C: 'GPSAreaInformation',
166
- 0x001D: 'GPSDateStamp',
167
- 0x001E: 'GPSDifferential'
168
- }
169
-
170
- const StringValues = EXIF.StringValues = {
171
- ExposureProgram: {
172
- 0: 'Not defined',
173
- 1: 'Manual',
174
- 2: 'Normal program',
175
- 3: 'Aperture priority',
176
- 4: 'Shutter priority',
177
- 5: 'Creative program',
178
- 6: 'Action program',
179
- 7: 'Portrait mode',
180
- 8: 'Landscape mode'
181
- },
182
- MeteringMode: {
183
- 0: 'Unknown',
184
- 1: 'Average',
185
- 2: 'CenterWeightedAverage',
186
- 3: 'Spot',
187
- 4: 'MultiSpot',
188
- 5: 'Pattern',
189
- 6: 'Partial',
190
- 255: 'Other'
191
- },
192
- LightSource: {
193
- 0: 'Unknown',
194
- 1: 'Daylight',
195
- 2: 'Fluorescent',
196
- 3: 'Tungsten (incandescent light)',
197
- 4: 'Flash',
198
- 9: 'Fine weather',
199
- 10: 'Cloudy weather',
200
- 11: 'Shade',
201
- 12: 'Daylight fluorescent (D 5700 - 7100K)',
202
- 13: 'Day white fluorescent (N 4600 - 5400K)',
203
- 14: 'Cool white fluorescent (W 3900 - 4500K)',
204
- 15: 'White fluorescent (WW 3200 - 3700K)',
205
- 17: 'Standard light A',
206
- 18: 'Standard light B',
207
- 19: 'Standard light C',
208
- 20: 'D55',
209
- 21: 'D65',
210
- 22: 'D75',
211
- 23: 'D50',
212
- 24: 'ISO studio tungsten',
213
- 255: 'Other'
214
- },
215
- Flash: {
216
- 0x0000: 'Flash did not fire',
217
- 0x0001: 'Flash fired',
218
- 0x0005: 'Strobe return light not detected',
219
- 0x0007: 'Strobe return light detected',
220
- 0x0009: 'Flash fired, compulsory flash mode',
221
- 0x000D: 'Flash fired, compulsory flash mode, return light not detected',
222
- 0x000F: 'Flash fired, compulsory flash mode, return light detected',
223
- 0x0010: 'Flash did not fire, compulsory flash mode',
224
- 0x0018: 'Flash did not fire, auto mode',
225
- 0x0019: 'Flash fired, auto mode',
226
- 0x001D: 'Flash fired, auto mode, return light not detected',
227
- 0x001F: 'Flash fired, auto mode, return light detected',
228
- 0x0020: 'No flash function',
229
- 0x0041: 'Flash fired, red-eye reduction mode',
230
- 0x0045: 'Flash fired, red-eye reduction mode, return light not detected',
231
- 0x0047: 'Flash fired, red-eye reduction mode, return light detected',
232
- 0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode',
233
- 0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected',
234
- 0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected',
235
- 0x0059: 'Flash fired, auto mode, red-eye reduction mode',
236
- 0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode',
237
- 0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode'
238
- },
239
- SensingMethod: {
240
- 1: 'Not defined',
241
- 2: 'One-chip color area sensor',
242
- 3: 'Two-chip color area sensor',
243
- 4: 'Three-chip color area sensor',
244
- 5: 'Color sequential area sensor',
245
- 7: 'Trilinear sensor',
246
- 8: 'Color sequential linear sensor'
247
- },
248
- SceneCaptureType: {
249
- 0: 'Standard',
250
- 1: 'Landscape',
251
- 2: 'Portrait',
252
- 3: 'Night scene'
253
- },
254
- SceneType: {
255
- 1: 'Directly photographed'
256
- },
257
- CustomRendered: {
258
- 0: 'Normal process',
259
- 1: 'Custom process'
260
- },
261
- WhiteBalance: {
262
- 0: 'Auto white balance',
263
- 1: 'Manual white balance'
264
- },
265
- GainControl: {
266
- 0: 'None',
267
- 1: 'Low gain up',
268
- 2: 'High gain up',
269
- 3: 'Low gain down',
270
- 4: 'High gain down'
271
- },
272
- Contrast: {
273
- 0: 'Normal',
274
- 1: 'Soft',
275
- 2: 'Hard'
276
- },
277
- Saturation: {
278
- 0: 'Normal',
279
- 1: 'Low saturation',
280
- 2: 'High saturation'
281
- },
282
- Sharpness: {
283
- 0: 'Normal',
284
- 1: 'Soft',
285
- 2: 'Hard'
286
- },
287
- SubjectDistanceRange: {
288
- 0: 'Unknown',
289
- 1: 'Macro',
290
- 2: 'Close view',
291
- 3: 'Distant view'
292
- },
293
- FileSource: {
294
- 3: 'DSC'
295
- },
296
-
297
- Components: {
298
- 0: '',
299
- 1: 'Y',
300
- 2: 'Cb',
301
- 3: 'Cr',
302
- 4: 'R',
303
- 5: 'G',
304
- 6: 'B'
305
- }
306
- }
307
-
308
- function addEvent (element, event, handler) {
309
- if (element.addEventListener) {
310
- element.addEventListener(event, handler, false)
311
- } else if (element.attachEvent) {
312
- element.attachEvent('on' + event, handler)
313
- }
314
- }
315
-
316
- function imageHasData (img) {
317
- return !!(img.exifdata)
318
- }
319
-
320
- function base64ToArrayBuffer (base64, contentType) {
321
- contentType = contentType || base64.match(/^data\:([^\;]+)\;base64,/mi)[1] || '' // e.g. 'data:image/jpeg;base64,...' => 'image/jpeg'
322
- base64 = base64.replace(/^data\:([^\;]+)\;base64,/gmi, '')
323
- const binary = atob(base64)
324
- const len = binary.length
325
- const buffer = new ArrayBuffer(len)
326
- const view = new Uint8Array(buffer)
327
- for (let i = 0; i < len; i++) {
328
- view[i] = binary.charCodeAt(i)
329
- }
330
- return buffer
331
- }
332
-
333
- function objectURLToBlob (url, callback) {
334
- const http = new XMLHttpRequest()
335
- http.open('GET', url, true)
336
- http.responseType = 'blob'
337
- http.onload = function (e) {
338
- if (this.status == 200 || this.status === 0) {
339
- callback(this.response)
340
- }
341
- }
342
- http.send()
343
- }
344
-
345
- function getImageData (img, callback) {
346
- function handleBinaryFile (binFile) {
347
- const data = findEXIFinJPEG(binFile)
348
- const iptcdata = findIPTCinJPEG(binFile)
349
- img.exifdata = data || {}
350
- img.iptcdata = iptcdata || {}
351
- if (callback) {
352
- callback.call(img)
353
- }
354
- }
355
-
356
- if (img.src) {
357
- if (/^data\:/i.test(img.src)) { // Data URI
358
- const arrayBuffer = base64ToArrayBuffer(img.src)
359
- handleBinaryFile(arrayBuffer)
360
- } else if (/^blob\:/i.test(img.src)) { // Object URL
361
- var fileReader = new FileReader()
362
- fileReader.onload = function (e) {
363
- handleBinaryFile(e.target.result)
364
- }
365
- objectURLToBlob(img.src, function (blob) {
366
- fileReader.readAsArrayBuffer(blob)
367
- })
368
- } else {
369
- let http = new XMLHttpRequest()
370
- http.onload = function () {
371
- if (this.status == 200 || this.status === 0) {
372
- handleBinaryFile(http.response)
373
- } else {
374
- throw 'Could not load image'
375
- }
376
- http = null
377
- }
378
- http.open('GET', img.src, true)
379
- http.responseType = 'arraybuffer'
380
- http.send(null)
381
- }
382
- } else if (window.FileReader && (img instanceof window.Blob || img instanceof window.File)) {
383
- var fileReader = new FileReader()
384
- fileReader.onload = function (e) {
385
- if (debug) console.log('Got file of length ' + e.target.result.byteLength)
386
- handleBinaryFile(e.target.result)
387
- }
388
-
389
- fileReader.readAsArrayBuffer(img)
390
- }
391
- }
392
-
393
- function findEXIFinJPEG (file) {
394
- const dataView = new DataView(file)
395
-
396
- if (debug) console.log('Got file of length ' + file.byteLength)
397
- if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
398
- if (debug) console.log('Not a valid JPEG')
399
- return false // not a valid jpeg
400
- }
401
-
402
- let offset = 2
403
- const length = file.byteLength
404
- let marker
405
-
406
- while (offset < length) {
407
- if (dataView.getUint8(offset) != 0xFF) {
408
- if (debug) console.log('Not a valid marker at offset ' + offset + ', found: ' + dataView.getUint8(offset))
409
- return false // not a valid marker, something is wrong
410
- }
411
-
412
- marker = dataView.getUint8(offset + 1)
413
- if (debug) console.log(marker)
414
-
415
- // we could implement handling for other markers here,
416
- // but we're only looking for 0xFFE1 for EXIF data
417
-
418
- if (marker == 225) {
419
- if (debug) console.log('Found 0xFFE1 marker')
420
-
421
- return readEXIFData(dataView, offset + 4, dataView.getUint16(offset + 2) - 2)
422
-
423
- // offset += 2 + file.getShortAt(offset+2, true);
424
- } else {
425
- offset += 2 + dataView.getUint16(offset + 2)
426
- }
427
- }
428
- }
429
-
430
- function findIPTCinJPEG (file) {
431
- const dataView = new DataView(file)
432
-
433
- if (debug) console.log('Got file of length ' + file.byteLength)
434
- if ((dataView.getUint8(0) != 0xFF) || (dataView.getUint8(1) != 0xD8)) {
435
- if (debug) console.log('Not a valid JPEG')
436
- return false // not a valid jpeg
437
- }
438
-
439
- let offset = 2
440
- const length = file.byteLength
441
-
442
- const isFieldSegmentStart = function (dataView, offset) {
443
- return (
444
- dataView.getUint8(offset) === 0x38 &&
445
- dataView.getUint8(offset + 1) === 0x42 &&
446
- dataView.getUint8(offset + 2) === 0x49 &&
447
- dataView.getUint8(offset + 3) === 0x4D &&
448
- dataView.getUint8(offset + 4) === 0x04 &&
449
- dataView.getUint8(offset + 5) === 0x04
450
- )
451
- }
452
-
453
- while (offset < length) {
454
- if (isFieldSegmentStart(dataView, offset)) {
455
- // Get the length of the name header (which is padded to an even number of bytes)
456
- let nameHeaderLength = dataView.getUint8(offset + 7)
457
- if (nameHeaderLength % 2 !== 0) nameHeaderLength += 1
458
- // Check for pre photoshop 6 format
459
- if (nameHeaderLength === 0) {
460
- // Always 4
461
- nameHeaderLength = 4
462
- }
463
-
464
- const startOffset = offset + 8 + nameHeaderLength
465
- const sectionLength = dataView.getUint16(offset + 6 + nameHeaderLength)
466
-
467
- return readIPTCData(file, startOffset, sectionLength)
468
-
469
- break
470
- }
471
-
472
- // Not the marker, continue searching
473
- offset++
474
- }
475
- }
476
- const IptcFieldMap = {
477
- 0x78: 'caption',
478
- 0x6E: 'credit',
479
- 0x19: 'keywords',
480
- 0x37: 'dateCreated',
481
- 0x50: 'byline',
482
- 0x55: 'bylineTitle',
483
- 0x7A: 'captionWriter',
484
- 0x69: 'headline',
485
- 0x74: 'copyright',
486
- 0x0F: 'category'
487
- }
488
- function readIPTCData (file, startOffset, sectionLength) {
489
- const dataView = new DataView(file)
490
- const data = {}
491
- let fieldValue, fieldName, dataSize, segmentType, segmentSize
492
- let segmentStartPos = startOffset
493
- while (segmentStartPos < startOffset + sectionLength) {
494
- if (dataView.getUint8(segmentStartPos) === 0x1C && dataView.getUint8(segmentStartPos + 1) === 0x02) {
495
- segmentType = dataView.getUint8(segmentStartPos + 2)
496
- if (segmentType in IptcFieldMap) {
497
- dataSize = dataView.getInt16(segmentStartPos + 3)
498
- segmentSize = dataSize + 5
499
- fieldName = IptcFieldMap[segmentType]
500
- fieldValue = getStringFromDB(dataView, segmentStartPos + 5, dataSize)
501
- // Check if we already stored a value with this name
502
- if (data.hasOwnProperty(fieldName)) {
503
- // Value already stored with this name, create multivalue field
504
- if (data[fieldName] instanceof Array) {
505
- data[fieldName].push(fieldValue)
506
- } else {
507
- data[fieldName] = [data[fieldName], fieldValue]
508
- }
509
- } else {
510
- data[fieldName] = fieldValue
511
- }
512
- }
513
- }
514
- segmentStartPos++
515
- }
516
- return data
517
- }
518
-
519
- function readTags (file, tiffStart, dirStart, strings, bigEnd) {
520
- const entries = file.getUint16(dirStart, !bigEnd)
521
- const tags = {}
522
- let entryOffset; let tag
523
- let i
524
-
525
- for (i = 0; i < entries; i++) {
526
- entryOffset = dirStart + i * 12 + 2
527
- tag = strings[file.getUint16(entryOffset, !bigEnd)]
528
- if (!tag && debug) console.log('Unknown tag: ' + file.getUint16(entryOffset, !bigEnd))
529
- tags[tag] = readTagValue(file, entryOffset, tiffStart, dirStart, bigEnd)
530
- }
531
- return tags
532
- }
533
-
534
- function readTagValue (file, entryOffset, tiffStart, dirStart, bigEnd) {
535
- const type = file.getUint16(entryOffset + 2, !bigEnd)
536
- const numValues = file.getUint32(entryOffset + 4, !bigEnd)
537
- const valueOffset = file.getUint32(entryOffset + 8, !bigEnd) + tiffStart
538
- let offset
539
- let vals; let val; let n
540
- let numerator; let denominator
541
-
542
- switch (type) {
543
- case 1: // byte, 8-bit unsigned int
544
- case 7: // undefined, 8-bit byte, value depending on field
545
- if (numValues == 1) {
546
- return file.getUint8(entryOffset + 8, !bigEnd)
547
- } else {
548
- offset = numValues > 4 ? valueOffset : (entryOffset + 8)
549
- vals = []
550
- for (n = 0; n < numValues; n++) {
551
- vals[n] = file.getUint8(offset + n)
552
- }
553
- return vals
554
- }
555
-
556
- case 2: // ascii, 8-bit byte
557
- offset = numValues > 4 ? valueOffset : (entryOffset + 8)
558
- return getStringFromDB(file, offset, numValues - 1)
559
-
560
- case 3: // short, 16 bit int
561
- if (numValues == 1) {
562
- return file.getUint16(entryOffset + 8, !bigEnd)
563
- } else {
564
- offset = numValues > 2 ? valueOffset : (entryOffset + 8)
565
- vals = []
566
- for (n = 0; n < numValues; n++) {
567
- vals[n] = file.getUint16(offset + 2 * n, !bigEnd)
568
- }
569
- return vals
570
- }
571
-
572
- case 4: // long, 32 bit int
573
- if (numValues == 1) {
574
- return file.getUint32(entryOffset + 8, !bigEnd)
575
- } else {
576
- vals = []
577
- for (n = 0; n < numValues; n++) {
578
- vals[n] = file.getUint32(valueOffset + 4 * n, !bigEnd)
579
- }
580
- return vals
581
- }
582
-
583
- case 5: // rational = two long values, first is numerator, second is denominator
584
- if (numValues == 1) {
585
- numerator = file.getUint32(valueOffset, !bigEnd)
586
- denominator = file.getUint32(valueOffset + 4, !bigEnd)
587
- val = new Number(numerator / denominator)
588
- val.numerator = numerator
589
- val.denominator = denominator
590
- return val
591
- } else {
592
- vals = []
593
- for (n = 0; n < numValues; n++) {
594
- numerator = file.getUint32(valueOffset + 8 * n, !bigEnd)
595
- denominator = file.getUint32(valueOffset + 4 + 8 * n, !bigEnd)
596
- vals[n] = new Number(numerator / denominator)
597
- vals[n].numerator = numerator
598
- vals[n].denominator = denominator
599
- }
600
- return vals
601
- }
602
-
603
- case 9: // slong, 32 bit signed int
604
- if (numValues == 1) {
605
- return file.getInt32(entryOffset + 8, !bigEnd)
606
- } else {
607
- vals = []
608
- for (n = 0; n < numValues; n++) {
609
- vals[n] = file.getInt32(valueOffset + 4 * n, !bigEnd)
610
- }
611
- return vals
612
- }
613
-
614
- case 10: // signed rational, two slongs, first is numerator, second is denominator
615
- if (numValues == 1) {
616
- return file.getInt32(valueOffset, !bigEnd) / file.getInt32(valueOffset + 4, !bigEnd)
617
- } else {
618
- vals = []
619
- for (n = 0; n < numValues; n++) {
620
- vals[n] = file.getInt32(valueOffset + 8 * n, !bigEnd) / file.getInt32(valueOffset + 4 + 8 * n, !bigEnd)
621
- }
622
- return vals
623
- }
624
- }
625
- }
626
-
627
- function getStringFromDB (buffer, start, length) {
628
- let outstr = ''
629
- let n = start
630
- for (n; n < start + length; n++) {
631
- outstr += String.fromCharCode(buffer.getUint8(n))
632
- }
633
- return outstr
634
- }
635
-
636
- function readEXIFData (file, start) {
637
- if (getStringFromDB(file, start, 4) != 'Exif') {
638
- if (debug) console.log('Not valid EXIF data! ' + getStringFromDB(file, start, 4))
639
- return false
640
- }
641
-
642
- let bigEnd
643
- let tags; let tag
644
- let exifData; let gpsData
645
- const tiffOffset = start + 6
646
-
647
- // test for TIFF validity and endianness
648
- if (file.getUint16(tiffOffset) == 0x4949) {
649
- bigEnd = false
650
- } else if (file.getUint16(tiffOffset) == 0x4D4D) {
651
- bigEnd = true
652
- } else {
653
- if (debug) console.log('Not valid TIFF data! (no 0x4949 or 0x4D4D)')
654
- return false
655
- }
656
-
657
- if (file.getUint16(tiffOffset + 2, !bigEnd) != 0x002A) {
658
- if (debug) console.log('Not valid TIFF data! (no 0x002A)')
659
- return false
660
- }
661
-
662
- const firstIFDOffset = file.getUint32(tiffOffset + 4, !bigEnd)
663
-
664
- if (firstIFDOffset < 0x00000008) {
665
- if (debug) console.log('Not valid TIFF data! (First offset less than 8)', file.getUint32(tiffOffset + 4, !bigEnd))
666
- return false
667
- }
668
-
669
- tags = readTags(file, tiffOffset, tiffOffset + firstIFDOffset, TiffTags, bigEnd)
670
-
671
- if (tags.ExifIFDPointer) {
672
- exifData = readTags(file, tiffOffset, tiffOffset + tags.ExifIFDPointer, ExifTags, bigEnd)
673
- for (tag in exifData) {
674
- switch (tag) {
675
- case 'LightSource' :
676
- case 'Flash' :
677
- case 'MeteringMode' :
678
- case 'ExposureProgram' :
679
- case 'SensingMethod' :
680
- case 'SceneCaptureType' :
681
- case 'SceneType' :
682
- case 'CustomRendered' :
683
- case 'WhiteBalance' :
684
- case 'GainControl' :
685
- case 'Contrast' :
686
- case 'Saturation' :
687
- case 'Sharpness' :
688
- case 'SubjectDistanceRange' :
689
- case 'FileSource' :
690
- exifData[tag] = StringValues[tag][exifData[tag]]
691
- break
692
-
693
- case 'ExifVersion' :
694
- case 'FlashpixVersion' :
695
- exifData[tag] = String.fromCharCode(exifData[tag][0], exifData[tag][1], exifData[tag][2], exifData[tag][3])
696
- break
697
-
698
- case 'ComponentsConfiguration' :
699
- exifData[tag] =
700
- StringValues.Components[exifData[tag][0]] +
701
- StringValues.Components[exifData[tag][1]] +
702
- StringValues.Components[exifData[tag][2]] +
703
- StringValues.Components[exifData[tag][3]]
704
- break
705
- }
706
- tags[tag] = exifData[tag]
707
- }
708
- }
709
-
710
- if (tags.GPSInfoIFDPointer) {
711
- gpsData = readTags(file, tiffOffset, tiffOffset + tags.GPSInfoIFDPointer, GPSTags, bigEnd)
712
- for (tag in gpsData) {
713
- switch (tag) {
714
- case 'GPSVersionID' :
715
- gpsData[tag] = gpsData[tag][0] +
716
- '.' + gpsData[tag][1] +
717
- '.' + gpsData[tag][2] +
718
- '.' + gpsData[tag][3]
719
- break
720
- }
721
- tags[tag] = gpsData[tag]
722
- }
723
- }
724
-
725
- return tags
726
- }
727
-
728
- EXIF.getData = function (img, callback) {
729
- if ((img instanceof Image || img instanceof HTMLImageElement) && !img.complete) return false
730
-
731
- if (!imageHasData(img)) {
732
- getImageData(img, callback)
733
- } else {
734
- if (callback) {
735
- callback.call(img)
736
- }
737
- }
738
- return true
739
- }
740
-
741
- EXIF.getTag = function (img, tag) {
742
- if (!imageHasData(img)) return
743
- return img.exifdata[tag]
744
- }
745
-
746
- EXIF.getAllTags = function (img) {
747
- if (!imageHasData(img)) return {}
748
- let a
749
- const data = img.exifdata
750
- const tags = {}
751
- for (a in data) {
752
- if (data.hasOwnProperty(a)) {
753
- tags[a] = data[a]
754
- }
755
- }
756
- return tags
757
- }
758
-
759
- EXIF.pretty = function (img) {
760
- if (!imageHasData(img)) return ''
761
- let a
762
- const data = img.exifdata
763
- let strPretty = ''
764
- for (a in data) {
765
- if (data.hasOwnProperty(a)) {
766
- if (typeof data[a] === 'object') {
767
- if (data[a] instanceof Number) {
768
- strPretty += a + ' : ' + data[a] + ' [' + data[a].numerator + '/' + data[a].denominator + ']\r\n'
769
- } else {
770
- strPretty += a + ' : [' + data[a].length + ' values]\r\n'
771
- }
772
- } else {
773
- strPretty += a + ' : ' + data[a] + '\r\n'
774
- }
775
- }
776
- }
777
- return strPretty
778
- }
779
-
780
- EXIF.readFromBinaryFile = function (file) {
781
- return findEXIFinJPEG(file)
782
- }
783
-
784
- if (typeof define === 'function' && define.amd) {
785
- define('exif-js', [], function () {
786
- return EXIF
787
- })
788
- }
789
- }.call(this))