3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2013 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 function metadata_image_dist($fichier){
18 if ($size_image = @getimagesize
($fichier)) {
19 $meta['largeur'] = intval($size_image[0]);
20 $meta['hauteur'] = intval($size_image[1]);
21 $meta['type_image'] = decoder_type_image($size_image[2]);
28 * Convertit le type numerique retourne par getimagesize() en extension fichier
34 // http://doc.spip.org/@decoder_type_image
35 function decoder_type_image($type, $strict = false) {
44 return $strict ?
"" : "swf";