Hi I have created a small program that enables the user to upload a phote and get an email back with a watermark on it.

Now the watermark is places in the bottom border with no margin, so I was wondering if anyone knew how I could make a small margin on the water mark.

Thank you, I hope you understand what I meen.

My code looks like this:

    include_once( 'class/class.upload.php' );
        $handle = new upload($filname);
        $handle->allowed = array('image/*');
            $handle->image_border          = 5;   // defining border width
            $handle->image_border_color    = '#000'; // defining border color
            $handle->image_watermark = 'badge.png';  // watermark image src
            $handle->image_watermark_position = 'BR'; // watermark image position again "BR" for bottom right and so on.
            $handle->image_resize         = true;   // making resize function to true
            $handle->image_x              = 160;    // making width to 160px
            $handle->image_y              = 160;    // making hight to 160px
            if ($handle->processed) {

                //$message = '<div class="center"><p>Border color #F58462 added successfully</p><img src="uploads/'.$handle->file_dst_name.'" alt="" /></div>';

4 Years
Discussion Span
Last Post by Squidge

Looking at the site from where the code comes from : http://www.verot.net/php_class_upload_docs.htm

You could use:

$handle->image_watermark_x = 5; //change to fit your needs
$handle->image_watermark_y = 5; //change to fit your needs

Instead of

$handle->image_watermark_position = 'BR';

Which is a fixed predetermined location.

Edited by Squidge

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.