如何去除ImageFilledPolygon php锯齿状边缘?
我有一个函数可以填充 imagecreatetruecolor($h,$w) 创建的位图的一部分; 但结果是绘图看起来锯齿状且不平滑,这很糟糕。 我尝试了 php antialias(resource,boolean) 函数,没有区别。我只能猜测它不受支持。 任何大师都知道有什么巧妙的技巧可以使边缘光滑吗? 如果你看图片 http://www.php.net/manual/en/images/21009b70229598c6a80eef8b45bf282b-imagefilledpolygon.png 从php手册来看,这正是我的意思。有什么想法如何去除它(锯齿状边缘)? 非常感谢。
I have a function that fills a part of the bitmap created by imagecreatetruecolor($h,$w) ;
But the result is the drawing looking jagged and not smooth which sucks.
I tried the php antialias(resource,boolean) function and there is no difference. I can only guess it isn't supported.
Any gurus know of any neat trick to make the edges smooth?
If you look at the image
http://www.php.net/manual/en/images/21009b70229598c6a80eef8b45bf282b-imagefilledpolygon.png
from the php manual, that is exactly what I mean. Any ideas how to remove it (the jagged edges)?
Thanks a lot in advanced.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了使边缘平滑,可以尝试resizeimage函数并添加模糊参数。
To make the edges smooth, you can try the resizeimage function and add a blur parameter.
@trimbo 指出 2006 年在
php.net
上:@trimbo pointed out in 2006 on
php.net
: