10,7 → 10,7 |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @version $Id$ |
*/ |
class ExtracteurMetadonnees() { |
class ExtracteurMetadonnees { |
|
public function extraireMetadonnees($chemin_fichier) |
{ |
30,19 → 30,21 |
**/ |
public function extraireExif($chemin_fichier) |
{ |
$exif_tab = $this->initialiserTableauExif() ; |
$exif_tab = $this->initialiserTableauExif () ; |
|
$exif = exif_read_data($url,"EXIF,COMPUTED,IFD0,FILE,COMMENT",true,false); |
|
foreach ($exif as $key => $section) |
{ |
foreach ($section as $name => $val) |
{ |
if($name != "MakerNote") |
{ |
$this->decoderValeurExif($name, $val ,&$exif_tab) ; |
} |
} |
$exif = @exif_read_data($chemin_fichier,"EXIF,COMPUTED,IFD0,FILE,COMMENT",true,false); |
|
if ($exif) { |
foreach ($exif as $key => $section) |
{ |
foreach ($section as $name => $val) |
{ |
if ($name != "MakerNote") |
{ |
$this->decoderValeurExif ($name, $val ,&$exif_tab) ; |
} |
} |
} |
} |
|
return $exif_tab ; |
62,13 → 64,15 |
{ |
// on parse les donnees |
$iptc = iptcparse($info["APP13"]); |
// et on les analyse |
foreach($iptc as $marker => $section) |
{ |
foreach($section as $nom => $val) |
if ($iptc) { |
// et on les analyse |
foreach ($iptc as $marker => $section) |
{ |
// pour remplir le tableau de donnees |
decoderValeurIptc($marker, $val ,&$iptc_tab) ; |
foreach ($section as $nom => $val) |
{ |
// pour remplir le tableau de donnees |
$this->decoderValeurIptc($marker, $val ,&$iptc_tab) ; |
} |
} |
} |
} |
84,7 → 88,7 |
**/ |
private function decoderValeurExif($nom, $val ,$data_tab) |
{ |
switch($nom) |
switch ($nom) |
{ |
|
case "Height" : |