如何在左侧而非右侧的图像上添加水印

时间:2011-02-08 14:16:40

标签: php

您好, i'm using this code并且它的工作非常好但是它在右侧添加了徽标,而我想要在左侧

2 个答案:

答案 0 :(得分:5)

我看到以下几行:

21     // destination x and y
22     $imageWidth-$logoWidth, $imageHeight-$logoHeight,

这可能是正确的(减去图像的宽度)底部(减去高度)点,从那里开始写水印。

尝试将其替换为例如左上角的那个:

21     // destination x and y
22     0 , 0,

或者如果你想要左下角,请尝试:

21     // destination x and y
22     0 , $imageHeight-$logoHeight,

答案 1 :(得分:1)

在第22行:

0, $imageHeight - $logoHeight,
相关问题