1 | <?php |
---|
2 | /***************************************************************************\ |
---|
3 | * SPIP, Systeme de publication pour l'internet * |
---|
4 | * * |
---|
5 | * Copyright (c) 2001-2015 * |
---|
6 | * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * |
---|
7 | * * |
---|
8 | * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * |
---|
9 | * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * |
---|
10 | \***************************************************************************/ |
---|
11 | |
---|
12 | /** |
---|
13 | * Ce fichier ne sert pas |
---|
14 | * Il est maintenu pour assurer la compatibilite des anciens scripts avec les anciens nommages de fonction |
---|
15 | * |
---|
16 | */ |
---|
17 | |
---|
18 | if (!defined('_ECRIRE_INC_VERSION')) { |
---|
19 | return; |
---|
20 | } |
---|
21 | |
---|
22 | function couleur_dec_to_hex($red, $green, $blue) { |
---|
23 | include_spip('filtres/images_lib'); |
---|
24 | |
---|
25 | return _couleur_dec_to_hex($red, $green, $blue); |
---|
26 | } |
---|
27 | |
---|
28 | function couleur_hex_to_dec($couleur) { |
---|
29 | include_spip('filtres/images_lib'); |
---|
30 | |
---|
31 | return _couleur_hex_to_dec($couleur); |
---|
32 | } |
---|
33 | |
---|
34 | function couleur_rgb2hsv($R, $G, $B) { |
---|
35 | include_spip('filtres/images_lib'); |
---|
36 | |
---|
37 | return _couleur_rgb2hsv($R, $G, $B); |
---|
38 | } |
---|
39 | |
---|
40 | function couleur_hsv2rgb($H, $S, $V) { |
---|
41 | include_spip('filtres/images_lib'); |
---|
42 | |
---|
43 | return _couleur_hsv2rgb($H, $S, $V); |
---|
44 | } |
---|
45 | |
---|
46 | function couleur_rgb2hsl($R, $G, $B) { |
---|
47 | include_spip('filtres/images_lib'); |
---|
48 | |
---|
49 | return _couleur_rgb2hsl($R, $G, $B); |
---|
50 | } |
---|
51 | |
---|
52 | function couleur_hsl2rgb($H, $S, $L) { |
---|
53 | include_spip('filtres/images_lib'); |
---|
54 | |
---|
55 | return _couleur_hsl2rgb($H, $S, $L); |
---|
56 | } |
---|
57 | |
---|
58 | function image_couleur_extraire($img, $x = 10, $y = 6) { |
---|
59 | include_spip('filtres/images_lib'); |
---|
60 | |
---|
61 | return _image_couleur_extraire($img, $x, $y); |
---|
62 | } |
---|
63 | |
---|
64 | function image_distance_pixel($xo, $yo, $x0, $y0) { |
---|
65 | include_spip('filtres/images_lib'); |
---|
66 | |
---|
67 | return _image_distance_pixel($xo, $yo, $x0, $y0); |
---|
68 | } |
---|
69 | |
---|
70 | function image_decal_couleur($coul, $gamma) { |
---|
71 | include_spip('filtres/images_lib'); |
---|
72 | |
---|
73 | return _image_decale_composante($coul, $gamma); |
---|
74 | } |
---|
75 | |
---|
76 | function image_decal_couleur_127($coul, $val) { |
---|
77 | include_spip('filtres/images_lib'); |
---|
78 | |
---|
79 | return _image_decale_composante_127($coul, $val); |
---|
80 | } |
---|
81 | |
---|
82 | function image_creer_vignette( |
---|
83 | $valeurs, |
---|
84 | $maxWidth, |
---|
85 | $maxHeight, |
---|
86 | $process = 'AUTO', |
---|
87 | $force = false, |
---|
88 | $test_cache_only = false |
---|
89 | ) { |
---|
90 | include_spip('inc/filtres_images_lib'); |
---|
91 | |
---|
92 | return _image_creer_vignette($valeurs, $maxWidth, $maxHeight, $process, $force, $test_cache_only); |
---|
93 | } |
---|
94 | |
---|
95 | function image_ecrire_tag($valeurs, $surcharge) { |
---|
96 | include_spip('inc/filtres_images_lib'); |
---|
97 | |
---|
98 | return _image_ecrire_tag($valeurs, $surcharge); |
---|
99 | } |
---|
100 | |
---|
101 | function image_gd_output($img, $valeurs, $qualite = _IMG_GD_QUALITE) { |
---|
102 | include_spip('inc/filtres_images_lib'); |
---|
103 | |
---|
104 | return _image_gd_output($img, $valeurs, $qualite); |
---|
105 | } |
---|
106 | |
---|
107 | function image_imagepng($img, $fichier) { |
---|
108 | include_spip('inc/filtres_images_lib'); |
---|
109 | |
---|
110 | return _image_imagepng($img, $fichier); |
---|
111 | } |
---|
112 | |
---|
113 | function image_imagegif($img, $fichier) { |
---|
114 | include_spip('inc/filtres_images_lib'); |
---|
115 | |
---|
116 | return _image_imagegif($img, $fichier); |
---|
117 | } |
---|
118 | |
---|
119 | function image_imagejpg($img, $fichier, $qualite = _IMG_GD_QUALITE) { |
---|
120 | include_spip('inc/filtres_images_lib'); |
---|
121 | |
---|
122 | return image_imagejpg($img, $fichier, $qualite = _IMG_GD_QUALITE); |
---|
123 | } |
---|
124 | |
---|
125 | function image_imageico($img, $fichier) { |
---|
126 | include_spip('inc/filtres_images_lib'); |
---|
127 | |
---|
128 | return _image_imageico($img, $fichier); |
---|
129 | } |
---|
130 | |
---|
131 | function image_ratio($srcWidth, $srcHeight, $maxWidth, $maxHeight) { |
---|
132 | include_spip('inc/filtres_images_lib'); |
---|
133 | |
---|
134 | return _image_ratio($srcWidth, $srcHeight, $maxWidth, $maxHeight); |
---|
135 | } |
---|
136 | |
---|
137 | function image_tag_changer_taille($tag, $width, $height, $style = false) { |
---|
138 | include_spip('inc/filtres_images_lib'); |
---|
139 | |
---|
140 | return _image_tag_changer_taille($tag, $width, $height, $style); |
---|
141 | } |
---|
142 | |
---|
143 | function image_valeurs_trans($img, $effet, $forcer_format = false, $fonction_creation = null) { |
---|
144 | include_spip('inc/filtres_images_lib'); |
---|
145 | |
---|
146 | return _image_valeurs_trans($img, $effet, $forcer_format, $fonction_creation); |
---|
147 | } |
---|
148 | |
---|
149 | // Pour assurer la compatibilite avec les anciens nom des filtres image_xxx |
---|
150 | // commencent par "image_" |
---|
151 | // http://code.spip.net/@reduire_image |
---|
152 | function reduire_image($texte, $taille = -1, $taille_y = -1) { |
---|
153 | return filtrer('image_graver', |
---|
154 | filtrer('image_reduire', $texte, $taille, $taille_y) |
---|
155 | ); |
---|
156 | } |
---|
157 | |
---|
158 | // http://code.spip.net/@valeurs_image_trans |
---|
159 | function valeurs_image_trans($img, $effet, $forcer_format = false) { |
---|
160 | include_spip('inc/filtres_images_lib_mini'); |
---|
161 | |
---|
162 | return _image_valeurs_trans($img, $effet, $forcer_format = false); |
---|
163 | } |
---|
164 | |
---|
165 | ?> |
---|