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

PNG image to the image you generated

Mon Oct 27, 2008 5:43 pm

Code:
<?php
     header
("Content-type: image/png");
     
$src_filename = "http://www.codemiles.com/logos/logo.PNG";
     
$src = @ImageCreateFromPng($src_filename) or die("Could not create source image");
     
$src_size = GetImageSize($src_filename);
     
$im = @ImageCreate(320, 200)  or die("Could not create destination image");
   
     
$bg_color = ImageColorAllocate($im, 240, 240, 240);
     
$text_color = ImageColorAllocate($im, 0, 0, 0);
   
     for(
$i = 0; $i < 5; $i++){
          
ImageCopy($im, $src, 100, $i * 25, 0, 0, $src_size[0], $src_size[1]);
     }
     
ImagePng($im);
     
ImageDestroy($src);
     
ImageDestroy($im);
?>




Post a reply
  Related Posts  to : PNG image to the image you generated
 Image-Viewer-Image Processing-Filters-Noise-enhancements     -  
 Move image in front of a background image     -  
 different between cfa image and gray level image     -  
 put image in asp.net     -  
 php Random image     -  
 add image row in your web page     -  
 Image Viewer     -  
 Image compression     -  
 Many links for the one image     -  
 image processing     -