Subversion Repositories eFlore/Applications.cel

Rev

Rev 623 | Rev 970 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 623 Rev 632
Line 8... Line 8...
8
 * @author Aurélien PERONNET <aurelien@tela-botanica.org>
8
 * @author Aurélien PERONNET <aurelien@tela-botanica.org>
9
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
9
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
10
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
10
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
11
 * @version $Id$
11
 * @version $Id$
12
 */
12
 */
13
class ExtracteurMetadonnees() {
13
class ExtracteurMetadonnees {
Line 14... Line 14...
14
 
14
 
15
	 public function extraireMetadonnees($chemin_fichier)
15
	 public function extraireMetadonnees($chemin_fichier)
Line 16... Line 16...
16
	 {
16
	 {
Line 30... Line 30...
30
	**/
30
	**/
31
	public function extraireExif($chemin_fichier)
31
	public function extraireExif($chemin_fichier)
32
	{
32
	{
33
		$exif_tab = $this->initialiserTableauExif() ;
33
		$exif_tab = $this->initialiserTableauExif () ;
Line 34... Line 34...
34
	
34
	
Line -... Line 35...
-
 
35
		$exif = @exif_read_data($chemin_fichier,"EXIF,COMPUTED,IFD0,FILE,COMMENT",true,false);
35
		$exif = exif_read_data($url,"EXIF,COMPUTED,IFD0,FILE,COMMENT",true,false);
36
 
36
					
37
		if ($exif) {
37
		foreach ($exif as $key => $section) 
38
			foreach ($exif as $key => $section) 
38
		{
39
			{
39
		    foreach ($section as $name => $val) 
40
			    foreach ($section as $name => $val) 
40
		    {
41
			    {
41
				if($name != "MakerNote")
42
					if ($name != "MakerNote")
42
				{
43
					{
43
						$this->decoderValeurExif($name, $val ,&$exif_tab) ;
44
							$this->decoderValeurExif ($name, $val ,&$exif_tab) ;
44
				}
45
					}
-
 
46
			    }
Line 45... Line 47...
45
		    }
47
			}
46
		}
48
		}
Line 47... Line 49...
47
		
49
		
Line 60... Line 62...
60
		// s'il existe
62
		// s'il existe
61
		if (isset($info["APP13"])) 
63
		if (isset($info["APP13"])) 
62
		{
64
		{
63
			// on parse les donnees
65
			// on parse les donnees
64
			$iptc = iptcparse($info["APP13"]);
66
			$iptc = iptcparse($info["APP13"]);
-
 
67
			if ($iptc) {
65
			// et on les analyse
68
				// et on les analyse
66
			foreach($iptc as $marker => $section)
69
				foreach ($iptc as $marker => $section)
67
			{
70
				{
68
				foreach($section as $nom => $val)
71
					foreach ($section as $nom => $val)
69
				{
72
					{
70
					// pour remplir le tableau de donnees
73
						// pour remplir le tableau de donnees
71
					decoderValeurIptc($marker, $val ,&$iptc_tab) ;
74
						$this->decoderValeurIptc($marker, $val ,&$iptc_tab) ;
-
 
75
					}
72
				}
76
				}
73
			}
77
			}
74
		}
78
		}
Line 75... Line 79...
75
		
79