Chrome toDataUrl质量参数在导出jpeg时不起作用 [英] Chrome toDataUrl quality param is not effect when export jpeg

查看:1322
本文介绍了Chrome toDataUrl质量参数在导出jpeg时不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Chrome中使用 canvas.toDataURL('image / jpeg',1),图片丢失了一点,但在Firefox中,几乎无损,甚至使用默认质量值0.92。通过设置Chrome的质量似乎无效。

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.

推荐答案

这是一个已知问题,这是由于如何处理色度子采样。

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

Chrome的操作方式与Firefox和Safari不同。后者使用4:4:4在1.0设置
,而当前Chrome不。但是,它似乎是最新的Canary(版本33)做的和其他人一样。

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...

这篇关于Chrome toDataUrl质量参数在导出jpeg时不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆