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

导出的图片太大,2.2M,有的网站要求2M以内,能不能提供压缩版的 #2

Open
champkeh opened this issue Jun 11, 2021 · 4 comments

Comments

@champkeh
Copy link

No description provided.

@turkyden
Copy link
Owner

感谢反馈!你是说上传的原图本身比较大么?图片压缩建议用 https://tinypng.com/ 处理哦,该工具仅具有添加水印功能。

@champkeh
Copy link
Author

我的原图只有200多k,添加水印之后达到了2.2M,我的意思是可以把canvas导出图片质量(quality)参数暴露成一个选项,可以让用户调节最终的图片质量(大小)。我就是担心个人信息泄露才不会用线上压缩工具的

@turkyden
Copy link
Owner

turkyden commented Jun 15, 2021

ok,目前这个小工具使用的是 html2canvas, 好像找不到关于图片质量(quality) 的参数
找到一个相似的问题:niklasvh/html2canvas#1580
如果可以,欢迎 PR 咯!

@turkyden
Copy link
Owner

你可以处理完图片再使用 TinyPNG 压缩一下咯,5M 以下都能帮你压缩的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants