summaryrefslogtreecommitdiff
path: root/includes/Exif.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Exif.php')
-rw-r--r--includes/Exif.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/includes/Exif.php b/includes/Exif.php
index bd93eb76..d5cf09cf 100644
--- a/includes/Exif.php
+++ b/includes/Exif.php
@@ -48,7 +48,7 @@ class Exif {
/**
* Exif tags grouped by category, the tagname itself is the key and the type
* is the value, in the case of more than one possible value type they are
- * seperated by commas.
+ * separated by commas.
*/
var $mExifTags;
@@ -780,7 +780,28 @@ class FormatExif {
}
break;
- // TODO: Flash
+ case 'Flash':
+ $flashDecode = array(
+ 'fired' => $val & bindec( '00000001' ),
+ 'return' => ($val & bindec( '00000110' )) >> 1,
+ 'mode' => ($val & bindec( '00011000' )) >> 3,
+ 'function' => ($val & bindec( '00100000' )) >> 5,
+ 'redeye' => ($val & bindec( '01000000' )) >> 6,
+// 'reserved' => ($val & bindec( '10000000' )) >> 7,
+ );
+
+ # We do not need to handle unknown values since all are used.
+ foreach( $flashDecode as $subTag => $subValue ) {
+ # We do not need any message for zeroed values.
+ if( $subTag != 'fired' && $subValue == 0) {
+ continue;
+ }
+ $fullTag = $tag . '-' . $subTag ;
+ $flashMsgs[] = $this->msg( $fullTag, $subValue );
+ }
+ $tags[$tag] = $wgLang->commaList( $flashMsgs );
+ break;
+
case 'FocalPlaneResolutionUnit':
switch( $val ) {
case 2: