It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center




已关闭8年。




是否可以在GD中为文本添加辉光或阴影?目前,我正在使用imagettftext函数。

最佳答案

我遇到了这个问题,并创建了一个名为imagettftextblur的新函数,该函数已在https://github.com/andrewgjohnson/imagettftextblur中作为开源发布。

以下是添加阴影的方法:

imagettftextblur($image,$size,0,$x + 3,$y + 3,$shadow_color,$font,$string,1); // 1 can be higher to increase blurriness of the shadow
imagettftextblur($image,$size,0,$x,$y,$text_color,$font,$string);

关于php - 如何在PHP的GD库中为文本添加辉光或阴影?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15514985/

10-11 22:34
查看更多