Implement the updated version of gallery3-vendor/exifer which has gettext replaced with calls to the gallery t method to provide translation. Fixes ticket 672.

This commit is contained in:
Tim Almdal 2009-09-22 11:09:04 -07:00
parent bec620487a
commit 1e7a2f5808
7 changed files with 407 additions and 407 deletions

View File

@ -414,125 +414,125 @@ function formatData($type,$tag,$intel,$data) {
if ($tag == '0112') { // Orientation
// Example of how all of these tag formatters should be...
switch ($data) {
case 1 : $data = gettext('1: Normal (0 deg)'); break;
case 2 : $data = gettext('2: Mirrored'); break;
case 3 : $data = gettext('3: Upsidedown'); break;
case 4 : $data = gettext('4: Upsidedown Mirrored'); break;
case 5 : $data = gettext('5: 90 deg CW Mirrored'); break;
case 6 : $data = gettext('6: 90 deg CCW'); break;
case 7 : $data = gettext('7: 90 deg CCW Mirrored'); break;
case 8 : $data = gettext('8: 90 deg CW'); break;
default : $data = gettext('Unknown').': '.$data;
case 1 : $data = (string) t('1: Normal (0 deg)'); break;
case 2 : $data = (string) t('2: Mirrored'); break;
case 3 : $data = (string) t('3: Upsidedown'); break;
case 4 : $data = (string) t('4: Upsidedown Mirrored'); break;
case 5 : $data = (string) t('5: 90 deg CW Mirrored'); break;
case 6 : $data = (string) t('6: 90 deg CCW'); break;
case 7 : $data = (string) t('7: 90 deg CCW Mirrored'); break;
case 8 : $data = (string) t('8: 90 deg CW'); break;
default : $data = (string) t('Unknown').': '.$data;
}
} else if ($tag == '0128' || $tag == 'a210' || $tag == '0128') { // ResolutionUnit and FocalPlaneResolutionUnit and ThumbnailResolutionUnit
if ($data == 1) $data = gettext('No Unit');
else if ($data == 2) $data = gettext('Inch');
else if ($data == 3) $data = gettext('Centimeter');
if ($data == 1) $data = (string) t('No Unit');
else if ($data == 2) $data = (string) t('Inch');
else if ($data == 3) $data = (string) t('Centimeter');
} else if ($tag == '0213') { // YCbCrPositioning
if ($data == 1) $data = gettext('Center of Pixel Array');
else if ($data == 2) $data = gettext('Datum Point');
if ($data == 1) $data = (string) t('Center of Pixel Array');
else if ($data == 2) $data = (string) t('Datum Point');
} else if ($tag == '8822') { // ExposureProgram
if ($data == 1) $data = gettext('Manual');
else if ($data == 2) $data = gettext('Program');
else if ($data == 3) $data = gettext('Aperture Priority');
else if ($data == 4) $data = gettext('Shutter Priority');
else if ($data == 5) $data = gettext('Program Creative');
else if ($data == 6) $data = gettext('Program Action');
else if ($data == 7) $data = gettext('Portrat');
else if ($data == 8) $data = gettext('Landscape');
else $data = gettext('Unknown').': '.$data;
if ($data == 1) $data = (string) t('Manual');
else if ($data == 2) $data = (string) t('Program');
else if ($data == 3) $data = (string) t('Aperture Priority');
else if ($data == 4) $data = (string) t('Shutter Priority');
else if ($data == 5) $data = (string) t('Program Creative');
else if ($data == 6) $data = (string) t('Program Action');
else if ($data == 7) $data = (string) t('Portrat');
else if ($data == 8) $data = (string) t('Landscape');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == '9207') { // MeteringMode
if ($data == 0) $data = gettext('Unknown');
else if ($data == 1) $data = gettext('Average');
else if ($data == 2) $data = gettext('Center Weighted Average');
else if ($data == 3) $data = gettext('Spot');
else if ($data == 4) $data = gettext('Multi-Spot');
else if ($data == 5) $data = gettext('Multi-Segment');
else if ($data == 6) $data = gettext('Partial');
else if ($data == 255) $data = gettext('Other');
else $data = gettext('Unknown').': '.$data;
if ($data == 0) $data = (string) t('Unknown');
else if ($data == 1) $data = (string) t('Average');
else if ($data == 2) $data = (string) t('Center Weighted Average');
else if ($data == 3) $data = (string) t('Spot');
else if ($data == 4) $data = (string) t('Multi-Spot');
else if ($data == 5) $data = (string) t('Multi-Segment');
else if ($data == 6) $data = (string) t('Partial');
else if ($data == 255) $data = (string) t('Other');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == '9208') { // LightSource
if ($data == 0) $data = gettext('Unknown or Auto');
else if ($data == 1) $data = gettext('Daylight');
else if ($data == 2) $data = gettext('Flourescent');
else if ($data == 3) $data = gettext('Tungsten'); // 3 Tungsten (Incandescent light)
if ($data == 0) $data = (string) t('Unknown or Auto');
else if ($data == 1) $data = (string) t('Daylight');
else if ($data == 2) $data = (string) t('Flourescent');
else if ($data == 3) $data = (string) t('Tungsten'); // 3 Tungsten (Incandescent light)
// 4 Flash
// 9 Fine Weather
else if ($data == 10) $data = gettext('Flash'); // 10 Cloudy Weather
else if ($data == 10) $data = (string) t('Flash'); // 10 Cloudy Weather
// 11 Shade
// 12 Daylight Fluorescent (D 5700 - 7100K)
// 13 Day White Fluorescent (N 4600 - 5400K)
// 14 Cool White Fluorescent (W 3900 -4500K)
// 15 White Fluorescent (WW 3200 - 3700K)
// 10 Flash
else if ($data == 17) $data = gettext('Standard Light A');
else if ($data == 18) $data = gettext('Standard Light B');
else if ($data == 19) $data = gettext('Standard Light C');
else if ($data == 20) $data = gettext('D55');
else if ($data == 21) $data = gettext('D65');
else if ($data == 22) $data = gettext('D75');
else if ($data == 23) $data = gettext('D50');
else if ($data == 24) $data = gettext('ISO Studio Tungsten');
else if ($data == 255) $data = gettext('Other');
else $data = gettext('Unknown').': '.$data;
else if ($data == 17) $data = (string) t('Standard Light A');
else if ($data == 18) $data = (string) t('Standard Light B');
else if ($data == 19) $data = (string) t('Standard Light C');
else if ($data == 20) $data = (string) t('D55');
else if ($data == 21) $data = (string) t('D65');
else if ($data == 22) $data = (string) t('D75');
else if ($data == 23) $data = (string) t('D50');
else if ($data == 24) $data = (string) t('ISO Studio Tungsten');
else if ($data == 255) $data = (string) t('Other');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == '9209') { // Flash
if ($data == 0) $data = gettext('No Flash');
else if ($data == 1) $data = gettext('Flash');
else if ($data == 5) $data = gettext('Flash, strobe return light not detected');
else if ($data == 7) $data = gettext('Flash, strobe return light detected');
else if ($data == 9) $data = gettext('Compulsory Flash');
else if ($data == 13) $data = gettext('Compulsory Flash, Return light not detected');
else if ($data == 15) $data = gettext('Compulsory Flash, Return light detected');
else if ($data == 16) $data = gettext('No Flash');
else if ($data == 24) $data = gettext('No Flash');
else if ($data == 25) $data = gettext('Flash, Auto-Mode');
else if ($data == 29) $data = gettext('Flash, Auto-Mode, Return light not detected');
else if ($data == 31) $data = gettext('Flash, Auto-Mode, Return light detected');
else if ($data == 32) $data = gettext('No Flash');
else if ($data == 65) $data = gettext('Red Eye');
else if ($data == 69) $data = gettext('Red Eye, Return light not detected');
else if ($data == 71) $data = gettext('Red Eye, Return light detected');
else if ($data == 73) $data = gettext('Red Eye, Compulsory Flash');
else if ($data == 77) $data = gettext('Red Eye, Compulsory Flash, Return light not detected');
else if ($data == 79) $data = gettext('Red Eye, Compulsory Flash, Return light detected');
else if ($data == 89) $data = gettext('Red Eye, Auto-Mode');
else if ($data == 93) $data = gettext('Red Eye, Auto-Mode, Return light not detected');
else if ($data == 95) $data = gettext('Red Eye, Auto-Mode, Return light detected');
else $data = gettext('Unknown').': '.$data;
if ($data == 0) $data = (string) t('No Flash');
else if ($data == 1) $data = (string) t('Flash');
else if ($data == 5) $data = (string) t('Flash, strobe return light not detected');
else if ($data == 7) $data = (string) t('Flash, strobe return light detected');
else if ($data == 9) $data = (string) t('Compulsory Flash');
else if ($data == 13) $data = (string) t('Compulsory Flash, Return light not detected');
else if ($data == 15) $data = (string) t('Compulsory Flash, Return light detected');
else if ($data == 16) $data = (string) t('No Flash');
else if ($data == 24) $data = (string) t('No Flash');
else if ($data == 25) $data = (string) t('Flash, Auto-Mode');
else if ($data == 29) $data = (string) t('Flash, Auto-Mode, Return light not detected');
else if ($data == 31) $data = (string) t('Flash, Auto-Mode, Return light detected');
else if ($data == 32) $data = (string) t('No Flash');
else if ($data == 65) $data = (string) t('Red Eye');
else if ($data == 69) $data = (string) t('Red Eye, Return light not detected');
else if ($data == 71) $data = (string) t('Red Eye, Return light detected');
else if ($data == 73) $data = (string) t('Red Eye, Compulsory Flash');
else if ($data == 77) $data = (string) t('Red Eye, Compulsory Flash, Return light not detected');
else if ($data == 79) $data = (string) t('Red Eye, Compulsory Flash, Return light detected');
else if ($data == 89) $data = (string) t('Red Eye, Auto-Mode');
else if ($data == 93) $data = (string) t('Red Eye, Auto-Mode, Return light not detected');
else if ($data == 95) $data = (string) t('Red Eye, Auto-Mode, Return light detected');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == 'a001') { // ColorSpace
if ($data == 1) $data = gettext('sRGB');
else $data = gettext('Uncalibrated');
if ($data == 1) $data = (string) t('sRGB');
else $data = (string) t('Uncalibrated');
} else if ($tag == 'a002' || $tag == 'a003') { // ExifImageWidth/Height
$data = $data. ' '.gettext('pixels');
$data = $data. ' '.(string) t('pixels');
} else if ($tag == '0103') { // Compression
if ($data == 1) $data = gettext('No Compression');
else if ($data == 6) $data = gettext('Jpeg Compression');
else $data = gettext('Unknown').': '.$data;
if ($data == 1) $data = (string) t('No Compression');
else if ($data == 6) $data = (string) t('Jpeg Compression');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == 'a217') { // SensingMethod
if ($data == 1) $data = gettext('Not defined');
if ($data == 2) $data = gettext('One Chip Color Area Sensor');
if ($data == 3) $data = gettext('Two Chip Color Area Sensor');
if ($data == 4) $data = gettext('Three Chip Color Area Sensor');
if ($data == 5) $data = gettext('Color Sequential Area Sensor');
if ($data == 7) $data = gettext('Trilinear Sensor');
if ($data == 8) $data = gettext('Color Sequential Linear Sensor');
else $data = gettext('Unknown').': '.$data;
if ($data == 1) $data = (string) t('Not defined');
if ($data == 2) $data = (string) t('One Chip Color Area Sensor');
if ($data == 3) $data = (string) t('Two Chip Color Area Sensor');
if ($data == 4) $data = (string) t('Three Chip Color Area Sensor');
if ($data == 5) $data = (string) t('Color Sequential Area Sensor');
if ($data == 7) $data = (string) t('Trilinear Sensor');
if ($data == 8) $data = (string) t('Color Sequential Linear Sensor');
else $data = (string) t('Unknown').': '.$data;
} else if ($tag == '0106') { // PhotometricInterpretation
if ($data == 1) $data = gettext('Monochrome');
else if ($data == 2) $data = gettext('RGB');
else if ($data == 6) $data = gettext('YCbCr');
else $data = gettext('Unknown').': '.$data;
if ($data == 1) $data = (string) t('Monochrome');
else if ($data == 2) $data = (string) t('RGB');
else if ($data == 6) $data = (string) t('YCbCr');
else $data = (string) t('Unknown').': '.$data;
}
//} else if($tag=="a408" || $tag=="a40a") { // Contrast, Sharpness
// switch($data) {
@ -559,17 +559,17 @@ function formatData($type,$tag,$intel,$data) {
} else if ($type == 'UNDEFINED') {
if ($tag == '9000' || $tag == 'a000' || $tag == '0002') { // ExifVersion,FlashPixVersion,InteroperabilityVersion
$data=gettext('version').' '.$data/100;
$data=(string) t('version').' '.$data/100;
}
if ($tag == 'a300') { // FileSource
$data = bin2hex($data);
$data = str_replace('00','',$data);
$data = str_replace('03',gettext('Digital Still Camera'),$data);
$data = str_replace('03',(string) t('Digital Still Camera'),$data);
}
if ($tag == 'a301') { // SceneType
$data = bin2hex($data);
$data = str_replace('00','',$data);
$data = str_replace('01',gettext('Directly Photographed'),$data);
$data = str_replace('01',(string) t('Directly Photographed'),$data);
}
if ($tag == '9101') { // ComponentsConfiguration
$data = bin2hex($data);
@ -596,14 +596,14 @@ function formatData($type,$tag,$intel,$data) {
function formatExposure($data) {
if ($data > 0) {
if ($data > 1) {
return round($data, 2).' '.gettext('sec');
return round($data, 2).' '.(string) t('sec');
} else {
$n=0; $d=0;
ConvertToFraction($data, $n, $d);
return $n.'/'.$d.' '.gettext('sec');
return $n.'/'.$d.' '.(string) t('sec');
}
} else {
return gettext('Bulb');
return (string) t('Bulb');
}
}
@ -740,7 +740,7 @@ function read_exif_data_raw($path,$verbose) {
if (!$in || !$seek) { // if the path was invalid, this error will catch it
$result['Errors'] = 1;
$result['Error'][$result['Errors']] = gettext('The file could not be found.');
$result['Error'][$result['Errors']] = (string) t('The file could not be found.');
return $result;
}
@ -907,7 +907,7 @@ if ($result['ValidJpeg'] == 1) {
$v = fseek($in,$globalOffset+$ExitOffset);
if ($v == -1) {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Couldnt Find SubIFD');
$result['Error'][$result['Errors']] = (string) t('Couldnt Find SubIFD');
}
//===========================================================
@ -923,7 +923,7 @@ if ($result['ValidJpeg'] == 1) {
}
} else {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Illegal size for SubIFD');
$result['Error'][$result['Errors']] = (string) t('Illegal size for SubIFD');
}
// Add the 35mm equivalent focal length:
@ -939,7 +939,7 @@ if ($result['ValidJpeg'] == 1) {
$v = fseek($in,$globalOffset+$result['IFD1Offset']);
if ($v == -1) {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Couldnt Find IFD1');
$result['Error'][$result['Errors']] = (string) t('Couldnt Find IFD1');
}
//===========================================================
@ -955,7 +955,7 @@ if ($result['ValidJpeg'] == 1) {
}
} else {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Illegal size for IFD1');
$result['Error'][$result['Errors']] = (string) t('Illegal size for IFD1');
}
// If verbose output is on, include the thumbnail raw data...
if ($result['VerboseOutput'] == 1 && $result['IFD1']['JpegIFOffset']>0 && $result['IFD1']['JpegIFByteCount']>0) {
@ -979,7 +979,7 @@ if ($result['ValidJpeg'] == 1) {
$v = fseek($in,$globalOffset+$result['SubIFD']['ExifInteroperabilityOffset']);
if ($v == -1) {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Couldnt Find InteroperabilityIFD');
$result['Error'][$result['Errors']] = (string) t('Couldnt Find InteroperabilityIFD');
}
//===========================================================
@ -995,7 +995,7 @@ if ($result['ValidJpeg'] == 1) {
}
} else {
$result['Errors'] = $result['Errors']+1;
$result['Error'][$result['Errors']] = gettext('Illegal size for InteroperabilityIFD');
$result['Error'][$result['Errors']] = (string) t('Illegal size for InteroperabilityIFD');
}
fclose($in);
fclose($seek);

View File

@ -79,151 +79,151 @@ function formatCanonData($type,$tag,$intel,$data,$exif,&$result) {
if ($result['Bytes'] != strlen($data) / 2) return $result; //Bad chunk
$result['Macro']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//1
switch($result['Macro']) {
case 1: $result['Macro'] = gettext("Macro"); break;
case 2: $result['Macro'] = gettext("Normal"); break;
default: $result['Macro'] = gettext("Unknown");
case 1: $result['Macro'] = (string) t("Macro"); break;
case 2: $result['Macro'] = (string) t("Normal"); break;
default: $result['Macro'] = (string) t("Unknown");
}
$result['SelfTimer']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//2
switch($result['SelfTimer']) {
case 0: $result['SelfTimer'] = gettext("Off"); break;
default: $result['SelfTimer'] .= gettext("/10s");
case 0: $result['SelfTimer'] = (string) t("Off"); break;
default: $result['SelfTimer'] .= (string) t("/10s");
}
$result['Quality']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//3
switch($result['Quality']) {
case 2: $result['Quality'] = gettext("Normal"); break;
case 3: $result['Quality'] = gettext("Fine"); break;
case 5: $result['Quality'] = gettext("Superfine"); break;
default: $result['Quality'] = gettext("Unknown");
case 2: $result['Quality'] = (string) t("Normal"); break;
case 3: $result['Quality'] = (string) t("Fine"); break;
case 5: $result['Quality'] = (string) t("Superfine"); break;
default: $result['Quality'] = (string) t("Unknown");
}
$result['Flash']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//4
switch($result['Flash']) {
case 0: $result['Flash'] = gettext("Off"); break;
case 1: $result['Flash'] = gettext("Auto"); break;
case 2: $result['Flash'] = gettext("On"); break;
case 3: $result['Flash'] = gettext("Red Eye Reduction"); break;
case 4: $result['Flash'] = gettext("Slow Synchro"); break;
case 5: $result['Flash'] = gettext("Auto + Red Eye Reduction"); break;
case 6: $result['Flash'] = gettext("On + Red Eye Reduction"); break;
case 16: $result['Flash'] = gettext("External Flash"); break;
default: $result['Flash'] = gettext("Unknown");
case 0: $result['Flash'] = (string) t("Off"); break;
case 1: $result['Flash'] = (string) t("Auto"); break;
case 2: $result['Flash'] = (string) t("On"); break;
case 3: $result['Flash'] = (string) t("Red Eye Reduction"); break;
case 4: $result['Flash'] = (string) t("Slow Synchro"); break;
case 5: $result['Flash'] = (string) t("Auto + Red Eye Reduction"); break;
case 6: $result['Flash'] = (string) t("On + Red Eye Reduction"); break;
case 16: $result['Flash'] = (string) t("External Flash"); break;
default: $result['Flash'] = (string) t("Unknown");
}
$result['DriveMode']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//5
switch($result['DriveMode']) {
case 0: $result['DriveMode'] = gettext("Single/Timer"); break;
case 1: $result['DriveMode'] = gettext("Continuous"); break;
default: $result['DriveMode'] = gettext("Unknown");
case 0: $result['DriveMode'] = (string) t("Single/Timer"); break;
case 1: $result['DriveMode'] = (string) t("Continuous"); break;
default: $result['DriveMode'] = (string) t("Unknown");
}
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//6
$result['FocusMode']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//7
switch($result['FocusMode']) {
case 0: $result['FocusMode'] = gettext("One-Shot"); break;
case 1: $result['FocusMode'] = gettext("AI Servo"); break;
case 2: $result['FocusMode'] = gettext("AI Focus"); break;
case 3: $result['FocusMode'] = gettext("Manual Focus"); break;
case 4: $result['FocusMode'] = gettext("Single"); break;
case 5: $result['FocusMode'] = gettext("Continuous"); break;
case 6: $result['FocusMode'] = gettext("Manual Focus"); break;
default: $result['FocusMode'] = gettext("Unknown");
case 0: $result['FocusMode'] = (string) t("One-Shot"); break;
case 1: $result['FocusMode'] = (string) t("AI Servo"); break;
case 2: $result['FocusMode'] = (string) t("AI Focus"); break;
case 3: $result['FocusMode'] = (string) t("Manual Focus"); break;
case 4: $result['FocusMode'] = (string) t("Single"); break;
case 5: $result['FocusMode'] = (string) t("Continuous"); break;
case 6: $result['FocusMode'] = (string) t("Manual Focus"); break;
default: $result['FocusMode'] = (string) t("Unknown");
}
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//8
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//9
$result['ImageSize']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//10
switch($result['ImageSize']) {
case 0: $result['ImageSize'] = gettext("Large"); break;
case 1: $result['ImageSize'] = gettext("Medium"); break;
case 2: $result['ImageSize'] = gettext("Small"); break;
default: $result['ImageSize'] = gettext("Unknown");
case 0: $result['ImageSize'] = (string) t("Large"); break;
case 1: $result['ImageSize'] = (string) t("Medium"); break;
case 2: $result['ImageSize'] = (string) t("Small"); break;
default: $result['ImageSize'] = (string) t("Unknown");
}
$result['EasyShooting']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//11
switch($result['EasyShooting']) {
case 0: $result['EasyShooting'] = gettext("Full Auto"); break;
case 1: $result['EasyShooting'] = gettext("Manual"); break;
case 2: $result['EasyShooting'] = gettext("Landscape"); break;
case 3: $result['EasyShooting'] = gettext("Fast Shutter"); break;
case 4: $result['EasyShooting'] = gettext("Slow Shutter"); break;
case 5: $result['EasyShooting'] = gettext("Night"); break;
case 6: $result['EasyShooting'] = gettext("Black & White"); break;
case 7: $result['EasyShooting'] = gettext("Sepia"); break;
case 8: $result['EasyShooting'] = gettext("Portrait"); break;
case 9: $result['EasyShooting'] = gettext("Sport"); break;
case 10: $result['EasyShooting'] = gettext("Macro/Close-Up"); break;
case 11: $result['EasyShooting'] = gettext("Pan Focus"); break;
default: $result['EasyShooting'] = gettext("Unknown");
case 0: $result['EasyShooting'] = (string) t("Full Auto"); break;
case 1: $result['EasyShooting'] = (string) t("Manual"); break;
case 2: $result['EasyShooting'] = (string) t("Landscape"); break;
case 3: $result['EasyShooting'] = (string) t("Fast Shutter"); break;
case 4: $result['EasyShooting'] = (string) t("Slow Shutter"); break;
case 5: $result['EasyShooting'] = (string) t("Night"); break;
case 6: $result['EasyShooting'] = (string) t("Black & White"); break;
case 7: $result['EasyShooting'] = (string) t("Sepia"); break;
case 8: $result['EasyShooting'] = (string) t("Portrait"); break;
case 9: $result['EasyShooting'] = (string) t("Sport"); break;
case 10: $result['EasyShooting'] = (string) t("Macro/Close-Up"); break;
case 11: $result['EasyShooting'] = (string) t("Pan Focus"); break;
default: $result['EasyShooting'] = (string) t("Unknown");
}
$result['DigitalZoom']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//12
switch($result['DigitalZoom']) {
case 0:
case 65535: $result['DigitalZoom'] = gettext("None"); break;
case 1: $result['DigitalZoom'] = gettext("2x"); break;
case 2: $result['DigitalZoom'] = gettext("4x"); break;
default: $result['DigitalZoom'] = gettext("Unknown");
case 65535: $result['DigitalZoom'] = (string) t("None"); break;
case 1: $result['DigitalZoom'] = (string) t("2x"); break;
case 2: $result['DigitalZoom'] = (string) t("4x"); break;
default: $result['DigitalZoom'] = (string) t("Unknown");
}
$result['Contrast']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//13
switch($result['Contrast']) {
case 0: $result['Contrast'] = gettext("Normal"); break;
case 1: $result['Contrast'] = gettext("High"); break;
case 65535: $result['Contrast'] = gettext("Low"); break;
default: $result['Contrast'] = gettext("Unknown");
case 0: $result['Contrast'] = (string) t("Normal"); break;
case 1: $result['Contrast'] = (string) t("High"); break;
case 65535: $result['Contrast'] = (string) t("Low"); break;
default: $result['Contrast'] = (string) t("Unknown");
}
$result['Saturation']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//14
switch($result['Saturation']) {
case 0: $result['Saturation'] = gettext("Normal"); break;
case 1: $result['Saturation'] = gettext("High"); break;
case 65535: $result['Saturation'] = gettext("Low"); break;
default: $result['Saturation'] = gettext("Unknown");
case 0: $result['Saturation'] = (string) t("Normal"); break;
case 1: $result['Saturation'] = (string) t("High"); break;
case 65535: $result['Saturation'] = (string) t("Low"); break;
default: $result['Saturation'] = (string) t("Unknown");
}
$result['Sharpness']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//15
switch($result['Sharpness']) {
case 0: $result['Sharpness'] = gettext("Normal"); break;
case 1: $result['Sharpness'] = gettext("High"); break;
case 65535: $result['Sharpness'] = gettext("Low"); break;
default: $result['Sharpness'] = gettext("Unknown");
case 0: $result['Sharpness'] = (string) t("Normal"); break;
case 1: $result['Sharpness'] = (string) t("High"); break;
case 65535: $result['Sharpness'] = (string) t("Low"); break;
default: $result['Sharpness'] = (string) t("Unknown");
}
$result['ISO']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//16
switch($result['ISO']) {
case 32767:
case 0: $result['ISO'] = isset($exif['SubIFD']['ISOSpeedRatings'])
? $exif['SubIFD']['ISOSpeedRatings'] : 'Unknown'; break;
case 15: $result['ISO'] = gettext("Auto"); break;
case 16: $result['ISO'] = gettext("50"); break;
case 17: $result['ISO'] = gettext("100"); break;
case 18: $result['ISO'] = gettext("200"); break;
case 19: $result['ISO'] = gettext("400"); break;
default: $result['ISO'] = gettext("Unknown");
case 15: $result['ISO'] = (string) t("Auto"); break;
case 16: $result['ISO'] = (string) t("50"); break;
case 17: $result['ISO'] = (string) t("100"); break;
case 18: $result['ISO'] = (string) t("200"); break;
case 19: $result['ISO'] = (string) t("400"); break;
default: $result['ISO'] = (string) t("Unknown");
}
$result['MeteringMode']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//17
switch($result['MeteringMode']) {
case 3: $result['MeteringMode'] = gettext("Evaluative"); break;
case 4: $result['MeteringMode'] = gettext("Partial"); break;
case 5: $result['MeteringMode'] = gettext("Center-weighted"); break;
default: $result['MeteringMode'] = gettext("Unknown");
case 3: $result['MeteringMode'] = (string) t("Evaluative"); break;
case 4: $result['MeteringMode'] = (string) t("Partial"); break;
case 5: $result['MeteringMode'] = (string) t("Center-weighted"); break;
default: $result['MeteringMode'] = (string) t("Unknown");
}
$result['FocusType']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//18
switch($result['FocusType']) {
case 0: $result['FocusType'] = gettext("Manual"); break;
case 1: $result['FocusType'] = gettext("Auto"); break;
case 3: $result['FocusType'] = gettext("Close-up (Macro)"); break;
case 8: $result['FocusType'] = gettext("Locked (Pan Mode)"); break;
default: $result['FocusType'] = gettext("Unknown");
case 0: $result['FocusType'] = (string) t("Manual"); break;
case 1: $result['FocusType'] = (string) t("Auto"); break;
case 3: $result['FocusType'] = (string) t("Close-up (Macro)"); break;
case 8: $result['FocusType'] = (string) t("Locked (Pan Mode)"); break;
default: $result['FocusType'] = (string) t("Unknown");
}
$result['AFPointSelected']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//19
switch($result['AFPointSelected']) {
case 12288: $result['AFPointSelected'] = gettext("Manual Focus"); break;
case 12289: $result['AFPointSelected'] = gettext("Auto Selected"); break;
case 12290: $result['AFPointSelected'] = gettext("Right"); break;
case 12291: $result['AFPointSelected'] = gettext("Center"); break;
case 12292: $result['AFPointSelected'] = gettext("Left"); break;
default: $result['AFPointSelected'] = gettext("Unknown");
case 12288: $result['AFPointSelected'] = (string) t("Manual Focus"); break;
case 12289: $result['AFPointSelected'] = (string) t("Auto Selected"); break;
case 12290: $result['AFPointSelected'] = (string) t("Right"); break;
case 12291: $result['AFPointSelected'] = (string) t("Center"); break;
case 12292: $result['AFPointSelected'] = (string) t("Left"); break;
default: $result['AFPointSelected'] = (string) t("Unknown");
}
$result['ExposureMode']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//20
switch($result['ExposureMode']) {
case 0: $result['ExposureMode'] = gettext("EasyShoot"); break;
case 1: $result['ExposureMode'] = gettext("Program"); break;
case 2: $result['ExposureMode'] = gettext("Tv"); break;
case 3: $result['ExposureMode'] = gettext("Av"); break;
case 4: $result['ExposureMode'] = gettext("Manual"); break;
case 5: $result['ExposureMode'] = gettext("Auto-DEP"); break;
default: $result['ExposureMode'] = gettext("Unknown");
case 0: $result['ExposureMode'] = (string) t("EasyShoot"); break;
case 1: $result['ExposureMode'] = (string) t("Program"); break;
case 2: $result['ExposureMode'] = (string) t("Tv"); break;
case 3: $result['ExposureMode'] = (string) t("Av"); break;
case 4: $result['ExposureMode'] = (string) t("Manual"); break;
case 5: $result['ExposureMode'] = (string) t("Auto-DEP"); break;
default: $result['ExposureMode'] = (string) t("Unknown");
}
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//21
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//22
@ -237,26 +237,26 @@ function formatCanonData($type,$tag,$intel,$data,$exif,&$result) {
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//27
$result['FlashActivity']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//28
switch($result['FlashActivity']) {
case 0: $result['FlashActivity'] = gettext("Flash Did Not Fire"); break;
case 1: $result['FlashActivity'] = gettext("Flash Fired"); break;
default: $result['FlashActivity'] = gettext("Unknown");
case 0: $result['FlashActivity'] = (string) t("Flash Did Not Fire"); break;
case 1: $result['FlashActivity'] = (string) t("Flash Fired"); break;
default: $result['FlashActivity'] = (string) t("Unknown");
}
$result['FlashDetails']=str_pad(base_convert(intel2Moto(substr($data,$place,4)), 16, 2), 16, "0", STR_PAD_LEFT);$place+=4;//29
$flashDetails = array();
if (substr($result['FlashDetails'], 1, 1) == 1) { $flashDetails[] = gettext('External E-TTL'); }
if (substr($result['FlashDetails'], 2, 1) == 1) { $flashDetails[] = gettext('Internal Flash'); }
if (substr($result['FlashDetails'], 4, 1) == 1) { $flashDetails[] = gettext('FP sync used'); }
if (substr($result['FlashDetails'], 8, 1) == 1) { $flashDetails[] = gettext('2nd(rear)-curtain sync used'); }
if (substr($result['FlashDetails'], 12, 1) == 1) { $flashDetails[] = gettext('1st curtain sync'); }
if (substr($result['FlashDetails'], 1, 1) == 1) { $flashDetails[] = (string) t('External E-TTL'); }
if (substr($result['FlashDetails'], 2, 1) == 1) { $flashDetails[] = (string) t('Internal Flash'); }
if (substr($result['FlashDetails'], 4, 1) == 1) { $flashDetails[] = (string) t('FP sync used'); }
if (substr($result['FlashDetails'], 8, 1) == 1) { $flashDetails[] = (string) t('2nd(rear)-curtain sync used'); }
if (substr($result['FlashDetails'], 12, 1) == 1) { $flashDetails[] = (string) t('1st curtain sync'); }
$result['FlashDetails']=implode(",", $flashDetails);
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//30
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//31
$anotherFocusMode=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//32
if(strpos(strtoupper($exif['IFD0']['Model']), "G1") !== false) {
switch($anotherFocusMode) {
case 0: $result['FocusMode'] = gettext("Single"); break;
case 1: $result['FocusMode'] = gettext("Continuous"); break;
default: $result['FocusMode'] = gettext("Unknown");
case 0: $result['FocusMode'] = (string) t("Single"); break;
case 1: $result['FocusMode'] = (string) t("Continuous"); break;
default: $result['FocusMode'] = (string) t("Unknown");
}
}
@ -271,14 +271,14 @@ function formatCanonData($type,$tag,$intel,$data,$exif,&$result) {
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//6
$result['WhiteBalance']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//7
switch($result['WhiteBalance']) {
case 0: $result['WhiteBalance'] = gettext("Auto"); break;
case 1: $result['WhiteBalance'] = gettext("Sunny"); break;
case 2: $result['WhiteBalance'] = gettext("Cloudy"); break;
case 3: $result['WhiteBalance'] = gettext("Tungsten"); break;
case 4: $result['WhiteBalance'] = gettext("Fluorescent"); break;
case 5: $result['WhiteBalance'] = gettext("Flash"); break;
case 6: $result['WhiteBalance'] = gettext("Custom"); break;
default: $result['WhiteBalance'] = gettext("Unknown");
case 0: $result['WhiteBalance'] = (string) t("Auto"); break;
case 1: $result['WhiteBalance'] = (string) t("Sunny"); break;
case 2: $result['WhiteBalance'] = (string) t("Cloudy"); break;
case 3: $result['WhiteBalance'] = (string) t("Tungsten"); break;
case 4: $result['WhiteBalance'] = (string) t("Fluorescent"); break;
case 5: $result['WhiteBalance'] = (string) t("Flash"); break;
case 6: $result['WhiteBalance'] = (string) t("Custom"); break;
default: $result['WhiteBalance'] = (string) t("Unknown");
}
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//8
$result['SequenceNumber']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//9
@ -288,13 +288,13 @@ function formatCanonData($type,$tag,$intel,$data,$exif,&$result) {
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//13
$result['AFPointUsed']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//14
$afPointUsed = array();
if ($result['AFPointUsed'] & 0x0001) $afPointUsed[] = gettext("Right"); //bit 0
if ($result['AFPointUsed'] & 0x0002) $afPointUsed[] = gettext("Center"); //bit 1
if ($result['AFPointUsed'] & 0x0004) $afPointUsed[] = gettext("Left"); //bit 2
if ($result['AFPointUsed'] & 0x0800) $afPointUsed[] = gettext("12"); //bit 12
if ($result['AFPointUsed'] & 0x1000) $afPointUsed[] = gettext("13"); //bit 13
if ($result['AFPointUsed'] & 0x2000) $afPointUsed[] = gettext("14"); //bit 14
if ($result['AFPointUsed'] & 0x4000) $afPointUsed[] = gettext("15"); //bit 15
if ($result['AFPointUsed'] & 0x0001) $afPointUsed[] = (string) t("Right"); //bit 0
if ($result['AFPointUsed'] & 0x0002) $afPointUsed[] = (string) t("Center"); //bit 1
if ($result['AFPointUsed'] & 0x0004) $afPointUsed[] = (string) t("Left"); //bit 2
if ($result['AFPointUsed'] & 0x0800) $afPointUsed[] = (string) t("12"); //bit 12
if ($result['AFPointUsed'] & 0x1000) $afPointUsed[] = (string) t("13"); //bit 13
if ($result['AFPointUsed'] & 0x2000) $afPointUsed[] = (string) t("14"); //bit 14
if ($result['AFPointUsed'] & 0x4000) $afPointUsed[] = (string) t("15"); //bit 15
$result['AFPointUsed'] = implode(",", $afPointUsed);
$result['FlashBias']=intel2Moto(substr($data,$place,4));$place+=4;//15
switch($result['FlashBias']) {
@ -315,7 +315,7 @@ function formatCanonData($type,$tag,$intel,$data,$exif,&$result) {
case '0030': $result['FlashBias'] = "1.5 EV"; break;
case '0034': $result['FlashBias'] = "1.67 EV"; break;
case '0040': $result['FlashBias'] = "2 EV"; break;
default: $result['FlashBias'] = gettext("Unknown");
default: $result['FlashBias'] = (string) t("Unknown");
}
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//16
$result['Unknown']=hexdec(intel2Moto(substr($data,$place,4)));$place+=4;//17

View File

@ -84,89 +84,89 @@ function formatFujifilmData($type,$tag,$intel,$data) {
$data=hexdec($data);
if($tag=="1001") { //Sharpness
if($data == 1) $data = gettext("Soft");
else if($data == 2) $data = gettext("Soft");
else if($data == 3) $data = gettext("Normal");
else if($data == 4) $data = gettext("Hard");
else if($data == 5) $data = gettext("Hard");
else $data = gettext("Unknown").": ".$data;
if($data == 1) $data = (string) t("Soft");
else if($data == 2) $data = (string) t("Soft");
else if($data == 3) $data = (string) t("Normal");
else if($data == 4) $data = (string) t("Hard");
else if($data == 5) $data = (string) t("Hard");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="1002") { //WhiteBalance
if($data == 0) $data = gettext("Auto");
else if($data == 256) $data = gettext("Daylight");
else if($data == 512) $data = gettext("Cloudy");
else if($data == 768) $data = gettext("DaylightColor-fluorescence");
else if($data == 769) $data = gettext("DaywhiteColor-fluorescence");
else if($data == 770) $data = gettext("White-fluorescence");
else if($data == 1024) $data = gettext("Incandescence");
else if($data == 3840) $data = gettext("Custom");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Auto");
else if($data == 256) $data = (string) t("Daylight");
else if($data == 512) $data = (string) t("Cloudy");
else if($data == 768) $data = (string) t("DaylightColor-fluorescence");
else if($data == 769) $data = (string) t("DaywhiteColor-fluorescence");
else if($data == 770) $data = (string) t("White-fluorescence");
else if($data == 1024) $data = (string) t("Incandescence");
else if($data == 3840) $data = (string) t("Custom");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="1003") { //Color
if($data == 0) $data = gettext("Chroma Saturation Normal(STD)");
else if($data == 256) $data = gettext("Chroma Saturation High");
else if($data == 512) $data = gettext("Chroma Saturation Low(ORG)");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Chroma Saturation Normal(STD)");
else if($data == 256) $data = (string) t("Chroma Saturation High");
else if($data == 512) $data = (string) t("Chroma Saturation Low(ORG)");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1004") { //Tone
if($data == 0) $data = gettext("Contrast Normal(STD)");
else if($data == 256) $data = gettext("Contrast High(HARD)");
else if($data == 512) $data = gettext("Contrast Low(ORG)");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Contrast Normal(STD)");
else if($data == 256) $data = (string) t("Contrast High(HARD)");
else if($data == 512) $data = (string) t("Contrast Low(ORG)");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1010") { //FlashMode
if($data == 0) $data = gettext("Auto");
else if($data == 1) $data = gettext("On");
else if($data == 2) $data = gettext("Off");
else if($data == 3) $data = gettext("Red-Eye Reduction");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Auto");
else if($data == 1) $data = (string) t("On");
else if($data == 2) $data = (string) t("Off");
else if($data == 3) $data = (string) t("Red-Eye Reduction");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1020") { //Macro
if($data == 0) $data = gettext("Off");
else if($data == 1) $data = gettext("On");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Off");
else if($data == 1) $data = (string) t("On");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1021") { //FocusMode
if($data == 0) $data = gettext("Auto");
else if($data == 1) $data = gettext("Manual");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Auto");
else if($data == 1) $data = (string) t("Manual");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1030") { //SlowSync
if($data == 0) $data = gettext("Off");
else if($data == 1) $data = gettext("On");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Off");
else if($data == 1) $data = (string) t("On");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1031") { //PictureMode
if($data == 0) $data = gettext("Auto");
else if($data == 1) $data = gettext("Portrait");
else if($data == 2) $data = gettext("Landscape");
else if($data == 4) $data = gettext("Sports");
else if($data == 5) $data = gettext("Night");
else if($data == 6) $data = gettext("Program AE");
else if($data == 256) $data = gettext("Aperture Priority AE");
else if($data == 512) $data = gettext("Shutter Priority");
else if($data == 768) $data = gettext("Manual Exposure");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Auto");
else if($data == 1) $data = (string) t("Portrait");
else if($data == 2) $data = (string) t("Landscape");
else if($data == 4) $data = (string) t("Sports");
else if($data == 5) $data = (string) t("Night");
else if($data == 6) $data = (string) t("Program AE");
else if($data == 256) $data = (string) t("Aperture Priority AE");
else if($data == 512) $data = (string) t("Shutter Priority");
else if($data == 768) $data = (string) t("Manual Exposure");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1100") { //ContinuousTakingBracket
if($data == 0) $data = gettext("Off");
else if($data == 1) $data = gettext("On");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Off");
else if($data == 1) $data = (string) t("On");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1300") { //BlurWarning
if($data == 0) $data = gettext("No Warning");
else if($data == 1) $data = gettext("Warning");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("No Warning");
else if($data == 1) $data = (string) t("Warning");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1301") { //FocusWarning
if($data == 0) $data = gettext("Auto Focus Good");
else if($data == 1) $data = gettext("Out of Focus");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("Auto Focus Good");
else if($data == 1) $data = (string) t("Out of Focus");
else $data = (string) t("Unknown: ").$data;
}
if($tag=="1302") { //AEWarning
if($data == 0) $data = gettext("AE Good");
else if($data == 1) $data = gettext("Over Exposure");
else $data = gettext("Unknown: ").$data;
if($data == 0) $data = (string) t("AE Good");
else if($data == 1) $data = (string) t("Over Exposure");
else $data = (string) t("Unknown: ").$data;
}
} else if($type=="UNDEFINED") {

View File

@ -42,7 +42,7 @@ function lookup_Nikon_tag($tag,$model) {
case "0008": $tag = "Focus";break;
case "0009": $tag = "Unknown2";break;
case "000a": $tag = "DigitalZoom";break;
case "000b": $tag = gettext("Converter");break;
case "000b": $tag = (string) t("Converter");break;
default: $tag = "unknown:".$tag;break;
}
@ -113,48 +113,48 @@ function formatNikonData($type,$tag,$intel,$model,$data) {
$data=hexdec($data);
if($tag=="0003" && $model==0) { //Quality
if($data == 1) $data = gettext("VGA Basic");
else if($data == 2) $data = gettext("VGA Normal");
else if($data == 3) $data = gettext("VGA Fine");
else if($data == 4) $data = gettext("SXGA Basic");
else if($data == 5) $data = gettext("SXGA Normal");
else if($data == 6) $data = gettext("SXGA Fine");
else $data = gettext("Unknown").": ".$data;
if($data == 1) $data = (string) t("VGA Basic");
else if($data == 2) $data = (string) t("VGA Normal");
else if($data == 3) $data = (string) t("VGA Fine");
else if($data == 4) $data = (string) t("SXGA Basic");
else if($data == 5) $data = (string) t("SXGA Normal");
else if($data == 6) $data = (string) t("SXGA Fine");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0004" && $model==0) { //Color
if($data == 1) $data = gettext("Color");
else if($data == 2) $data = gettext("Monochrome");
else $data = gettext("Unknown").": ".$data;
if($data == 1) $data = (string) t("Color");
else if($data == 2) $data = (string) t("Monochrome");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0005" && $model==0) { //Image Adjustment
if($data == 0) $data = gettext("Normal");
else if($data == 1) $data = gettext("Bright+");
else if($data == 2) $data = gettext("Bright-");
else if($data == 3) $data = gettext("Contrast+");
else if($data == 4) $data = gettext("Contrast-");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Normal");
else if($data == 1) $data = (string) t("Bright+");
else if($data == 2) $data = (string) t("Bright-");
else if($data == 3) $data = (string) t("Contrast+");
else if($data == 4) $data = (string) t("Contrast-");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0006" && $model==0) { //CCD Sensitivity
if($data == 0) $data = "ISO-80";
else if($data == 2) $data = "ISO-160";
else if($data == 4) $data = "ISO-320";
else if($data == 5) $data = "ISO-100";
else $data = gettext("Unknown").": ".$data;
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0007" && $model==0) { //White Balance
if($data == 0) $data = gettext("Auto");
else if($data == 1) $data = gettext("Preset");
else if($data == 2) $data = gettext("Daylight");
else if($data == 3) $data = gettext("Incandescense");
else if($data == 4) $data = gettext("Flourescence");
else if($data == 5) $data = gettext("Cloudy");
else if($data == 6) $data = gettext("SpeedLight");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Auto");
else if($data == 1) $data = (string) t("Preset");
else if($data == 2) $data = (string) t("Daylight");
else if($data == 3) $data = (string) t("Incandescense");
else if($data == 4) $data = (string) t("Flourescence");
else if($data == 5) $data = (string) t("Cloudy");
else if($data == 6) $data = (string) t("SpeedLight");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="000b" && $model==0) { //Converter
if($data == 0) $data = gettext("None");
else if($data == 1) $data = gettext("Fisheye");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("None");
else if($data == 1) $data = (string) t("Fisheye");
else $data = (string) t("Unknown").": ".$data;
}
} else if($type=="UNDEFINED") {
@ -162,7 +162,7 @@ function formatNikonData($type,$tag,$intel,$model,$data) {
$data=$data/100;
}
if($tag=="0088" && $model==1) { //AF Focus Position
$temp = gettext("Center");
$temp = (string) t("Center");
$data = bin2hex($data);
$data = str_replace("01","Top",$data);
$data = str_replace("02","Bottom",$data);
@ -178,20 +178,20 @@ function formatNikonData($type,$tag,$intel,$model,$data) {
if($tag=="0083" && $model==1) { //Lens Type
$data = hexdec(substr($data,0,2));
if($data == 0) $data = gettext("AF non D");
else if($data == 1) $data = gettext("Manual");
if($data == 0) $data = (string) t("AF non D");
else if($data == 1) $data = (string) t("Manual");
else if($data == 2) $data = "AF-D or AF-S";
else if($data == 6) $data = "AF-D G";
else if($data == 10) $data = "AF-D VR";
else $data = gettext("Unknown").": ".$data;
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0087" && $model==1) { //Flash type
$data = hexdec(substr($data,0,2));
if($data == 0) $data = gettext("Did Not Fire");
else if($data == 4) $data = gettext("Unknown");
else if($data == 7) $data = gettext("External");
else if($data == 9) $data = gettext("On Camera");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Did Not Fire");
else if($data == 4) $data = (string) t("Unknown");
else if($data == 7) $data = (string) t("External");
else if($data == 9) $data = (string) t("On Camera");
else $data = (string) t("Unknown").": ".$data;
}
}

View File

@ -80,12 +80,12 @@ function formatOlympusData($type,$tag,$intel,$data) {
if($data == 1) $data = "SQ";
else if($data == 2) $data = "HQ";
else if($data == 3) $data = "SHQ";
else $data = gettext("Unknown").": ".$data;
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0202") { //Macro
if($data == 0) $data = "Normal";
else if($data == 1) $data = "Macro";
else $data = gettext("Unknown").": ".$data;
else $data = (string) t("Unknown").": ".$data;
}
} else if($type=="UNDEFINED") {

View File

@ -77,10 +77,10 @@ function formatPanasonicData($type,$tag,$intel,$data) {
if($tag=="000f") { //AFMode
if($data == 256) $data = "9-area-focusing";
else if($data == 16) $data = "1-area-focusing";
else if($data == 4096) $data = gettext("3-area-focusing (High speed)");
else if($data == 4112) $data = gettext("1-area-focusing (High speed)");
else if($data == 16) $data = gettext("1-area-focusing");
else if($data == 1) $data = gettext("Spot-focusing");
else if($data == 4096) $data = (string) t("3-area-focusing (High speed)");
else if($data == 4112) $data = (string) t("1-area-focusing (High speed)");
else if($data == 16) $data = (string) t("1-area-focusing");
else if($data == 1) $data = (string) t("Spot-focusing");
else $data = "Unknown (".$data.")";
}
@ -99,69 +99,69 @@ function formatPanasonicData($type,$tag,$intel,$data) {
$data=hexdec($data);
if($tag=="0001") { //Image Quality
if($data == 2) $data = gettext("High");
else if($data == 3) $data = gettext("Standard");
else if($data == 6) $data = gettext("Very High");
else if($data == 7) $data = gettext("RAW");
else $data = gettext("Unknown")." (".$data.")";
if($data == 2) $data = (string) t("High");
else if($data == 3) $data = (string) t("Standard");
else if($data == 6) $data = (string) t("Very High");
else if($data == 7) $data = (string) t("RAW");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0003") { //White Balance
if($data == 1) $data = gettext("Auto");
else if($data == 2) $data = gettext("Daylight");
else if($data == 3) $data = gettext("Cloudy");
else if($data == 4) $data = gettext("Halogen");
else if($data == 5) $data = gettext("Manual");
else if($data == 8) $data = gettext("Flash");
else if($data == 10) $data = gettext("Black and White");
else if($data == 11) $data = gettext("Manual");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Auto");
else if($data == 2) $data = (string) t("Daylight");
else if($data == 3) $data = (string) t("Cloudy");
else if($data == 4) $data = (string) t("Halogen");
else if($data == 5) $data = (string) t("Manual");
else if($data == 8) $data = (string) t("Flash");
else if($data == 10) $data = (string) t("Black and White");
else if($data == 11) $data = (string) t("Manual");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0007") { //Focus Mode
if($data == 1) $data = gettext("Auto");
else if($data == 2) $data = gettext("Manual");
else if($data == 4) $data = gettext("Auto, Focus button");
else if($data == 5) $data = gettext("Auto, Continuous");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Auto");
else if($data == 2) $data = (string) t("Manual");
else if($data == 4) $data = (string) t("Auto, Focus button");
else if($data == 5) $data = (string) t("Auto, Continuous");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="001a") { //Image Stabilizer
if($data == 2) $data = gettext("Mode 1");
else if($data == 3) $data = gettext("Off");
else if($data == 4) $data = gettext("Mode 2");
else $data = gettext("Unknown")." (".$data.")";
if($data == 2) $data = (string) t("Mode 1");
else if($data == 3) $data = (string) t("Off");
else if($data == 4) $data = (string) t("Mode 2");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="001c") { //Macro mode
if($data == 1) $data = gettext("On");
else if($data == 2) $data = gettext("Off");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("On");
else if($data == 2) $data = (string) t("Off");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="001f") { //Shooting Mode
if($data == 1) $data = gettext("Normal");
else if($data == 2) $data = gettext("Portrait");
else if($data == 3) $data = gettext("Scenery");
else if($data == 4) $data = gettext("Sports");
else if($data == 5) $data = gettext("Night Portrait");
else if($data == 6) $data = gettext("Program");
else if($data == 7) $data = gettext("Aperture Priority");
else if($data == 8) $data = gettext("Shutter Priority");
else if($data == 9) $data = gettext("Macro");
else if($data == 11) $data = gettext("Manual");
else if($data == 13) $data = gettext("Panning");
else if($data == 14) $data = gettext("Simple");
else if($data == 18) $data = gettext("Fireworks");
else if($data == 19) $data = gettext("Party");
else if($data == 20) $data = gettext("Snow");
else if($data == 21) $data = gettext("Night Scenery");
else if($data == 22) $data = gettext("Food");
else if($data == 23) $data = gettext("Baby");
else if($data == 27) $data = gettext("High Sensitivity");
else if($data == 29) $data = gettext("Underwater");
else if($data == 33) $data = gettext("Pet");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Normal");
else if($data == 2) $data = (string) t("Portrait");
else if($data == 3) $data = (string) t("Scenery");
else if($data == 4) $data = (string) t("Sports");
else if($data == 5) $data = (string) t("Night Portrait");
else if($data == 6) $data = (string) t("Program");
else if($data == 7) $data = (string) t("Aperture Priority");
else if($data == 8) $data = (string) t("Shutter Priority");
else if($data == 9) $data = (string) t("Macro");
else if($data == 11) $data = (string) t("Manual");
else if($data == 13) $data = (string) t("Panning");
else if($data == 14) $data = (string) t("Simple");
else if($data == 18) $data = (string) t("Fireworks");
else if($data == 19) $data = (string) t("Party");
else if($data == 20) $data = (string) t("Snow");
else if($data == 21) $data = (string) t("Night Scenery");
else if($data == 22) $data = (string) t("Food");
else if($data == 23) $data = (string) t("Baby");
else if($data == 27) $data = (string) t("High Sensitivity");
else if($data == 29) $data = (string) t("Underwater");
else if($data == 33) $data = (string) t("Pet");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0020") { //Audio
if($data == 1) $data = gettext("Yes");
else if($data == 2) $data = gettext("No");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Yes");
else if($data == 2) $data = (string) t("No");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0023") { //White Balance Bias
$data=$data." EV";
@ -170,47 +170,47 @@ function formatPanasonicData($type,$tag,$intel,$data) {
$data = $data;
}
if($tag=="0028") { //Colour Effect
if($data == 1) $data = gettext("Off");
else if($data == 2) $data = gettext("Warm");
else if($data == 3) $data = gettext("Cool");
else if($data == 4) $data = gettext("Black and White");
else if($data == 5) $data = gettext("Sepia");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Off");
else if($data == 2) $data = (string) t("Warm");
else if($data == 3) $data = (string) t("Cool");
else if($data == 4) $data = (string) t("Black and White");
else if($data == 5) $data = (string) t("Sepia");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="002a") { //Burst Mode
if($data == 0) $data = gettext("Off");
else if($data == 1) $data = gettext("Low/High Quality");
else if($data == 2) $data = gettext("Infinite");
else $data = gettext("Unknown")." (".$data.")";
if($data == 0) $data = (string) t("Off");
else if($data == 1) $data = (string) t("Low/High Quality");
else if($data == 2) $data = (string) t("Infinite");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="002c") { //Contrast
if($data == 0) $data = gettext("Standard");
else if($data == 1) $data = gettext("Low");
else if($data == 2) $data = gettext("High");
else $data = gettext("Unknown")." (".$data.")";
if($data == 0) $data = (string) t("Standard");
else if($data == 1) $data = (string) t("Low");
else if($data == 2) $data = (string) t("High");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="002d") { //Noise Reduction
if($data == 0) $data = gettext("Standard");
else if($data == 1) $data = gettext("Low");
else if($data == 2) $data = gettext("High");
else $data = gettext("Unknown")." (".$data.")";
if($data == 0) $data = (string) t("Standard");
else if($data == 1) $data = (string) t("Low");
else if($data == 2) $data = (string) t("High");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="002e") { //Self Timer
if($data == 1) $data = gettext("Off");
else if($data == 2) $data = gettext("10s");
else if($data == 3) $data = gettext("2s");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Off");
else if($data == 2) $data = (string) t("10s");
else if($data == 3) $data = (string) t("2s");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0030") { //Rotation
if($data == 1) $data = gettext("Horizontal (normal)");
else if($data == 6) $data = gettext("Rotate 90 CW");
else if($data == 8) $data = gettext("Rotate 270 CW");
else $data = gettext("Unknown")." (".$data.")";
if($data == 1) $data = (string) t("Horizontal (normal)");
else if($data == 6) $data = (string) t("Rotate 90 CW");
else if($data == 8) $data = (string) t("Rotate 270 CW");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0032") { //Color Mode
if($data == 0) $data = gettext("Normal");
else if($data == 1) $data = gettext("Natural");
else $data = gettext("Unknown")." (".$data.")";
if($data == 0) $data = (string) t("Normal");
else if($data == 1) $data = (string) t("Natural");
else $data = (string) t("Unknown")." (".$data.")";
}
if($tag=="0036") { //Travel Day
$data=$data;

View File

@ -69,16 +69,16 @@ function formatSanyoData($type,$tag,$intel,$data) {
$data=hexdec($data);
if($tag=="0200") { //SpecialMode
if($data == 0) $data = gettext("Normal");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Normal");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0201") { //Quality
if($data == 2) $data = gettext("High");
else $data = gettext("Unknown").": ".$data;
if($data == 2) $data = (string) t("High");
else $data = (string) t("Unknown").": ".$data;
}
if($tag=="0202") { //Macro
if($data == 0) $data = gettext("Normal");
else $data = gettext("Unknown").": ".$data;
if($data == 0) $data = (string) t("Normal");
else $data = (string) t("Unknown").": ".$data;
}
} else if($type=="UNDEFINED") {