|
1 | 1 | /* |
2 | | - * JavaScript Load Image Exif Map 1.0.1 |
| 2 | + * JavaScript Load Image Exif Map 1.0.2 |
3 | 3 | * https://github.com/blueimp/JavaScript-Load-Image |
4 | 4 | * |
5 | 5 | * Copyright 2013, Sebastian Tschan |
|
26 | 26 | }(function (loadImage) { |
27 | 27 | 'use strict'; |
28 | 28 |
|
29 | | - var tags, |
30 | | - map, |
31 | | - prop; |
32 | | - |
33 | 29 | loadImage.ExifMap.prototype.tags = { |
34 | 30 | // ================= |
35 | 31 | // TIFF tags (IFD0): |
|
347 | 343 | case 'FlashpixVersion': |
348 | 344 | return String.fromCharCode(value[0], value[1], value[2], value[3]); |
349 | 345 | case 'ComponentsConfiguration': |
350 | | - return this.stringValues[id][value[0]] |
351 | | - + this.stringValues[id][value[1]] |
352 | | - + this.stringValues[id][value[2]] |
353 | | - + this.stringValues[id][value[3]]; |
| 346 | + return this.stringValues[id][value[0]] + |
| 347 | + this.stringValues[id][value[1]] + |
| 348 | + this.stringValues[id][value[2]] + |
| 349 | + this.stringValues[id][value[3]]; |
354 | 350 | case 'GPSVersionID': |
355 | 351 | return value[0] + '.' + value[1] + '.' + value[2] + '.' + value[3]; |
356 | 352 | } |
357 | 353 | return String(value); |
358 | 354 | }; |
359 | 355 |
|
360 | | - tags = loadImage.ExifMap.prototype.tags; |
361 | | - map = loadImage.ExifMap.prototype.map; |
| 356 | + (function (exifMapPrototype) { |
| 357 | + var tags = exifMapPrototype.tags, |
| 358 | + map = exifMapPrototype.map, |
| 359 | + prop; |
362 | 360 |
|
363 | | - // Map the tag names to tags: |
364 | | - for (prop in tags) { |
365 | | - if (tags.hasOwnProperty(prop)) { |
366 | | - map[tags[prop]] = prop; |
| 361 | + // Map the tag names to tags: |
| 362 | + for (prop in tags) { |
| 363 | + if (tags.hasOwnProperty(prop)) { |
| 364 | + map[tags[prop]] = prop; |
| 365 | + } |
367 | 366 | } |
368 | | - } |
| 367 | + }(loadImage.ExifMap.prototype)); |
369 | 368 |
|
370 | 369 | loadImage.ExifMap.prototype.getAll = function () { |
371 | 370 | var map = {}, |
372 | 371 | prop, |
373 | 372 | id; |
374 | 373 | for (prop in this) { |
375 | 374 | if (this.hasOwnProperty(prop)) { |
376 | | - id = tags[prop]; |
| 375 | + id = this.tags[prop]; |
377 | 376 | if (id) { |
378 | 377 | map[id] = this.getText(id); |
379 | 378 | } |
|
0 commit comments