X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Ffiltres_images%2Ffiltres%2Fimages_transforme.php;h=0722117cfa394fccc668456015ca2afea81982af;hp=9bd15e4c74d04c9d998a5fb694c2d667acfc2a8f;hb=e847eea4a82a7396dd0abf860f9b30d654f38629;hpb=d686c3e22e97dd46ef42bcd0f138c65083f8f232 diff --git a/www/plugins-dist/filtres_images/filtres/images_transforme.php b/www/plugins-dist/filtres_images/filtres/images_transforme.php index 9bd15e4..0722117 100644 --- a/www/plugins-dist/filtres_images/filtres/images_transforme.php +++ b/www/plugins-dist/filtres_images/filtres/images_transforme.php @@ -1570,12 +1570,9 @@ function image_renforcement($im, $k=0.5) -// -// alpha = 0: aucune transparence -// alpha = 127: completement transparent /** * Transforme la couleur de fond de l'image en transparence - * Le filtre ne g�re pas la notion de contiguite aux bords, et affectera tous les pixels de l'image dans la couleur visee + * Le filtre ne gere pas la notion de contiguite aux bords, et affectera tous les pixels de l'image dans la couleur visee * $background_color : couleur cible * $tolerance : distance L1 dans l'espace RGB des couleur autour de la couleur $background_color pour lequel la transparence sera appliquee * $alpha : transparence a appliquer pour les pixels de la couleur cibles avec la tolerance ci-dessus @@ -1585,8 +1582,10 @@ function image_renforcement($im, $k=0.5) * @param string $background_color * @param int $tolerance * @param int $alpha - * @param float $coeff_lissage - * @return string + * alpha = 0: aucune transparence + * alpha = 127: completement transparent + * @param int $coeff_lissage + * @return mixed|null|string */ function image_fond_transparent($im, $background_color, $tolerance=12, $alpha = 127, $coeff_lissage=7) { @@ -1602,7 +1601,7 @@ function image_fond_transparent($im, $background_color, $tolerance=12, $alpha = $creer = $image["creer"]; - if (true OR $creer) { + if ($creer) { $bg = _couleur_hex_to_dec($background_color); $bg_r = $bg['red']; $bg_g = $bg['green']; @@ -1647,7 +1646,7 @@ function image_fond_transparent($im, $background_color, $tolerance=12, $alpha = imagedestroy($im); imagedestroy($im2); } - + return _image_ecrire_tag($image,array('src'=>$dest)); } ?>