Skip to content
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

反和谐后因图片过大而发送失败问题 #53

Closed
xb2016 opened this issue Mar 25, 2020 · 3 comments
Closed

反和谐后因图片过大而发送失败问题 #53

xb2016 opened this issue Mar 25, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@xb2016
Copy link

xb2016 commented Mar 25, 2020

复现
在启用反和谐功能的条件下发送图片 https://i.pximg.net/img-original/img/2020/03/09/14/18/34/80000352_p0.jpg

原因

  1. 这张图片为 jpg 格式,且图片大小小于 3MB,所以不会触发 toMaster1200
  2. 在经过反和谐之后,输出格式变为 png,且大小为 5MB,导致发送失败

建议

  1. 图片大小判断放在发送前
  2. canvas.toDataURL 输出指定为 image/jpeg

最后
感谢大佬的插件!

@Tsuk1ko Tsuk1ko added the bug Something isn't working label Mar 25, 2020
@Tsuk1ko
Copy link
Owner

Tsuk1ko commented Mar 25, 2020

了解,感谢报告问题

@Tsuk1ko
Copy link
Owner

Tsuk1ko commented Mar 25, 2020

已修复,现在会在反和谐后检测大小,超标的再用 master1200

jpg quality 经过对比测试选择了0.97🤔

@xb2016
Copy link
Author

xb2016 commented Mar 26, 2020

我随便抽了个 0.95 感觉都差不多 能冲就行🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants