Chrome toDataUrl quality param is not effect when export jpeg

非 Y 不嫁゛ 提交于 2020-02-06 05:28:29

问题


Use canvas.toDataURL('image/jpeg', 1) in Chrome, the image is lose a little seriously, but in Firefox, It's ok, almost lossless, even use default quality value 0.92. It seems does not working by setting the quality in Chrome.


回答1:


It's a known issue and it's due to how chroma subsampling is handled.

Chrome do this differently than Firefox and Safari. The latter ones uses 4:4:4 at 1.0 setting while current Chrome doesn't. However, it seem as the latest Canary (version 33) do the same as the others.

In any case, until it has been solved it's very little you and I can do about it unfortunately...



来源:https://stackoverflow.com/questions/20278017/chrome-todataurl-quality-param-is-not-effect-when-export-jpeg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!