Index: branches/img_metadata/phase3/includes/Exif.php |
— | — | @@ -191,7 +191,8 @@ |
192 | 192 | 'ExposureProgram' => Exif::SHORT, # Exposure Program #p38 |
193 | 193 | 'SpectralSensitivity' => Exif::ASCII, # Spectral sensitivity |
194 | 194 | 'ISOSpeedRatings' => Exif::SHORT, # ISO speed rating |
195 | | - 'OECF' => Exif::IGNORE, # Optoelectronic conversion factor. Note: We don't have support for this atm. |
| 195 | + 'OECF' => Exif::IGNORE, |
| 196 | + # Optoelectronic conversion factor. Note: We don't have support for this atm. |
196 | 197 | 'ShutterSpeedValue' => Exif::SRATIONAL, # Shutter speed |
197 | 198 | 'ApertureValue' => Exif::RATIONAL, # Aperture |
198 | 199 | 'BrightnessValue' => Exif::SRATIONAL, # Brightness |
— | — | @@ -224,7 +225,9 @@ |
225 | 226 | 'Contrast' => Exif::SHORT, # Contrast #p50 |
226 | 227 | 'Saturation' => Exif::SHORT, # Saturation #p50 |
227 | 228 | 'Sharpness' => Exif::SHORT, # Sharpness #p50 |
228 | | - 'DeviceSettingDescription' => Exif::IGNORE, # Desice settings description. FIXME: this could maybe be supported. |
| 229 | + 'DeviceSettingDescription' => Exif::IGNORE, |
| 230 | + # Desice settings description. This could maybe be supported. Need to find an |
| 231 | + # example file that uses this to see if it has stuff of interest in it. |
229 | 232 | 'SubjectDistanceRange' => Exif::SHORT, # Subject distance range #p51 |
230 | 233 | |
231 | 234 | 'ImageUniqueID' => Exif::ASCII, # Unique image ID |
— | — | @@ -232,12 +235,16 @@ |
233 | 236 | |
234 | 237 | # GPS Attribute Information (p52) |
235 | 238 | 'GPS' => array( |
236 | | - 'GPSVersion' => Exif::UNDEFINED, # array( Exif::BYTE, 4 ) GPS tag version. Note exif standard calls this GPSVersionID, but php doesn't like the id. also php thinks its wrong type |
| 239 | + 'GPSVersion' => Exif::UNDEFINED, |
| 240 | + # Should be an array of 4 Exif::BYTE's. However php treats it as an undefined |
| 241 | + # Note exif standard calls this GPSVersionID, but php doesn't like the id suffix |
237 | 242 | 'GPSLatitudeRef' => Exif::ASCII, # North or South Latitude #p52-53 |
238 | 243 | 'GPSLatitude' => array( Exif::RATIONAL, 3 ), # Latitude |
239 | 244 | 'GPSLongitudeRef' => Exif::ASCII, # East or West Longitude #p53 |
240 | 245 | 'GPSLongitude' => array( Exif::RATIONAL, 3), # Longitude |
241 | | - 'GPSAltitudeRef' => Exif::UNDEFINED, # Altitude reference. Note, the exif standard says this should be an EXIF::Byte, but php seems to disagree. |
| 246 | + 'GPSAltitudeRef' => Exif::UNDEFINED, |
| 247 | + # Altitude reference. Note, the exif standard says this should be an EXIF::Byte, |
| 248 | + # but php seems to disagree. |
242 | 249 | 'GPSAltitude' => Exif::RATIONAL, # Altitude |
243 | 250 | 'GPSTimeStamp' => array( Exif::RATIONAL, 3), # GPS time (atomic clock) |
244 | 251 | 'GPSSatellites' => Exif::ASCII, # Satellites used for measurement |
— | — | @@ -347,14 +354,15 @@ |
348 | 355 | unset( $this->mFilteredExifData['GPSAltitudeRef'] ); |
349 | 356 | } |
350 | 357 | |
351 | | - $this->getOrd( 'FileSource' ); |
352 | | - $this->getOrd( 'SceneType' ); |
| 358 | + $this->exifPropToOrd( 'FileSource' ); |
| 359 | + $this->exifPropToOrd( 'SceneType' ); |
353 | 360 | |
354 | 361 | $this->charCodeString( 'UserComment' ); |
355 | 362 | $this->charCodeString( 'GPSProcessingMethod'); |
356 | 363 | $this->charCodeString( 'GPSAreaInformation' ); |
357 | 364 | |
358 | 365 | //ComponentsConfiguration should really be an array instead of a string... |
| 366 | + //This turns a string of binary numbers into an array of numbers. |
359 | 367 | |
360 | 368 | if ( isset ( $this->mFilteredExifData['ComponentsConfiguration'] ) ) { |
361 | 369 | $val = $this->mFilteredExifData['ComponentsConfiguration']; |
— | — | @@ -366,8 +374,13 @@ |
367 | 375 | $this->mFilteredExifData['ComponentsConfiguration'] = $ccVals; |
368 | 376 | } |
369 | 377 | |
370 | | - //GPSVersion(ID) is just very screwed up by php |
371 | | - //put into a version string, and change the tag name. |
| 378 | + //GPSVersion(ID) is treated as the wrong type by php exif support. |
| 379 | + //Go through each byte turning it into a version string. |
| 380 | + //For example: "\x00\x00\x02\x02" -> "2.2.0.0" |
| 381 | + |
| 382 | + //Also change exif tag name from GPSVersion (what php exif thinks it is) |
| 383 | + //to GPSVersionID (what the exif standard thinks it is). |
| 384 | + |
372 | 385 | if ( isset ( $this->mFilteredExifData['GPSVersion'] ) ) { |
373 | 386 | $val = $this->mFilteredExifData['GPSVersion']; |
374 | 387 | $newVal = ''; |
— | — | @@ -433,7 +446,7 @@ |
434 | 447 | * the type of UNDEFINED field |
435 | 448 | * @param $prop String name of property |
436 | 449 | */ |
437 | | - private function getOrd ( $prop ) { |
| 450 | + private function exifPropToOrd ( $prop ) { |
438 | 451 | if ( isset( $this->mFilteredExifData[$prop] ) ) { |
439 | 452 | $this->mFilteredExifData[$prop] = ord( $this->mFilteredExifData[$prop] ); |
440 | 453 | } |
Index: branches/img_metadata/phase3/languages/messages/MessagesEn.php |
— | — | @@ -3916,8 +3916,8 @@ |
3917 | 3917 | 'exif-gpslongitude-w' => 'West longitude', |
3918 | 3918 | |
3919 | 3919 | # Pseudotags used for GPSAltitude |
3920 | | -'exif-gpsaltitude-above-sealevel' => '$1 Metres above sea level', |
3921 | | -'exif-gpsaltitude-below-sealevel' => '$1 Metres below sea level', |
| 3920 | +'exif-gpsaltitude-above-sealevel' => '$1 meters above sea level', |
| 3921 | +'exif-gpsaltitude-below-sealevel' => '$1 meters below sea level', |
3922 | 3922 | |
3923 | 3923 | 'exif-gpsstatus-a' => 'Measurement in progress', |
3924 | 3924 | 'exif-gpsstatus-v' => 'Measurement interoperability', |