开发者

How can I add a watermark to images at the left, not the right

开发者 https://www.devze.com 2023-02-09 12:11 出处:网络
HELLo开发者_运维知识库, i\'m using this code and its work very good but it add the logo at the right and iam want in on the leftI see these lines:

HELLo开发者_运维知识库, i'm using this code and its work very good but it add the logo at the right and iam want in on the left


I see these lines:

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

That is probably the right (minus the width of the image) bottom (minus the height) point, from where the watermark is started to write.

Try and replace that with for instance this for left top:

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

Or if you want left bottom, try:

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


In row 22:

0, $imageHeight - $logoHeight,
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号