PHP/Graphics Image/Transparent — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 10:05, 26 мая 2010
Making Colors Transparent with imagecolortransparent()
<source lang="html4strict">
<?php header("Content-type: image/gif"); $image = imagecreate( 200, 200 ); $red = imagecolorallocate($image, 255,0,0); $blue = imagecolorallocate($image, 0,0,255 ); $points = array (10, 10,
190, 190, 190, 10, 10, 190
); imagefilledpolygon( $image, $points, count( $points )/2 , $blue ); imagecolortransparent( $image, $red ); imagegif($image); ?>
</source>