Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
I have a working PHP image / text stamping script, but i need a little help. Example shown please help.?
Ok the below script inserts the text in "$string" onto the image "EM1.png". This works great. But say if instead of wanting to insert text onto the image i wanted to insert another smaller image on the EM1.png what would i do?
Bascially i want to stamp a small picture onto images like a logo to stop people stealing them.
<?php
header("Content-type: image/png");
$string = "super text";
$im = imagecreatefrompng("Empty/EM1.png");
$orange = imagecolorallocate($im, 20, 210, 60);
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 56, $string, $orange);
imagepng($im);
imagedestroy($im);
?>
2 Answers
- 1 decade agoFavorite Answer
I haven't worked too much with the image manipulation capabilities of PHP but you can start here for reference:
PHP Manual-Image Manipulation: http://www.php.net/manual/en/ref.image.php