1 | <?php |
---|
2 | |
---|
3 | /***************************************************************************\ |
---|
4 | * SPIP, Systeme de publication pour l'internet * |
---|
5 | * * |
---|
6 | * Copyright (c) 2001-2015 * |
---|
7 | * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * |
---|
8 | * * |
---|
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 | \***************************************************************************/ |
---|
12 | |
---|
13 | if (!defined("_ECRIRE_INC_VERSION")) { |
---|
14 | return; |
---|
15 | } |
---|
16 | |
---|
17 | |
---|
18 | // |
---|
19 | // Fonctions graphiques |
---|
20 | // |
---|
21 | // La matrice permet au compilateur de reconnaitre un filtre |
---|
22 | // et de faire la bonne inclusion au moment de son appel dans un squelette |
---|
23 | |
---|
24 | // Filtres image -> image |
---|
25 | $GLOBALS['spip_matrice']['image_recadre'] = 'filtres/images_transforme.php'; |
---|
26 | $GLOBALS['spip_matrice']['image_recadre_mini'] = 'filtres/images_transforme.php'; |
---|
27 | $GLOBALS['spip_matrice']['image_alpha'] = 'filtres/images_transforme.php'; |
---|
28 | $GLOBALS['spip_matrice']['image_flip_vertical'] = 'filtres/images_transforme.php'; |
---|
29 | $GLOBALS['spip_matrice']['image_flip_horizontal'] = 'filtres/images_transforme.php'; |
---|
30 | $GLOBALS['spip_matrice']['image_masque'] = 'filtres/images_transforme.php'; |
---|
31 | $GLOBALS['spip_matrice']['image_nb'] = 'filtres/images_transforme.php'; |
---|
32 | $GLOBALS['spip_matrice']['image_flou'] = 'filtres/images_transforme.php'; |
---|
33 | $GLOBALS['spip_matrice']['image_RotateBicubic'] = 'filtres/images_transforme.php'; |
---|
34 | $GLOBALS['spip_matrice']['image_rotation'] = 'filtres/images_transforme.php'; |
---|
35 | |
---|
36 | $GLOBALS['spip_matrice']['image_gamma'] = 'filtres/images_transforme.php'; |
---|
37 | $GLOBALS['spip_matrice']['image_sepia'] = 'filtres/images_transforme.php'; |
---|
38 | $GLOBALS['spip_matrice']['image_aplatir'] = 'filtres/images_transforme.php'; |
---|
39 | $GLOBALS['spip_matrice']['image_format'] = 'filtres/images_transforme.php'; |
---|
40 | $GLOBALS['spip_matrice']['image_renforcement'] = 'filtres/images_transforme.php'; |
---|
41 | $GLOBALS['spip_matrice']['image_imagick'] = 'filtres/images_transforme.php'; |
---|
42 | $GLOBALS['spip_matrice']['image_fond_transparent'] = 'filtres/images_transforme.php'; |
---|
43 | |
---|
44 | |
---|
45 | // Filtres couleur -> couleur |
---|
46 | $GLOBALS['spip_matrice']['couleur_extraire'] = 'filtres/couleurs.php'; |
---|
47 | $GLOBALS['spip_matrice']['couleur_extreme'] = 'filtres/couleurs.php'; |
---|
48 | $GLOBALS['spip_matrice']['couleur_inverser'] = 'filtres/couleurs.php'; |
---|
49 | $GLOBALS['spip_matrice']['couleur_foncer_si_claire'] = 'filtres/couleurs.php'; |
---|
50 | $GLOBALS['spip_matrice']['couleur_eclaircir_si_foncee'] = 'filtres/couleurs.php'; |
---|
51 | $GLOBALS['spip_matrice']['couleur_saturation'] = 'filtres/couleurs.php'; |
---|
52 | $GLOBALS['spip_matrice']['couleur_luminance'] = 'filtres/couleurs.php'; |
---|
53 | $GLOBALS['spip_matrice']['couleur_web'] = 'filtres/couleurs.php'; |
---|
54 | $GLOBALS['spip_matrice']['couleur_4096'] = 'filtres/couleurs.php'; |
---|
55 | |
---|
56 | // ces filtres la ne devraient jamais etre appeles dans les squelettes en direct |
---|
57 | // et n'ont rien a faire dans la matrice |
---|
58 | /* |
---|
59 | $GLOBALS['spip_matrice']['_image_couleur_extraire'] = 'filtres/images_lib.php'; |
---|
60 | $GLOBALS['spip_matrice']['_couleur_dec_to_hex'] = 'filtres/images_lib.php'; |
---|
61 | $GLOBALS['spip_matrice']['_couleur_hex_to_dec'] = 'filtres/images_lib.php'; |
---|
62 | $GLOBALS['spip_matrice']['_image_distance_pixel'] = 'filtres/images_lib.php'; |
---|
63 | $GLOBALS['spip_matrice']['_image_decale_composante'] = 'filtres/images_lib.php'; |
---|
64 | $GLOBALS['spip_matrice']['_image_decale_composante_127'] = 'filtres/images_lib.php'; |
---|
65 | */ |
---|
66 | |
---|
67 | /** |
---|
68 | * Nommages maintenus pour compatibilite. |
---|
69 | */ |
---|
70 | |
---|
71 | |
---|
72 | /** |
---|
73 | * Extraire une couleur d'une image |
---|
74 | * |
---|
75 | * @param string $img |
---|
76 | * @param int $x |
---|
77 | * @param int $y |
---|
78 | * @return string |
---|
79 | */ |
---|
80 | function extraire_image_couleur($img, $x = 10, $y = 6) { |
---|
81 | include_spip('filtres/images_lib'); |
---|
82 | |
---|
83 | return _image_couleur_extraire($img, $x, $y); |
---|
84 | } |
---|
85 | |
---|
86 | /** |
---|
87 | * creer une image typo |
---|
88 | * |
---|
89 | * @return string |
---|
90 | */ |
---|
91 | function image_typo() { |
---|
92 | include_spip('filtres/images_typo'); |
---|
93 | $tous = func_get_args(); |
---|
94 | |
---|
95 | return call_user_func_array('produire_image_typo', $tous); |
---|
96 | } |
---|
97 | |
---|
98 | ?> |
---|