Araxis Merge File Comparison Report

Produced by Araxis Merge on Mon Jan 24 00:08:07 2005 UTC. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a reasonably standards compliant browser such as the latest version of Internet Explorer. For optimum results when printing this report, enable printing of background images and colours in your browser and use landscape orientation.

1. Files compared

# Location File Last Modified
1 e:\tech\cvs\coppermine\stable-head\include exif_php.inc.php Sat Jul 24 15:04:09 2004 UTC
2 e:\tech\cvs\coppermine\stable\include exif_php.inc.php Sun Jan 23 14:47:00 2005 UTC

2. Comparison summary

Description Between
Files 1 and 2
Blocks Lines
Unchanged 5 86
Changed 1 3
Inserted 3 103
Removed 0 0

3. Comparison options

Whitespace All differences in whitespace within lines are ignored
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Hidden in comparison detail

4. Active regular expressions

No regular expressions were active.

5. Comparison detail

1   <?php   1   <?php
2   // ------------------------------------------------------------------------- //   2   // ------------------------------------------------------------------------- //
3   // Coppermine Photo Gallery 1.3.2                                            //   3   // Coppermine Photo Gallery 1.3.2                                            //
4   // ------------------------------------------------------------------------- //   4   // ------------------------------------------------------------------------- //
(38 unchanged lines omitted)
43           $exifObj = new phpExifReader($filename);   43           $exifObj = new phpExifReader($filename);
44           $exif = $exifObj->getImageInfo();   44           $exif = $exifObj->getImageInfo();
45     45  
46           $exifParsed = array();   46           $exifParsed = array();
    47   // Translate EXIF strings to more sensical information
    48   // Put longer substrings before shorter ones, else the shorter ones will override
    49           $exFrom = array('isoEquiv','fnumber','exifComment', 'exposureTime','exposureMode','exposureBias','DateTime','meteringMode','flashUsed','flength35mm','whiteBalanceAuto','whiteBalance','distanceRange', 'zoomRatio','subjectArea','make','exposure','brightness','sceneType','jpegQuality');
    50           $exTo   = array('ISO', 'Exposure F-Stop','Comment', 'Exposure Shutter Speed', 'Exposure Auto/Manual', 'Exposure Bias (+/- ev)', 'Date Taken','Metering Mode','Flash Used','Zoom Optical (35mm equiv)','White Balance Mode','White Balance','Lens Focus (general)','Zoom Digital (ratio, 0-nx)','Subject Area', 'make','Camera Mode','Brightness','Digital Camera','JPEG Mode');
    51           $exIgnore = '/\A('.$CONFIG['exif_ignore1'].$CONFIG['exif_ignore2'].$CONFIG['exif_ignore3'].')\z/';
47     52          
    53   function exGetVals( $str ) {
    54           return preg_split('/[(),]+/',$str,-1,PREG_SPLIT_NO_EMPTY);
    55   }
    56   function exGetParenVal( $str ) {
    57           if (preg_match( '@\((.*)\)@', $str, $matches ) ) {
    58                   return $matches[1];
    59           }
    60           return "";
    61   }
    62          
    63           $exClean = array();
    64           foreach ($exif as $key=>$val) {
    65                   $origkey=$key;
    66                   $val = trim($val);      // always trim
    67                   $key = preg_replace($exIgnore,'ignoreit',$key);
    68                   $key = str_replace($exFrom,$exTo,$key);
    69                   $exClean[$key]=$val;
    70           }
    71          
    72           foreach ($exClean as $key=>$val) {
    73                   switch ($key) {
    74                   case 'White Balance Mode':
    75                           if (!isset($exClean['White Balance'])) {
    76                                   $exifParsed[$key] = $val; // default of inclusion
    77                           }
    78                           break;
    79                   case 'focalLength':
    80                           if (!isset($exClean['Zoom Optical (35mm equiv)'])) {
    81                                   //we need this version
    82                                   $vArray = exGetVals( $val );
    83                                   $val = $vArray[0]; // first approximation
    84                                   if (isset($exClean['CCDWidth'])) {
    85                                           // can calculate it
    86                                           $val = (int)(($val/$exClean['CCDWidth'])*36 + 0.5);
    87                                           $val .= 'mm';
    88                                   } else {
    89                                           $val .= ' (percent?)';
    90                                   }
    91                                   $exifParsed['Zoom Optical (35mm equiv)'] = $val;
    92                           }
    93                           break;
    94                   case 'model':
    95                   case 'CCDWidth':
    96                   case 'software':
    97                   case 'ignoreit':
    98                           break;
    99                   case 'Zoom Optical (35mm equiv)':
    100                           $exifParsed[$key] = $val.'mm';
    101                           break;
    102  
    103                   case 'Subject Area':
    104                           $vArray = exGetVals( $val );
    105                           if ($vArray[0] != 0.0) {
    106                                   $exifParsed[$key] = $val; // There's something there
    107                           }
    108                           break;
    109                   case 'White Balance':
    110                           if (isset($exClean['White Balance Mode'])) {
    111                                           $val = trim($exClean['White Balance Mode']).' '.$val;
    112                           }
    113                           $exifParsed[$key] = $val; // default of inclusion
    114                           break;
    115                   case 'Digital Camera': $val = ($val != 0)? "Yes" : "No"; break;
    116                   case 'make':    if (isset($exClean['model'])) {
    117                                           $val .= ' - '.trim($exClean['model']);
    118                                   }
    119                                   if (isset($exClean['software'])) {
    120                                           $val .= ' (sw: '.trim($exClean['software']).')';
    121                                   }
    122                                   $exifParsed['Camera'] = $val; // default of inclusion
    123                                   break;
    124                   // Display only the first value
    125                   //
    126                   case 'Brightness':
    127                   case 'Zoom Digital (ratio, 0-nx)':
    128                   case 'Exposure Bias (+/- ev)':
    129                           $vArray = exGetVals( $val );
    130                           if ($vArray[0] != 0) {
    131                                   $exifParsed[$key] = $vArray[0]; // Just the first number
    132                           }
    133                           break;                 
    134                   //
    135                   // Display only the value in parentheses
    136                   //
    137                   case 'Exposure Shutter Speed':
    138                           $vArray = exGetVals( $val );
    139                           $ct = count($vArray);
    140                           $val = $vArray[$ct-1];
    141                           //drop through to default
    142                   default:
    143                           $exifParsed[$key] = $val; // default of inclusion
    144                   }
    145           }
    146          
    147   if (0) { // Obsolete
48           $Make = isset($exif['make']);   148           $Make = isset($exif['make']);
49           $Model = isset($exif['model']);   149           $Model = isset($exif['model']);
50     150  
51           if (isset($exif['make']) && isset($exif['model'])){   151           if (isset($exif['make']) && isset($exif['model'])){
(24 unchanged lines omitted)
76                   $comment = $exif['exifComment'];   176                   $comment = $exif['exifComment'];
77                   $exifParsed['Comment'] = $comment; // eregi_replace("ASCII"," ", $comment);   177                   $exifParsed['Comment'] = $comment; // eregi_replace("ASCII"," ", $comment);
78           }   178           }
79     179  
    180   }
    181           ksort( $exifParsed );   // Display in alpha order
    182           reset( $exifParsed );
80           // Insert it into table for future reference   183           // Insert it into table for future reference
81           $sql = "INSERT INTO {$CONFIG['TABLE_EXIF']} ".   184           $sql = "INSERT INTO {$CONFIG['TABLE_EXIF']} ".
82                     "VALUES ('   $filename   ', '".addslashes(serialize($exifParsed))."')";   185                     "VALUES (' ".addslashes( $filename )." ', '".addslashes(serialize($exifParsed))."')";
83      
84           $result = db_query($sql);   186           $result = db_query($sql);
85     187  
86           return $exifParsed;   188           return $exifParsed;
87   }   189   }
88   ?>   190   ?>