PHP 8.5.0 Alpha 1 available for testing

Voting

: min(two, three)?
(Example: nine)

The Note You're Voting On

admin at cvxdes dot com
19 years ago
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.

<< Back to user notes page

To Top