PHP adds watermark to the picture

  • content
  • comment
  • relevant
 <? php $img_src ="bg.png"; $img = imagecreatefrompng($img_src); $black = imagecolorallocate($img, 0, 0, 0); $text = $_GET['text']; $font ="acgfont.ttf"; imagefttext($img, 12, 0, 20, 45, $black, $font, $text); header("content-type: image/png"); //Transparent processing imagesavealpha($img, true); //Imagealphablending ($resize_im, false);//Do not merge colors, and directly replace them with $im image colors, including transparent colors; //Imagesavealpha ($resize_im, true);//Don't lose the transparent color of the $resize_im image; imagepng($img); imagedestroy($img); ?>

comment

zero Comments

Post reply

Your email address will not be disclosed. Required items have been used * tagging