-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try to use canvas filter #4
Comments
走 |
@Alan-Liang 非常感谢!测试了一下好像可以用。我甚至不知道有这个 API( |
但是其它的 filter,比如 blur 还是无解的对吧 |
~~也许可以试试用 imageData 手算高斯模糊~~
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有同学反馈,在一些背景图下,白色文字看不清,黑色文字又不好看,建议我加一个文字阴影功能。
这个办法很聪明(我怎么没想到),效果很好,于是我尝试在前端实现,也就是使用
drop-shadow
。可惜
ctx.filter
这个属性,不仅 Safari 不支持(去年就因为这个出了问题),微信小程序也是完全不支持。我又尝试了去年 @Alan-Liang 在 JingBh/zgk-avatar#1 提出的方法,发现在微信小程序中依然不可用,具体表现为要画到
canvas
上的Image
元素无法加载,并且onerror
似乎没有给出错误信息。最后,我只能在后端实现,把这个功能集成到自定义文字功能里。但是若在前端实现,还是会灵活很多。
想请问 @Alan-Liang 大佬是否知道其他实现方法?
The text was updated successfully, but these errors were encountered: