Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorhardy
    • CommentTimeNov 11th 2006
     
    Hello
    I have found the following function, which I'm pleased about, it watermarks an image even if the watermark is a PNG-24. But I have a question..the watermark appears on the top left of the image, what do I have to change to position it in the bottom right corner?

    ImageCopy($photoImage, $logoImage, 0, 0, 0, 0, $logoW, $logoH);

    I have a pretty good idea that it's from those 0's but I tried changing them and it gives me a black border around the watermark.
    Thanks
    • CommentAuthorphilips
    • CommentTimeNov 11th 2006
     
    0,0,0,0 is left top corner of your image, you must calculate the right coordinates first


    $_Dim[x] = imageSX($photoImage);
    $_Dim[y] = imageSY($photoImage);

    $logo_Dim[x] = imageSX($logoImage);
    $logo_Dim[y] = imageSY($logoImage);

    $x = $_Dim[x] - $logo_Dim[x];
    $y = $_Dim[y] - $logo_Dim[y];

    ImageCopy($photoImage, $logoImage, $x, $y, 0, 0, $logoW, $logoH);