|
25 | 25 | // Browser globals: |
26 | 26 | factory(window.loadImage) |
27 | 27 | } |
28 | | -}(function (loadImage) { |
| 28 | +})(function (loadImage) { |
29 | 29 | 'use strict' |
30 | 30 |
|
31 | 31 | loadImage.ExifMap.prototype.tags = { |
|
36 | 36 | 0x0101: 'ImageHeight', |
37 | 37 | 0x8769: 'ExifIFDPointer', |
38 | 38 | 0x8825: 'GPSInfoIFDPointer', |
39 | | - 0xA005: 'InteroperabilityIFDPointer', |
| 39 | + 0xa005: 'InteroperabilityIFDPointer', |
40 | 40 | 0x0102: 'BitsPerSample', |
41 | 41 | 0x0103: 'Compression', |
42 | 42 | 0x0106: 'PhotometricInterpretation', |
43 | 43 | 0x0112: 'Orientation', |
44 | 44 | 0x0115: 'SamplesPerPixel', |
45 | | - 0x011C: 'PlanarConfiguration', |
| 45 | + 0x011c: 'PlanarConfiguration', |
46 | 46 | 0x0212: 'YCbCrSubSampling', |
47 | 47 | 0x0213: 'YCbCrPositioning', |
48 | | - 0x011A: 'XResolution', |
49 | | - 0x011B: 'YResolution', |
| 48 | + 0x011a: 'XResolution', |
| 49 | + 0x011b: 'YResolution', |
50 | 50 | 0x0128: 'ResolutionUnit', |
51 | 51 | 0x0111: 'StripOffsets', |
52 | 52 | 0x0116: 'RowsPerStrip', |
53 | 53 | 0x0117: 'StripByteCounts', |
54 | 54 | 0x0201: 'JPEGInterchangeFormat', |
55 | 55 | 0x0202: 'JPEGInterchangeFormatLength', |
56 | | - 0x012D: 'TransferFunction', |
57 | | - 0x013E: 'WhitePoint', |
58 | | - 0x013F: 'PrimaryChromaticities', |
| 56 | + 0x012d: 'TransferFunction', |
| 57 | + 0x013e: 'WhitePoint', |
| 58 | + 0x013f: 'PrimaryChromaticities', |
59 | 59 | 0x0211: 'YCbCrCoefficients', |
60 | 60 | 0x0214: 'ReferenceBlackWhite', |
61 | 61 | 0x0132: 'DateTime', |
62 | | - 0x010E: 'ImageDescription', |
63 | | - 0x010F: 'Make', |
| 62 | + 0x010e: 'ImageDescription', |
| 63 | + 0x010f: 'Make', |
64 | 64 | 0x0110: 'Model', |
65 | 65 | 0x0131: 'Software', |
66 | | - 0x013B: 'Artist', |
| 66 | + 0x013b: 'Artist', |
67 | 67 | 0x8298: 'Copyright', |
68 | 68 | // ================== |
69 | 69 | // Exif Sub IFD tags: |
70 | 70 | // ================== |
71 | 71 | 0x9000: 'ExifVersion', // EXIF version |
72 | | - 0xA000: 'FlashpixVersion', // Flashpix format version |
73 | | - 0xA001: 'ColorSpace', // Color space information tag |
74 | | - 0xA002: 'PixelXDimension', // Valid width of meaningful image |
75 | | - 0xA003: 'PixelYDimension', // Valid height of meaningful image |
76 | | - 0xA500: 'Gamma', |
| 72 | + 0xa000: 'FlashpixVersion', // Flashpix format version |
| 73 | + 0xa001: 'ColorSpace', // Color space information tag |
| 74 | + 0xa002: 'PixelXDimension', // Valid width of meaningful image |
| 75 | + 0xa003: 'PixelYDimension', // Valid height of meaningful image |
| 76 | + 0xa500: 'Gamma', |
77 | 77 | 0x9101: 'ComponentsConfiguration', // Information about channels |
78 | 78 | 0x9102: 'CompressedBitsPerPixel', // Compressed bits per pixel |
79 | | - 0x927C: 'MakerNote', // Any desired information written by the manufacturer |
| 79 | + 0x927c: 'MakerNote', // Any desired information written by the manufacturer |
80 | 80 | 0x9286: 'UserComment', // Comments by user |
81 | | - 0xA004: 'RelatedSoundFile', // Name of related sound file |
| 81 | + 0xa004: 'RelatedSoundFile', // Name of related sound file |
82 | 82 | 0x9003: 'DateTimeOriginal', // Date and time when the original image was generated |
83 | 83 | 0x9004: 'DateTimeDigitized', // Date and time when the image was stored digitally |
84 | 84 | 0x9290: 'SubSecTime', // Fractions of seconds for DateTime |
85 | 85 | 0x9291: 'SubSecTimeOriginal', // Fractions of seconds for DateTimeOriginal |
86 | 86 | 0x9292: 'SubSecTimeDigitized', // Fractions of seconds for DateTimeDigitized |
87 | | - 0x829A: 'ExposureTime', // Exposure time (in seconds) |
88 | | - 0x829D: 'FNumber', |
| 87 | + 0x829a: 'ExposureTime', // Exposure time (in seconds) |
| 88 | + 0x829d: 'FNumber', |
89 | 89 | 0x8822: 'ExposureProgram', // Exposure program |
90 | 90 | 0x8824: 'SpectralSensitivity', // Spectral sensitivity |
91 | 91 | 0x8827: 'PhotographicSensitivity', // EXIF 2.3, ISOSpeedRatings in EXIF 2.2 |
|
106 | 106 | 0x9208: 'LightSource', // Kind of light source |
107 | 107 | 0x9209: 'Flash', // Flash status |
108 | 108 | 0x9214: 'SubjectArea', // Location and area of main subject |
109 | | - 0x920A: 'FocalLength', // Focal length of the lens in mm |
110 | | - 0xA20B: 'FlashEnergy', // Strobe energy in BCPS |
111 | | - 0xA20C: 'SpatialFrequencyResponse', |
112 | | - 0xA20E: 'FocalPlaneXResolution', // Number of pixels in width direction per FPRUnit |
113 | | - 0xA20F: 'FocalPlaneYResolution', // Number of pixels in height direction per FPRUnit |
114 | | - 0xA210: 'FocalPlaneResolutionUnit', // Unit for measuring the focal plane resolution |
115 | | - 0xA214: 'SubjectLocation', // Location of subject in image |
116 | | - 0xA215: 'ExposureIndex', // Exposure index selected on camera |
117 | | - 0xA217: 'SensingMethod', // Image sensor type |
118 | | - 0xA300: 'FileSource', // Image source (3 == DSC) |
119 | | - 0xA301: 'SceneType', // Scene type (1 == directly photographed) |
120 | | - 0xA302: 'CFAPattern', // Color filter array geometric pattern |
121 | | - 0xA401: 'CustomRendered', // Special processing |
122 | | - 0xA402: 'ExposureMode', // Exposure mode |
123 | | - 0xA403: 'WhiteBalance', // 1 = auto white balance, 2 = manual |
124 | | - 0xA404: 'DigitalZoomRatio', // Digital zoom ratio |
125 | | - 0xA405: 'FocalLengthIn35mmFilm', |
126 | | - 0xA406: 'SceneCaptureType', // Type of scene |
127 | | - 0xA407: 'GainControl', // Degree of overall image gain adjustment |
128 | | - 0xA408: 'Contrast', // Direction of contrast processing applied by camera |
129 | | - 0xA409: 'Saturation', // Direction of saturation processing applied by camera |
130 | | - 0xA40A: 'Sharpness', // Direction of sharpness processing applied by camera |
131 | | - 0xA40B: 'DeviceSettingDescription', |
132 | | - 0xA40C: 'SubjectDistanceRange', // Distance to subject |
133 | | - 0xA420: 'ImageUniqueID', // Identifier assigned uniquely to each image |
134 | | - 0xA430: 'CameraOwnerName', |
135 | | - 0xA431: 'BodySerialNumber', |
136 | | - 0xA432: 'LensSpecification', |
137 | | - 0xA433: 'LensMake', |
138 | | - 0xA434: 'LensModel', |
139 | | - 0xA435: 'LensSerialNumber', |
| 109 | + 0x920a: 'FocalLength', // Focal length of the lens in mm |
| 110 | + 0xa20b: 'FlashEnergy', // Strobe energy in BCPS |
| 111 | + 0xa20c: 'SpatialFrequencyResponse', |
| 112 | + 0xa20e: 'FocalPlaneXResolution', // Number of pixels in width direction per FPRUnit |
| 113 | + 0xa20f: 'FocalPlaneYResolution', // Number of pixels in height direction per FPRUnit |
| 114 | + 0xa210: 'FocalPlaneResolutionUnit', // Unit for measuring the focal plane resolution |
| 115 | + 0xa214: 'SubjectLocation', // Location of subject in image |
| 116 | + 0xa215: 'ExposureIndex', // Exposure index selected on camera |
| 117 | + 0xa217: 'SensingMethod', // Image sensor type |
| 118 | + 0xa300: 'FileSource', // Image source (3 == DSC) |
| 119 | + 0xa301: 'SceneType', // Scene type (1 == directly photographed) |
| 120 | + 0xa302: 'CFAPattern', // Color filter array geometric pattern |
| 121 | + 0xa401: 'CustomRendered', // Special processing |
| 122 | + 0xa402: 'ExposureMode', // Exposure mode |
| 123 | + 0xa403: 'WhiteBalance', // 1 = auto white balance, 2 = manual |
| 124 | + 0xa404: 'DigitalZoomRatio', // Digital zoom ratio |
| 125 | + 0xa405: 'FocalLengthIn35mmFilm', |
| 126 | + 0xa406: 'SceneCaptureType', // Type of scene |
| 127 | + 0xa407: 'GainControl', // Degree of overall image gain adjustment |
| 128 | + 0xa408: 'Contrast', // Direction of contrast processing applied by camera |
| 129 | + 0xa409: 'Saturation', // Direction of saturation processing applied by camera |
| 130 | + 0xa40a: 'Sharpness', // Direction of sharpness processing applied by camera |
| 131 | + 0xa40b: 'DeviceSettingDescription', |
| 132 | + 0xa40c: 'SubjectDistanceRange', // Distance to subject |
| 133 | + 0xa420: 'ImageUniqueID', // Identifier assigned uniquely to each image |
| 134 | + 0xa430: 'CameraOwnerName', |
| 135 | + 0xa431: 'BodySerialNumber', |
| 136 | + 0xa432: 'LensSpecification', |
| 137 | + 0xa433: 'LensMake', |
| 138 | + 0xa434: 'LensModel', |
| 139 | + 0xa435: 'LensSerialNumber', |
140 | 140 | // ============== |
141 | 141 | // GPS Info tags: |
142 | 142 | // ============== |
|
150 | 150 | 0x0007: 'GPSTimeStamp', |
151 | 151 | 0x0008: 'GPSSatellites', |
152 | 152 | 0x0009: 'GPSStatus', |
153 | | - 0x000A: 'GPSMeasureMode', |
154 | | - 0x000B: 'GPSDOP', |
155 | | - 0x000C: 'GPSSpeedRef', |
156 | | - 0x000D: 'GPSSpeed', |
157 | | - 0x000E: 'GPSTrackRef', |
158 | | - 0x000F: 'GPSTrack', |
| 153 | + 0x000a: 'GPSMeasureMode', |
| 154 | + 0x000b: 'GPSDOP', |
| 155 | + 0x000c: 'GPSSpeedRef', |
| 156 | + 0x000d: 'GPSSpeed', |
| 157 | + 0x000e: 'GPSTrackRef', |
| 158 | + 0x000f: 'GPSTrack', |
159 | 159 | 0x0010: 'GPSImgDirectionRef', |
160 | 160 | 0x0011: 'GPSImgDirection', |
161 | 161 | 0x0012: 'GPSMapDatum', |
|
166 | 166 | 0x0017: 'GPSDestBearingRef', |
167 | 167 | 0x0018: 'GPSDestBearing', |
168 | 168 | 0x0019: 'GPSDestDistanceRef', |
169 | | - 0x001A: 'GPSDestDistance', |
170 | | - 0x001B: 'GPSProcessingMethod', |
171 | | - 0x001C: 'GPSAreaInformation', |
172 | | - 0x001D: 'GPSDateStamp', |
173 | | - 0x001E: 'GPSDifferential', |
174 | | - 0x001F: 'GPSHPositioningError' |
| 169 | + 0x001a: 'GPSDestDistance', |
| 170 | + 0x001b: 'GPSProcessingMethod', |
| 171 | + 0x001c: 'GPSAreaInformation', |
| 172 | + 0x001d: 'GPSDateStamp', |
| 173 | + 0x001e: 'GPSDifferential', |
| 174 | + 0x001f: 'GPSHPositioningError' |
175 | 175 | } |
176 | 176 |
|
177 | 177 | loadImage.ExifMap.prototype.stringValues = { |
|
225 | 225 | 0x0005: 'Strobe return light not detected', |
226 | 226 | 0x0007: 'Strobe return light detected', |
227 | 227 | 0x0009: 'Flash fired, compulsory flash mode', |
228 | | - 0x000D: 'Flash fired, compulsory flash mode, return light not detected', |
229 | | - 0x000F: 'Flash fired, compulsory flash mode, return light detected', |
| 228 | + 0x000d: 'Flash fired, compulsory flash mode, return light not detected', |
| 229 | + 0x000f: 'Flash fired, compulsory flash mode, return light detected', |
230 | 230 | 0x0010: 'Flash did not fire, compulsory flash mode', |
231 | 231 | 0x0018: 'Flash did not fire, auto mode', |
232 | 232 | 0x0019: 'Flash fired, auto mode', |
233 | | - 0x001D: 'Flash fired, auto mode, return light not detected', |
234 | | - 0x001F: 'Flash fired, auto mode, return light detected', |
| 233 | + 0x001d: 'Flash fired, auto mode, return light not detected', |
| 234 | + 0x001f: 'Flash fired, auto mode, return light detected', |
235 | 235 | 0x0020: 'No flash function', |
236 | 236 | 0x0041: 'Flash fired, red-eye reduction mode', |
237 | 237 | 0x0045: 'Flash fired, red-eye reduction mode, return light not detected', |
238 | 238 | 0x0047: 'Flash fired, red-eye reduction mode, return light detected', |
239 | 239 | 0x0049: 'Flash fired, compulsory flash mode, red-eye reduction mode', |
240 | | - 0x004D: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', |
241 | | - 0x004F: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', |
| 240 | + 0x004d: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected', |
| 241 | + 0x004f: 'Flash fired, compulsory flash mode, red-eye reduction mode, return light detected', |
242 | 242 | 0x0059: 'Flash fired, auto mode, red-eye reduction mode', |
243 | | - 0x005D: 'Flash fired, auto mode, return light not detected, red-eye reduction mode', |
244 | | - 0x005F: 'Flash fired, auto mode, return light detected, red-eye reduction mode' |
| 243 | + 0x005d: 'Flash fired, auto mode, return light not detected, red-eye reduction mode', |
| 244 | + 0x005f: 'Flash fired, auto mode, return light detected, red-eye reduction mode' |
245 | 245 | }, |
246 | 246 | SensingMethod: { |
247 | 247 | 1: 'Undefined', |
|
347 | 347 | return String.fromCharCode(value[0], value[1], value[2], value[3]) |
348 | 348 | case 'ComponentsConfiguration': |
349 | 349 | if (!value) return |
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]] |
| 350 | + return ( |
| 351 | + this.stringValues[id][value[0]] + |
| 352 | + this.stringValues[id][value[1]] + |
| 353 | + this.stringValues[id][value[2]] + |
| 354 | + this.stringValues[id][value[3]] |
| 355 | + ) |
354 | 356 | case 'GPSVersionID': |
355 | 357 | if (!value) return |
356 | 358 | return value[0] + '.' + value[1] + '.' + value[2] + '.' + value[3] |
357 | 359 | } |
358 | 360 | return String(value) |
359 | 361 | } |
360 | | - |
361 | 362 | ;(function (exifMapPrototype) { |
362 | 363 | var tags = exifMapPrototype.tags |
363 | 364 | var map = exifMapPrototype.map |
|
368 | 369 | map[tags[prop]] = prop |
369 | 370 | } |
370 | 371 | } |
371 | | - }(loadImage.ExifMap.prototype)) |
| 372 | + })(loadImage.ExifMap.prototype) |
372 | 373 |
|
373 | 374 | loadImage.ExifMap.prototype.getAll = function () { |
374 | 375 | var map = {} |
|
384 | 385 | } |
385 | 386 | return map |
386 | 387 | } |
387 | | -})) |
| 388 | +}) |
0 commit comments