Create image object from PNG : imagecreatefrompng « Graphics Image « PHP






Create image object from PNG

 
<?php
    $stars = imagecreatefrompng("stars.png");
    $gradient = imagecreatefrompng("gradient.png");
    imagecopymerge($stars, $gradient, 0, 0, 0, 0, 256, 256, 60);
    header('Content-type: image/png');
    imagepng($stars);
    imagedestroy($stars);
    imagedestroy($gradient);
?>
  
  








Related examples in the same category

1.Color and Image Fills
2.Loading Existing Images