note 62264 added to function.imagecopy

From: Date: Thu, 23 Feb 2006 16:26:00 +0000
Subject: note 62264 added to function.imagecopy
Groups: php.notes 
Request: Send a blank email to php-notes+get-104310@lists.php.net to get a copy of this message
I used this to watermark images. This is the function I wrote: <?php function watermark($url,$logo){ $bwidth = imagesx($url); $bheight = imagesy($url); $lwidth = imagesx($logo); $lheight = imagesy($logo); $src_x = $bwidth - ($lwidth + 5); $src_y = $bheight - ($lheight + 5); ImageAlphaBlending($url, true); ImageCopy($url,$logo,$src_x,$src_y,0,0,$lwidth,$lheight); } ?> Usage: <?php //$current_image would be your image the watermark is overlayed onto. Make sure it's imagecreatefrom*** to work. watermark($current_image,$watermark_image); ?> Hope this helps someone. ---- Server IP: 64.71.164.2 Probable Submitter: 24.62.68.169 ---- Manual Page -- http://www.php.net/manual/en/function.imagecopy.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+62264 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+62264&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+62264&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#104310) next »