0344440517b7b1c3da4e6822b1570e903087daee
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2020 *
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')) {
17 function metadata_image_dist($fichier) {
20 if ($size_image = @getimagesize
($fichier)) {
21 $meta['largeur'] = intval($size_image[0]);
22 $meta['hauteur'] = intval($size_image[1]);
23 $meta['type_image'] = decoder_type_image($size_image[2]);
30 * Convertit le type numerique retourne par getimagesize() en extension fichier
36 // https://code.spip.net/@decoder_type_image
37 function decoder_type_image($type, $strict = false) {
46 return $strict ?
'' : 'swf';