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

Create PNG file

Mon Oct 27, 2008 5:38 pm

Code:
  

<html>
<body>
<?php
    $img
=ImageCreate(300,300);
    
$bgcolor=ImageColorAllocate($img,200,200,200);
    
$red=ImagecolorAllocate($img,255,0,0);
                                                            
    
Imagerectangle($img,50,50,150,150,$red);
    
Imagefilledrectangle($img,50,170,150,270,$red);
                                                            
    
ImagePNG($img,"pic.png");
    
ImageDestroy($img);
?>
<img src="pic.png" border=0>
</body>
</html>




Post a reply
  Related Posts  to : Create PNG file
 Create a text file     -  
 Create new file with JavaFX     -  
 Create set up file of my java application     -  
 How to create a file in java script using FireFox     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 Copy file to file in java code- implementation     -  
 file descriptor vs file pointer     -  
 getting file name of html input file tag using jsp     -  
 How to convert xml file to Pdf file using C     -  
 create folder in asp.net     -  

Topic Tags

PHP Graphics