start galerielinks impressum   suche  
galupki.de
image FotoGrafie
[Alle Beiträge vollständig in alphabetischer Reihenfolge ausgeben]
 
[Index]   [GlossarGlossar]   [tag cloudtag cloud]   [klicken um dem Link zu folgen Links]   [Zuletzt]   [?]   [...]
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z *
(*=Joker) in
Begriff URL Bereich Text Datum

[klicken um dem Link zu folgen my galupki.de]

EXIF Metadaten (folge Link php scripte)

LinkLinks zum Thema EXIF Metadaten
Linkdownload Alle EXIF-Tags von 35 Beispielbildern der Fuji S9500 (siehe readme.txt im Archiv)

Die folgenden Scriptschnipsel in php5 zeigen analog einem kleinen Tutorial / Workshop, wie man mit wenig Aufwand alle bekannten EXIF-Daten für eigene Zwecke aus JPG-Fotos extrahiert und interpretiert, ausserdem kleine Beispiele wie man Thumbnails (z.B. für einen Cache) herausziehen / erzeugen kann.

Makernotes der Hersteller sind u.U. nicht immer ganz komplett codiert, sondern auf die Werte meiner Kameramodelle bezogen. Es lohnt also im einzelnen (wenn man denn überhaupt etwas vermisst) bei den o.a. EXIF-Links (insb. der Aufstellung von Phil, dem Autor des ExifTools) nachzusehen...

(c) 2007, Jürgen Galupki, LinkLizenzhinweise

Diesen Artikel innerhalb des Wiki-Kontextes anzeigen lassen (empfohlen).

EXIF-Daten incl. Makernotes Canon Powershot A40 / A60 / A70 und Fujifilm S9500 / S9600
mit php auslesen - fast wie im Zoombrowser oder Finepix-Viewer...
;-)

Metadaten aus Bild-Datei extrahieren (php4, php5)

Die Basics setze ich mal als bekannt voraus, daher hier nur ein paar Schnipsel. Insbesondere fehlt teils das auslesen und übertragen der standardkonformen Felder, die findet Ihr aber leicht raus, wenn Ihr $exifdata[] mal unter die Lupe nehmt (  $exifdata=@exif_read_data($bild,"",true,false); ) oder browser4exif2csv auseinandernehmt...
Folgende (nicht ganz aktuelle) Anwendungen könnt Ihr Euch komplett runterladen:

Webbasiertes Bildarchiv browser4exif2csv
Fotodownloadertool

In meiner Bildergalerie könnt Ihr z.B. mit folgenden Script dann on-the-fly Metadaten der Galerie-Bilder abfragen - und sich die Bilder, die zur Selektion passen anzeigen lassen:

https://galupki.de/galerie/search.php.

Hinweis: Je nach "Album" werden einige EXIF-Daten unterhalb der Bilder angezeigt (unterschiedlich). Rechts neben den Bildern findet man i.d.R. einen Link [Metadaten], der alle vorhandenen Daten anzeigt (nur neuere Bilder enthalten die EXIF-Daten)...

Nützliche Script-Schnipsel

Wesentliche Dateiattribute


  $result['FileName'] = $exifdata["FILE"]["FileName"];
  $result['FileSize']  = round($exifdata["FILE"]["FileSize"]/1000,0) . " KB";
  $result['FileDateTime']  = date("Ymd_His",$exifdata["FILE"]["FileDateTime"]); // last mod date als Timestamp jjjjmmtt_hhmmss
  $result['DateTimeOriginal'] = str_replace(" ", "_", str_replace(":", "", $exifdata["EXIF"]["DateTimeOriginal"])); // Aufnahmezeitpunkt als string  jjjjmmtt_hhmmss
  $result['Width'] = $exifdata['COMPUTED']['Width']; // besser: $exifdata["EXIF"]["ExifImageWidth"]
  $result['Height'] = $exifdata['COMPUTED']['Height']; // besser: $exifdata["EXIF"]["ExifImageHeight"]
// Seitenverhältnis
     if ( $result['Width'] > $result['Height'] ) {
        $ratio = round($result['Width']/$result['Height'],2);
     }  else {
        $ratio = round($result['Height']/$result['Width'],2);
     }
     if ( $ratio == 1.5  ) {
        $ratio = "3:2";
     }  elseif ( $ratio == 1.33 ) {
        $ratio = "4:3";
     }  else {
        $ratio = "1:" . $ratio;
     }
     $result['Ratio'] = $ratio;
     $result['ExifVersion'] = $exifdata["EXIF"]["ExifVersion"] / 100;
     $result['Orientation'] = $exifdata["IFD0"]["Orientation"];
     $result['CompressedBitsPerPixel'] = $exifdata["EXIF"]["CompressedBitsPerPixel"];
     $result['DigitalZoomRatio'] = $exifdata["EXIF"]["DigitalZoomRatio"];
// die tats. ZoomRatio laesst sich ggfs. auch berechnen!

Kamera, Kamerahersteller und Fotograf

      $result['Make'] = $exifdata["IFD0"]["Make"];  // Hersteller
      $result['Model'] = $exifdata["IFD0"]["Model"];  // Modell
      $result['Software'] = $exifdata["IFD0"]["Software"]; //z.B. Fuji
      $result['FirmwareVersion'] = $exifdata["MAKERNOTE"]["FirmwareVersion"]; //z.B. Canon
      $result['OwnerName'] = $exifdata["MAKERNOTE"]["OwnerName"]; //z.B. Canon, einmalig mittels Software auf Kamera zu setzen
      $result['ImageDescription'] = $exifdata["IFD0"]["ImageDescription"];

Wesentliche Bildattribute (mehr/fehlende bei den herstellerspezifischen Routinen!)

      @eval( "\$bw = " . $exifdata["EXIF"]["FocalLength"] . ";"); // Vorsicht: eval ist evil :-) -> So nur für eigene Bilder verwenden, sonst exploit-Gefahr!
      $result['FocalLength'] = $bw;

      $zn = explode("/", $exifdata["EXIF"]["ExposureTime"]);            //  in der Form "zaehler/nenner"
      if ($zn[0]!="1") {  // Anpassung kann je nach Hersteller notwendig sein
         $zn[1] = @round($zn[1] / $zn[0],0);
         $zn[0] = 1;
         $result['ExposureTime'] = implode("/", $zn);
      }

      @eval( "\$blende = " . $exifdata["EXIF"]["FNumber"] . ";");
      $result['FNumber'] = $blende;
// Belichtungskorrektur
      $result['ExposureBiasValue'] = $exifdata["EXIF"]["ExposureBiasValue"];
      $zn = explode("/", $exifdata["EXIF"]["ExposureBiasValue"]);
      if ($zn[0]=="0") {
         $result['ExposureBiasValue'] = "0";
      } elseif ( $zn[1]==100 ) {
        $result['ExposureBiasValue'] = $zn[0]/$zn[1];
      }
// EV BrightnessValue  // füllen nicht alle Hersteller, aber z.B. Fuji
      $result['BrightnessValue'] = $exifdata["EXIF"]["BrightnessValue"];

      switch ($exifdata["EXIF"]["Contrast"])  {
           case 0:  $result['Contrast'] = "Std"; break;
           case 1:  $result['Contrast'] = "Soft"; break;
           case 2:  $result['Contrast'] = "Hart"; break;
           default: $result['Contrast'] = $exifdata["EXIF"]["Contrast"]; break;
      }

      switch ($exifdata["EXIF"]["Saturation"])  {
           case 0:  $result['Saturation'] = "Std"; break;
           case 1:  $result['Saturation'] = "Soft"; break;
           case 2:  $result['Saturation'] = "Hart"; break;
           default: $result['Saturation'] = $exifdata["EXIF"]["Saturation"]; break;
      }

      $result['Sharpness'] = $exifdata["EXIF"]["Sharpness"];

      switch ($exifdata["EXIF"]["SubjectDistanceRange"])  {
           case 0:  $result['SubjectDistanceRange'] = ""; break;
           case 1:  $result['SubjectDistanceRange'] = "Makro"; break;
           case 2:  $result['SubjectDistanceRange'] = "Nah"; break;
           case 3:  $result['SubjectDistanceRange'] = "Fern"; break;
           default: $result['SubjectDistanceRange'] = $exifdata["EXIF"]["SubjectDistanceRange"]; break;
      }

Umrechnen Brennweite ins Kleinbildformat

Die Brennweite der Digitalkamera ist in den EXIF-Daten immer auf die Sensorgröße der Kamera bezogen. Zum einfachen umrechnen sollte man sich ein ARRAY definieren, in dass man für jede Kamera deren Cropfaktor einträgt (Sensorgröße bezogen auf Negativgröße Kleinbild). Mit diesem kann man dann leicht umrechnen, z.B. wie folgt:

// cropfaktoren (Verhältnis der Brennweiten) zu Kleinbildfilm je bekanntem Kameramodell
$cropfaktor35mm = array (
    "CanonPowerShotA60" => 6.474,
    "FinePixS9500"      => 4.5
);

// circle of confusion in mm bei Kleinbild (Unschärfekreis, Zerstreuungskreisdurchmesser)
$coc = 0.029;      // ergibt sich aus der Diagonale Kleinbild = 43.0 / 1500.0  =  Formatdiagonale / 1500

// berechnen Brennweite in mm, Brennweite im Vergleich zu Kleinbildformat, Zerstreuungskreisdurchmesser
@eval( "\$bw = " . $exifdata["EXIF"]["FocalLength"] . ";");  // Vorsicht: eval ist evil :-) -> So nur für eigene Bilder verwenden, sonst exploit-Gefahr!
$result['FocalLength'] = $bw;
$result['KBFocalLength_'] = @round( $bw * $cropfaktor35mm[$exifdata["IFD0"]["Model"]], 0 );
$result['KBFaktor_'] = @round( $cropfaktor35mm[$exifdata["IFD0"]["Model"]], 4);
$result['dof_ZkD']   = @round($coc / $result['KBFaktor_'],4);

Belichtungsprogramm

switch ($exifdata["EXIF"]["ExposureProgram"]) {
     case 1:  $result['ExposureProgram'] = "Manuell"; break;
     case 2:  $result['ExposureProgram'] = "Programm"; break;
     case 3:  $result['ExposureProgram'] = "Blendenautomatik Av"; break;
     case 4:  $result['ExposureProgram'] = "Zeitautomatik Tv"; break;
     case 5:  $result['ExposureProgram'] = "Kreativprogramm (slow speed)"; break;
     case 6:  $result['ExposureProgram'] = "Action (high speed)"; break;
     case 7:  $result['ExposureProgram'] = "Portrait"; break;
     case 8:  $result['ExposureProgram'] = "Landschaft"; break;
     default: $result['ExposureProgram'] = $exifdata["EXIF"]["ExposureProgram"];
}

Je nach Hersteller kann man i.d.R. über die Makernotes noch feiner unterscheiden (s.u.)...

Belichtungsmessart

      switch ($exifdata["EXIF"]["MeteringMode"]) {
           case 1: $result['MeteringMode'] = "Integral"; break;
           case 2: $result['MeteringMode'] = "Mittenbetont Integral"; break;
           case 3: $result['MeteringMode'] = "Spot"; break;
           case 4: $result['MeteringMode'] = "Multi-Spot"; break;
           case 5: $result['MeteringMode'] = "Mehrfeldmessung"; break;
           default: $result['MeteringMode'] = $exifdata["EXIF"]["MeteringMode"]; break;
      }

Blitzverwendung

      switch ($exifdata["EXIF"]["Flash"]) {
           case 0: $result['Flash'] = "Kein Blitz"; break;
           case 1: $result['Flash'] = "Blitz"; break;
           case 5: $result['Flash'] = "Blitz, reflektierter Vorblitz nicht erkannt"; break;
           case 7: $result['Flash'] = "Blitz, reflektierte Vorblitz erkannt"; break;
           case 9: $result['Flash'] = "Blitz ein"; break;
           case 13: $result['Flash'] = "Compulsory Blitz, Return light not detected"; break;
           case 15: $result['Flash'] = "Compulsory Blitz, Return light detected"; break;
           case 16: $result['Flash'] = "Kein Blitz"; break;
           case 24: $result['Flash'] = "kein Blitz"; break;
           case 25: $result['Flash'] = "Blitz, Auto Mode"; break;
           case 29: $result['Flash'] = "Blitz, Auto-Mode, Return light not detected"; break;
           case 31: $result['Flash'] = "Blitz, Auto-Mode, Return light detected"; break;
           case 32: $result['Flash'] = "kein Blitz"; break;
           case 65: $result['Flash'] = "Rote Augen Effekt"; break;
           case 69: $result['Flash'] = "Rote Augen Effekt, Return light not detected"; break;
           case 71: $result['Flash'] = "Rote Augen Effekt, Return light detected"; break;
           case 73: $result['Flash'] = "Rote Augen Leuchte, AF-Hilfslicht, Blitz"; break;
           case 77: $result['Flash'] = "Rote Augen Effekt, Compulsory Flash, Return light not detected"; break;
           case 79: $result['Flash'] = "Rote Augen Effekt, Compulsory Flash, Return light detected"; break;
           case 89: $result['Flash'] = "Rote Augen Leuchte, Blitz, Auto-Mode"; break;
           case 93: $result['Flash'] = "Rote Augen Effekt, Auto-Mode, Return light not detected"; break;
           case 95: $result['Flash'] = "Rote Augen Effekt, Auto-Mode, Return light detected"; break;
           default: $result['Flash'] = $exifdata["EXIF"]["Flash"]; break;
      }

Belichtungsmodus

      switch ($exifdata["EXIF"]["ExposureMode"]) {
           case 0: $result['ExposureMode'] = "Auto"; break;
           case 1: $result['ExposureMode'] = "Manuell"; break;
           case 2: $result['ExposureMode'] = "Autobracketing"; break;
           default: $result['ExposureMode'] = $exifdata["EXIF"]["ExposureMode"]; break;
      }

Weissabgleich

      switch ($exifdata["EXIF"]["WhiteBalance"]) {
           case 0: $result['WhiteBalance'] = "Auto"; break;
           default: $result['WhiteBalance'] = $exifdata["EXIF"]["WhiteBalance"]; break;
      }

sowie

      $result['LightSource'] = $exifdata["EXIF"]["LightSource"];
      switch ($exifdata["EXIF"]["LightSource"]) {
           case 0: $result['LightSource'] = "Auto / unknown"; break;
           case 1: $result['LightSource'] = "Tageslicht"; break;
           case 2: $result['LightSource'] = "Fluorescent"; break;
           case 3: $result['LightSource'] = "Tungsten"; break;
           case 10: $result['LightSource'] = "Blitz"; break;
           default: $result['LightSource'] = $exifdata["EXIF"]["LightSource"]; break;
      }

ISO-Empfindlichkeit

      $result['ISO'] = $exifdata["EXIF"]["ISOSpeedRatings"];

Je nach Hersteller siehe Makernotes...

JPG-Components-Configuration

      $result['ComponentsConfiguration'] = bin2hex($exifdata["EXIF"]["ComponentsConfiguration"]);
      $result['ComponentsConfiguration']    = str_replace("01","Y",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("02","Cb",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("03","Cr",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("04","R",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("05","G",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("06","B",$result['ComponentsConfiguration']);
      $result['ComponentsConfiguration']    = str_replace("00","",$result['ComponentsConfiguration']);

Farbraum

      switch ($exifdata["EXIF"]["ColorSpace"]) {
           case 1: $result['ColorSpace'] = "sRGB"; break;
           case 2: $result['ColorSpace'] = "Adobe RGB"; break;
           case 65535: $result['ColorSpace'] = "uncalibrated"; break;
           default: $result['ColorSpace'] = $exifdata["EXIF"]["ColorSpace"]; break;
      }

Sensortyp

      switch ($exifdata["EXIF"]["SensingMethod"]) {
           case 1: $result['SensingMethod'] = "not defined"; break;
           case 2: $result['SensingMethod'] = "One Chip Color Area Sensor"; break;
           case 3: $result['SensingMethod'] = "Two Chip Color Area Sensor"; break;
           case 4: $result['SensingMethod'] = "Three Chip Color Area Sensor"; break;
           case 5: $result['SensingMethod'] = "Color Sequential Area Sensor"; break;
           case 7: $result['SensingMethod'] = "Trilinear Sensor"; break;
           case 8: $result['SensingMethod'] = "Color Sequential Linear Sensor"; break;
           default: $result['SensingMethod'] = $exifdata["EXIF"]["SensingMethod"]; break;
      }

Gimmick: EV berechnen

// gimmick: EV berechnen
//(nicht bei jedem Hersteller stehen die notwendigen Daten bereit!)
// $result[...] muss hier schon vorher via $exifdata[...] vorbelegt werden!

Begriffserklärung EV


// BV = $result['BrightnessValue'] =
      @eval( "\$bv = " . $result['BrightnessValue'] . ";");    // think twice: eval is evil... Exploit-Gefahr bei fremden Bildern!
      $result['ev_BV'] = $bv;

// SV = log2(0,32*ISO)
      $result['ev_SV'] = log( 0.32*$result['ISO'], 2);

      if (is_numeric($result['ev_BV']) AND is_numeric($result['ev_SV'])) {
//       EV = SV+BV
         $result['ev_EV'] = "EV".round( $result['ev_SV'] + $result['ev_BV'] );           // gerundet!
      }  else {
         $result['ev_EV'] = "";
      }

Gimmick: Schärfentiefe (Tiefenschärfe) passend zum Bild berechnen

//(nicht bei jedem Hersteller stehen die notwendigen Daten (fokussierte Entferung) bereit!)
//man kann die theoretische Sensor-Diagonale berechnen (43 / cropfaktorKB)
//Blende hat man auch, ebenso wie den Zerstreuungskreisdurchmesser (0,029 / cropfaktorKB)
//...in den Metadaten zu Canon-Bildern meiner Galerie mache ich das z.B. (siehe [Metadaten]...)
Ich glaube, in browser4exif2csv (s.o.) ist das schon codiert, sonst machts halt selber ;-)

Vorschaubild aus *.JPG extrahieren oder erzeugen falls nicht vorhanden

Sinnvollerweise sollte man vielleicht noch anhand des Last Modification Dates der Bilddatei und des Thumbnails prüfen+entscheiden, das Thumbnail ggfs. neu anzulegen! Ansonsten extrahiert die nachfolgende Funktion ein bestehendes Thumbnail aus einer Bilddatei oder erzeugt ein Thumbnail aus dem Bild selbst (wenn kein Thumb enthalten ist).
 
Die Thumbnails speichere ich in meiner Galerie in Dateiform ab, so dass sie normalerweise nur einmal auf dem Webserver extrahiert/erzeugt werden müssen (Cache).

$vbg = 160; // Größe Thumbnail

function exif_extrakt_vorschaubild
($bild, $vorschau_name) {
// --- extrahiert ein JPG Vorschaubild  ---------------

global $vbg;

 
  if ( !file_exists ($vorschau_name) ) {
     $vorschau=@exif_thumbnail($bild, $width, $height, $type);

     if ( $vorschau==true
          AND max($width,$height)==$vbg
          AND ( substr(image_type_to_mime_type($type),6)=="jpeg"
                OR substr(image_type_to_mime_type($type),6)=="jpg" ) ) {
        $file=fopen($vorschau_name,"wb");
        fwrite($file,$vorschau);
        fclose($file);
        unset($vorschau);
     }  else { // es existiert gar kein Vorschaubild in der Datei
        create_vorschaubild($bild, $vorschau_name);
     }
  }


} // end function exif_extrakt_vorschaubild



function create_vorschaubild($bild, $vorschau_name) {
// --- legt ein Vorschaubild aus originaldatei neu mittels GD2-Lib an ----------


global $vbg;

// Vorschaubilder-Größe (width=...)

  if ( !file_exists ($vorschau_name) ) {

// Originalbild
      $neujpg = imagecreatefromjpeg ($bild);
      $jpg_breite = imagesx ($neujpg);
      $jpg_hoehe  = imagesy ($neujpg);

// Hochformat statt Querformat
      if ($jpg_hoehe > $jpg_breite ) {
         $vbg = $jpg_breite * $vbg / $jpg_hoehe;
      }

// Vorschaubild
      if ( $jpg_breite > $vbg ) {
         $x = $vbg;
         $y = $jpg_hoehe * $vbg / $jpg_breite;
      }  else {
         $x = $jpg_breite;
         $y = $jpg_hoehe;
      }
      $kleinesjpg = imagecreatetruecolor ( $x, $y);
//    $dummy = imagecopyresized   ( $kleinesjpg, $neujpg, 0, 0, 0, 0, $vbg, $y, $jpg_breite, $jpg_hoehe);  // qualitaet wird sehr mies, also besser:
      $dummy = imagecopyresampled ( $kleinesjpg, $neujpg, 0, 0, 0, 0, $vbg, $y, $jpg_breite, $jpg_hoehe);  // qualitaet gut aber laufzeit SEHR (eigentlich viel zu) gross
// Qualitaet 50% ist noch nicht gut, file wird aber schon ziemlich gross...
      imagejpeg ($kleinesjpg, $vorschau_name, 70);
  }

} // end function exif_extrakt_vorschaubild

Bild mittels php-Script ausgeben

function showpic ($image) {

// --- gibt http-Header aus
    header("Content-type: image/jpg");
    header("Content-Type: image/jpeg");
//  header("expires content=0");
//  header("Cache-Control: no-cache, must-revalidate");
//  header("Pragma: no-cache");

// Bild mit php ausgeben -----------------------------------------------------------------------------------
    $image = @fopen ($image, "rb");
    @fpassthru ($image);
    @fclose ($image);

} // end function showpic

Fujifilm Makernotes

Alles was hier nicht explizit aufgeführt ist (z.B. ISO, Blende, Zeit usw.) ist in normalen standardkonformen Tags hinterlegt!

/*
 aus  browser4exif2csv 1.1a vom 26.04.2006

  Autor/Kontakt: Jürgen Galupki
  Lizenz:  https://galupki.de/kontakt/readme-kontakt-lizenz.html
  Kontakt: https://galupki.de/kontakt/
  WWW:     https://galupki.de        
*/


function fuji_data() {
// wird automatisch von exif_data ausgeführt!

/*
        Grundlage war mal:
        Fuji Maker Notes, Quelle:

        Exifer 1.5
        by Jake Olefsky
        http://www.offsky.com/software/exif/index.php
        jake@olefsky.com
        This software is free to use and modify for non-commercial purposes only.  For commercial use
        of this software please contact me.

        ergänzt/modifiziert für S9500 nach Testaufnahmen...
        Juergen Galupki
        https://galupki.de

        STAND: 26.04.2006

        nicht herausbekommen:

*/


global $exifdata; // input
global $result;   // output


   if ( $result['Make'] != "FUJIFILM" ) {
      return;
   }

// **********************************************************************************************************

                        $result['Macro']= $exifdata["MAKERNOTE"]["Macro"];
                                if ($result['Macro']==1) {
                                   $result['Macro'] = "Makro";
                                }  elseif ($result['Macro']==0) {
                                   $result['Macro'] = "";
                                }  else {
                                   $result['Macro'] = $exifdata["MAKERNOTE"]["Macro"];
                                }


//                        $result['SelfTimer']= $exifdata["MAKERNOTE"]["ModeArray"][2];

                        $result['Quality']= $exifdata["MAKERNOTE"]["Quality"];

      $result['FlashStrength_Maker'] = $exifdata["MAKERNOTE"]["FlashStrength"];
      $zn = explode("/", $exifdata["MAKERNOTE"]["FlashStrength"]);
      if ($zn[0]=="0") {
         $result['FlashStrength_Maker'] = "";
      } elseif ( $zn[1]==100 ) {
        $result['FlashStrength_Maker'] = $zn[0]/$zn[1];
      }


                        $result['Flash_Maker']= $exifdata["MAKERNOTE"]["FlashMode"];
                                if($result['Flash_Maker']==0)  $result['Flash_Maker'] = "Auto";
                                if($result['Flash_Maker']==1)  $result['Flash_Maker'] = "Ein";
                                if($result['Flash_Maker']==2)  $result['Flash_Maker'] = "Aus";
                                if($result['Flash_Maker']==3)  $result['Flash_Maker'] = "Rote Augen";
                                if($result['Flash_Maker']==4)  $result['Flash_Maker'] = "Externer Blitz";

//                        $result['DriveMode']= $exifdata["MAKERNOTE"]["ModeArray"][5];

                        $result['FocusMode']= $exifdata["MAKERNOTE"]["FocusMode"];
                                if($result['FocusMode']==0) $result['FocusMode'] = "Autofocus";
                                if($result['FocusMode']==1) $result['FocusMode'] = "Manual Focus";


                        $result['ExposureMode_']=$exifdata["MAKERNOTE"]["PictureMode"];
                                if($result['ExposureMode_']==0)  $result['ExposureMode_']   = "Automode";
                                if($result['ExposureMode_']==1)  $result['ExposureMode_']   = "Portrait";
                                if($result['ExposureMode_']==2)  $result['ExposureMode_']   = "Landschaft";
                                if($result['ExposureMode_']==4)  $result['ExposureMode_']   = "Sport";
                                if($result['ExposureMode_']==5)  $result['ExposureMode_']   = "Langzeit";
                                if($result['ExposureMode_']==7)  $result['ExposureMode_']   = "Nacht";
                                if($result['ExposureMode_']==6)  $result['ExposureMode_']   = "Programmshift";
                                if($result['ExposureMode_']==8)  $result['ExposureMode_']   = "Action";
                                if($result['ExposureMode_']==256)  $result['ExposureMode_'] = "Blendenautomatik Av";
                                if($result['ExposureMode_']==512)  $result['ExposureMode_'] = "Zeitautomatik Tv";
                                if($result['ExposureMode_']==768)  $result['ExposureMode_'] = "Manuell";


                        $result['Saturation_Color']=$exifdata["MAKERNOTE"]["Color"];
                                if($result['Saturation_Color']==0) $result['Saturation_Color']   = "Chroma Saturation Normal";
                                if($result['Saturation_Color']==256) $result['Saturation_Color'] = "Chroma Saturation High";
                                if($result['Saturation_Color']==768) $result['Saturation_Color'] = "Graustufen";


                        $result['Sharpness']=$exifdata["MAKERNOTE"]["Sharpness"];
                                if($result['Sharpness']==1) $result['Sharpness'] = "Soft+";
                                if($result['Sharpness']==2) $result['Sharpness'] = "Soft";
                                if($result['Sharpness']==3) $result['Sharpness'] = "Std";
                                if($result['Sharpness']==4) $result['Sharpness'] = "Hart";
                                if($result['Sharpness']==5) $result['Sharpness'] = "Hart+";


                        if ($result['FocalUnits']>0) {
                           $result['LongFocalLength']  = $result['LongFocalLength'] / $result['FocalUnits'];
                           $result['ShortFocalLength'] = $result['ShortFocalLength'] / $result['FocalUnits'];
                           $result['OpticalZoomRatio_'] = round($result['FocalLength'] / $result['ShortFocalLength'],2);
                           $result['ZoomRatio_'] = $result['OpticalZoomRatio_'];
                        }


                        $result['WhiteBalance_Maker']= $exifdata["MAKERNOTE"]["WhiteBalance"];
                                if($result['WhiteBalance_Maker']==0)  $result['WhiteBalance_Maker']    = "Auto";
                                if($result['WhiteBalance_Maker']==256)  $result['WhiteBalance_Maker']  = "Tageslicht";
                                if($result['WhiteBalance_Maker']==512)  $result['WhiteBalance_Maker']  = "Bewoelkt";
                                if($result['WhiteBalance_Maker']==768)  $result['WhiteBalance_Maker']  = "Neonlicht1";
                                if($result['WhiteBalance_Maker']==769)  $result['WhiteBalance_Maker']  = "DaywhiteColor-fluorescence";
                                if($result['WhiteBalance_Maker']==770) $result['WhiteBalance_Maker']   = "White-fluorescence";
                                if($result['WhiteBalance_Maker']==1024)  $result['WhiteBalance_Maker'] = "Incandenscense";
                                if($result['WhiteBalance_Maker']==3840)  $result['WhiteBalance_Maker'] = "Custom";


                        $result['Flash_SlowSync'] = $exifdata["MAKERNOTE"]["SlowSync"];
                        if ($result['Flash_SlowSync']==0) {
                           $result['Flash_SlowSync'] = "";
                        } elseif ($result['Flash_SlowSync']==1) {
                           $result['Flash_SlowSync'] = "SlowSync";
                        }  else {
                        }

                        $result['ContTake'] = $exifdata["MAKERNOTE"]["ContTake"];
                        if ($result['ContTake']==0) {
                           $result['ContTake'] = "";
                        } elseif ($result['ContTake']==1) {
                           $result['ContTake'] = "Serienbild/Bracketing";
                        }  else {
                        }

                        $result['BlurWarning'] = $exifdata["MAKERNOTE"]["BlurWarning"];
                        if ($result['BlurWarning']==0) {
                           $result['BlurWarning'] = "";
                        } elseif ($result['BlurWarning']==1) {
                           $result['BlurWarning'] = "Verwacklungswarnung";
                        }  else {
                        }

                        $result['FocusWarning'] = $exifdata["MAKERNOTE"]["FocusWarning"];
                        if ($result['FocusWarning']==0) {
                           $result['FocusWarning'] = "";
                        } elseif ($result['FocusWarning']==1) {
                           $result['FocusWarning'] = "Out of focus";
                        }  else {
                        }

                        $result['AEWarning'] = $exifdata["MAKERNOTE"]["AEWarning"];
                        if ($result['AEWarning']==0) {
                           $result['AEWarning'] = "";
                        } elseif ($result['AEWarning']==1) {
                           $result['AEWarning'] = "Überbelichtet";
                        }  else {
                        }


} // end function fuji maker notes

Canon Makernotes

/*
  browser4exif2csv 1.03a vom 19.09.2003

  Autor/Kontakt: Jürgen Galupki
  Lizenz:  https://galupki.de/kontakt/readme-kontakt-lizenz.html
  Kontakt: https://galupki.de/kontakt/
  WWW:     https://galupki.de     
*/


function canon_data() {
// wird automatisch von exif_data ausgeführt!

/*
        Grundlage war mal:
        Canon Maker Notes, Quelle:

        Exifer 1.3
        by Jake Olefsky
        http://www.offsky.com/software/exif/index.php
        jake@olefsky.com
        This software is free to use and modify for non-commercial purposes only.  For commercial use
        of this software please contact me.

        ergänzt/modifiziert für A60/A70 / Exif 2.2 nach Testaufnahmen...
        Juergen Galupki
        https://galupki.de

        STAND: 28-08/2003

        nicht herausbekommen:
        - einige Werte die mit ? gekennzeichnet sind
        - AiAF (welches Fokusfeld wird verwendet)
*/


global $exifdata; // input
global $result;   // output


   if ( $result['Make'] != "Canon" ) {
      return;
   }


// **********************************************************************************************************

                        $result['BytesModeArray']= $exifdata["MAKERNOTE"]["ModeArray"][0] / 2 - 1;

                        $result['Macro']= $exifdata["MAKERNOTE"]["ModeArray"][1];
                                if($result['Macro']==1) $result['Macro'] = "Makro";
                                if($result['Macro']==2) $result['Macro'] = "";

                        $result['SelfTimer']= $exifdata["MAKERNOTE"]["ModeArray"][2];
                                if($result['SelfTimer']==0) $result['SelfTimer'] = "";
                                else $result['SelfTimer']= "Selbstauslöser " . $result['SelfTimer']/10 . "s";

                        $result['Quality']= $exifdata["MAKERNOTE"]["ModeArray"][3];
                                if($result['Quality']==2) $result['Quality'] = "Normal";
                                if($result['Quality']==3) $result['Quality'] = "FINE";
                                if($result['Quality']==5) $result['Quality'] = "Superfein";

                        $result['Flash_Maker']= $exifdata["MAKERNOTE"]["ModeArray"][4];
                                if($result['Flash_Maker']==0)  $result['Flash_Maker'] = "Aus";
                                if($result['Flash_Maker']==1)  $result['Flash_Maker'] = "Auto";
                                if($result['Flash_Maker']==2)  $result['Flash_Maker'] = "Ein";
                                if($result['Flash_Maker']==3)  $result['Flash_Maker'] = "Rote Augen";
                                if($result['Flash_Maker']==4)  $result['Flash_Maker'] = "slow synchro";
                                if($result['Flash_Maker']==5)  $result['Flash_Maker'] = "Auto, Rote Augen";
                                if($result['Flash_Maker']==6)  $result['Flash_Maker'] = "Ein, Rote Augen";
                                if($result['Flash_Maker']==16) $result['Flash_Maker'] = "Externer Blitz";

                        $result['DriveMode']= $exifdata["MAKERNOTE"]["ModeArray"][5];
                                if($result['DriveMode']==0) $result['DriveMode'] = "Einzelbild";
                                if($result['DriveMode']==1) $result['DriveMode'] = "Serienbild";

                        $result['FocusMode']= $exifdata["MAKERNOTE"]["ModeArray"][7];
                                if($result['FocusMode']==0) $result['FocusMode'] = "One-Shot";
                                if($result['FocusMode']==1) $result['FocusMode'] = "AI Servo";
                                if($result['FocusMode']==2) $result['FocusMode'] = "AI Focus";
                                if($result['FocusMode']==3) $result['FocusMode'] = "MF";
                                if($result['FocusMode']==4) $result['FocusMode'] = "Single";
                                if($result['FocusMode']==5) $result['FocusMode'] = "Continous";
                                if($result['FocusMode']==6) $result['FocusMode'] = "MF";


                        $result['ImageSize']=$exifdata["MAKERNOTE"]["ModeArray"][10];
                                if($result['ImageSize']==0) $result['ImageSize'] = "Large";
                                if($result['ImageSize']==1) $result['ImageSize'] = "Medium";
                                if($result['ImageSize']==2) $result['ImageSize'] = "Small";

                        $result['ExposureMode_']=$exifdata["MAKERNOTE"]["ModeArray"][11];
                                if($result['ExposureMode_']==0)  $result['ExposureMode_'] = "Automode";
                                if($result['ExposureMode_']==1)  $result['ExposureMode_'] = "Manuell";
                                if($result['ExposureMode_']==2)  $result['ExposureMode_'] = "Landschaft";
                                if($result['ExposureMode_']==3)  $result['ExposureMode_'] = "Schnelle Verschlusszeiten";
                                if($result['ExposureMode_']==4)  $result['ExposureMode_'] = "Langsame Verschlusszeiten";
                                if($result['ExposureMode_']==5)  $result['ExposureMode_'] = "Nacht";
                                if($result['ExposureMode_']==6)  $result['ExposureMode_'] = "Schwarzweiss";
                                if($result['ExposureMode_']==7)  $result['ExposureMode_'] = "Sepia";
                                if($result['ExposureMode_']==8)  $result['ExposureMode_'] = "Portrait";
                                if($result['ExposureMode_']==9)  $result['ExposureMode_'] = "Sport";
                                if($result['ExposureMode_']==10) $result['ExposureMode_'] = "Makro/Close-Up";
                                if($result['ExposureMode_']==11) $result['ExposureMode_'] = "Pan Focus";

                        $result['DigitalZoom']=$exifdata["MAKERNOTE"]["ModeArray"][12];
                                if($result['DigitalZoom']==0) $result['DigitalZoom'] = "";
                                if($result['DigitalZoom']==1) $result['DigitalZoom'] = "2x";
                                if($result['DigitalZoom']==2) $result['DigitalZoom'] = "4x";
                                if($result['DigitalZoom']==3) $result['DigitalZoom'] = "Digitalzoom";

                        $result['Contrast']=$exifdata["MAKERNOTE"]["ModeArray"][13];
                                if($result['Contrast']==0) $result['Contrast'] = "Normal";
                                if($result['Contrast']==1) $result['Contrast'] = "Hoch";

                        $result['Saturation']=$exifdata["MAKERNOTE"]["ModeArray"][14];
                                if($result['Saturation']==0) $result['Saturation'] = "Normal";
                                if($result['Saturation']==1) $result['Saturation'] = "Hoch";

                        $result['Sharpness']=$exifdata["MAKERNOTE"]["ModeArray"][15];
                                if($result['Sharpness']==0) $result['Sharpness'] = "Normal";
                                if($result['Sharpness']==1) $result['Sharpness'] = "Hoch";

                        $result['ISO']=$exifdata["MAKERNOTE"]["ModeArray"][16];
                                if($result['ISO']==15) $result['ISO'] = "Auto";
                                if($result['ISO']==16) $result['ISO'] = "50";
                                if($result['ISO']==17) $result['ISO'] = "100";
                                if($result['ISO']==18) $result['ISO'] = "200";
                                if($result['ISO']==19) $result['ISO'] = "400";

                        $result['MeteringMode_Canon']=$exifdata["MAKERNOTE"]["ModeArray"][17];
                                if($result['MeteringMode_Canon']==3) $result['MeteringMode_Canon'] = "Mehrfeldmessung";
                                if($result['MeteringMode_Canon']==4) $result['MeteringMode_Canon'] = "Spot";
                                if($result['MeteringMode_Canon']==5) $result['MeteringMode_Canon'] = "Mittenbetont Integral";

                        $result['FocusType']=$exifdata["MAKERNOTE"]["ModeArray"][18];
                                if($result['FocusType']==0) $result['FocusType'] = "MF";
                                if($result['FocusType']==1) $result['FocusType'] = "Auto";
                                if($result['FocusType']==3) $result['FocusType'] = "Makro";
                                if($result['FocusType']==8) $result['FocusType'] = "Locked (Panorama)";

                        $result['AFPointSelected']=$exifdata["MAKERNOTE"]["ModeArray"][19];
                                if($result['AFPointSelected']==0x2005) $result['AFPointSelected'] = "Zentral";
                                if($result['AFPointSelected']==0x3000) $result['AFPointSelected'] = "MF";
                                if($result['AFPointSelected']==0x3001) $result['AFPointSelected'] = "Auto";
                                if($result['AFPointSelected']==0x3002) $result['AFPointSelected'] = "Rechts";
                                if($result['AFPointSelected']==0x3003) $result['AFPointSelected'] = "Mitte";
                                if($result['AFPointSelected']==0x3004) $result['AFPointSelected'] = "Links";
                                if($result['AFPointSelected']==0x4001) $result['AFPointSelected'] = "AiAF";

                        $result['ExposureMode_Canon']=$exifdata["MAKERNOTE"]["ModeArray"][20];
                                if($result['ExposureMode_Canon']==0) $result['ExposureMode_Canon'] = "EasyShoot";
                                if($result['ExposureMode_Canon']==1) $result['ExposureMode_Canon'] = "Programm";
                                if($result['ExposureMode_Canon']==2) $result['ExposureMode_Canon'] = "Zeitautomatik Tv";
                                if($result['ExposureMode_Canon']==3) $result['ExposureMode_Canon'] = "Blendenautomatik Av";
                                if($result['ExposureMode_Canon']==4) $result['ExposureMode_Canon'] = "Manuell";
                                if($result['ExposureMode_Canon']==5) $result['ExposureMode_Canon'] = "Auto-DEP";

                        $result['LongFocalLength']=$exifdata["MAKERNOTE"]["ModeArray"][23];
                        $result['ShortFocalLength']=$exifdata["MAKERNOTE"]["ModeArray"][24];
                        $result['FocalUnits']=$exifdata["MAKERNOTE"]["ModeArray"][25];
                        if ($result['FocalUnits']>0) {
                           $result['LongFocalLength']  = $result['LongFocalLength'] / $result['FocalUnits'];
                           $result['ShortFocalLength'] = $result['ShortFocalLength'] / $result['FocalUnits'];
                           $result['OpticalZoomRatio_'] = round($result['FocalLength'] / $result['ShortFocalLength'],2);
                           $result['ZoomRatio_'] = $result['OpticalZoomRatio_'];
                        }

                        $result['FlashActivity']=$exifdata["MAKERNOTE"]["ModeArray"][28];
                           if($result['FlashActivity']==0) $result['FlashActivity'] = "Flash not fired";
                           if($result['FlashActivity']==1) $result['FlashActivity'] = "Flash fired";

                        $result['FlashDetails']=$exifdata["MAKERNOTE"]["ModeArray"][29];
                           if($result['FlashDetails']==0) $result['FlashDetails'] = "";
                           if($result['FlashDetails'] & pow(2,14) ) $result['FlashDetails'] = "Externer E-TTL";
                           if($result['FlashDetails'] & pow(2,13) ) $result['FlashDetails'] = "Interner Blitz";
                           if($result['FlashDetails'] & pow(2,11) ) $result['FlashDetails'] = "FP Synck used";
                           if($result['FlashDetails'] & pow(2,7)  ) $result['FlashDetails'] = "Synck Zweiter Verschlussvorhang";
                           if($result['FlashDetails'] & pow(2,4)  ) $result['FlashDetails'] = "FP Synck enabled";

                        $result['FocusMode_']= $exifdata["MAKERNOTE"]["ModeArray"][32];
                                if($result['FocusMode_']==0) $result['FocusMode_'] = "Single";
                                if($result['FocusMode_']==1) $result['FocusMode_'] = "Continous";

                        $result['DigitalZoomRatio_N']= $exifdata["MAKERNOTE"]["ModeArray"][36];
                        $result['DigitalZoomRatio_Z']= $exifdata["MAKERNOTE"]["ModeArray"][37];
                                if($result['DigitalZoomRatio_N']!=$result['DigitalZoomRatio_Z']) {
                                   $result['DigitalZoomRatio_'] = round($result['DigitalZoomRatio_Z'] / $result['DigitalZoomRatio_N'],2);
                                   $result['ZoomRatio_'] = $result['OpticalZoomRatio_'] * $result['DigitalZoomRatio_'];
                                }  else {
                                   $result['DigitalZoomRatio_'] = 1;
                                }

                        $result['PhotoEffect'] = $exifdata["MAKERNOTE"]["ModeArray"][40];
                                if($result['PhotoEffect']==0) $result['PhotoEffect'] = "";
                                if($result['PhotoEffect']==1) $result['PhotoEffect'] = "Kräftig";
                                if($result['PhotoEffect']==2) $result['PhotoEffect'] = "Neutral";
                                if($result['PhotoEffect']==3) $result['PhotoEffect'] = "Gering schärfen";
                                if($result['PhotoEffect']==4) $result['PhotoEffect'] = "Sepia";
                                if($result['PhotoEffect']==5) $result['PhotoEffect'] = "Schwarzweiss";

// **********************************************************************************************************

                        $result['BytesImageInfo']= $exifdata["MAKERNOTE"]["ImageInfo"][0] / 2 - 1;

//                        $result['?2-03']= $exifdata["MAKERNOTE"]["ImageInfo"][3];
//                        $result['?2-05']= $exifdata["MAKERNOTE"]["ImageInfo"][5];

                        $result['WhiteBalance_Maker']= $exifdata["MAKERNOTE"]["ImageInfo"][7];
                                if($result['WhiteBalance_Maker']==0)  $result['WhiteBalance_Maker'] = "Auto";
                                if($result['WhiteBalance_Maker']==1)  $result['WhiteBalance_Maker'] = "Tageslicht";
                                if($result['WhiteBalance_Maker']==2)  $result['WhiteBalance_Maker'] = "Wolkig";
                                if($result['WhiteBalance_Maker']==3)  $result['WhiteBalance_Maker'] = "Kunstlicht";
                                if($result['WhiteBalance_Maker']==4)  $result['WhiteBalance_Maker'] = "Leuchtstoff";
                                if($result['WhiteBalance_Maker']==14) $result['WhiteBalance_Maker'] = "Leuchtstoff H";
                                if($result['WhiteBalance_Maker']==5)  $result['WhiteBalance_Maker'] = "Blitzlicht";
                                if($result['WhiteBalance_Maker']==6)  $result['WhiteBalance_Maker'] = "Manuell";
                                if($result['WhiteBalance_Maker']==65535) $result['WhiteBalance_Maker'] = "Sepia / s/w";

                        $result['SequenceNumber']= $exifdata["MAKERNOTE"]["ImageInfo"][9];

                        $result['AFPointUsed']= $exifdata["MAKERNOTE"]["ImageInfo"][14];

/*
Only set in One-Shot mode?
If none used, AF failed or manual focus was used (e.g. on a lens with full-time manual focus)
Bits 15..0:
15-12: number of available focus points
2: left
1: center
0: right
*/

                        $result['FlashBias']= $exifdata["MAKERNOTE"]["ImageInfo"][15];

                        $result['SubjectDistance']= $exifdata["MAKERNOTE"]["ImageInfo"][19]/100 . "m";
                                if($result['SubjectDistance']=="0m") $result['SubjectDistance']="";
                                if($result['SubjectDistance']>"65") $result['SubjectDistance']="unendlich";

//                        $result['?2-19']= $exifdata["MAKERNOTE"]["ImageInfo"][19];
//                        $result['?2-22']= $exifdata["MAKERNOTE"]["ImageInfo"][22];


} // end function canon maker notes


 
29.04.2008 16:32:44h Glossar top