Hi

ive written the function:

PHP Code: 
    //Watermark the image...
function add_watermark($image) {
    
$overlay "site_images/imgcafe_watermark.gif";
    
    
$w_offset 0;
    
$h_offset 0;
    
    
$extension strtolower(substr($imagestrrpos($image".") +1));
    
    switch (
$extension)
    {
        case 
'jpg':
        
$background imagecreatefromjpeg($image);
        break;
        case 
'gif':
        
$background imagecreatefromgif($image);
        break;
        case 
'png':
        
$background imagecreatefrompng($image);
        break;
        default:
        die(
"Image type not supported");
    }
    
    
$base_width imagesx($background);
    
$base_height imagesy($background);
    
imagealphablending($backgroundtrue);
    
    
$overlay imagecreatefromgif($overlay);

    
imagesettile($background$overlay);

// Make the image repeat
imagefilledrectangle($background00$base_width$base_heightIMG_COLOR_TILED);
header('Content-type: image/png');
imagepng($background);



problem is its not watermarking anything nor showing any errors.

any help?>
Chris2k Reviewed by Chris2k on . Watermark Image On Upload Hi ive written the function: //Watermark the image... function add_watermark($image) { $overlay = "site_images/imgcafe_watermark.gif"; $w_offset = 0; Rating: 5