Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Making Colors Transparent with imagecolortransparent()

Sun Oct 26, 2008 11:03 pm

Code:
<?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 )/, $blue );
imagecolortransparent( $image, $red );
imagegif($image);
?>




Post a reply
  Related Posts  to : Making Colors Transparent with imagecolortransparent()
 Making calculator in JAVA     -  
 help for making web pages using servlets     -  
 Transparent Text     -  
 opacity of HTML element- transparent     -  
 Difference between Opaque,Transparent and Translucent Images     -  
 two Different background colors     -  
 deal with colors in java     -  
 Drawing a triangle with colors     -  
 show Rainbow Colors     -  
 Table Border Colors for PHPBB3     -  

Topic Tags

PHP Graphics