Using the imagecopymerge() Function : imagecopymerge « Graphics Image « PHP






Using the imagecopymerge() Function

 
<?php
    define("SRC_FILE", "yourImage.png");

    $img = imagecreatefrompng(SRC_FILE);
    $img_copy = imagecreatefrompng(SRC_FILE);

    imagecopymerge($img_copy, $img, 10, 10, 0,
                   0, imagesx($img), imagesy($img), 50);

    header("Content-Type: image/png");
    imagepng($img_copy);
?>
  
  








Related examples in the same category