如何使用CarrierWave生成视网膜(iPad)友好(渐进或隔行)的jpeg图像? [英] How do you generate retina (iPad) friendly (progressive or interlaced) jpeg images with CarrierWave?

查看:95
本文介绍了如何使用CarrierWave生成视网膜(iPad)友好(渐进或隔行)的jpeg图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有许多报道称,移动Safari对非常大的JPEG图像进行了下采样,从而很难为新iPad推出适合视网膜的分辨率。

There are numerous reports that Mobile Safari downsamples very large JPEG images, making it difficult to put out retina-friendly resolutions for the new iPad.

将JPEG编码为逐行/隔行文件。
因此,我很好奇如何使用CarrierWave插件和RMagick扩展名来生成这种类型的文件。

The solution seems to be encoding JPEGs as progressive/interlaced files. Hence, I'm curious how I might use the CarrierWave plugin, and RMagick by extension, to generate this type of file.

谢谢!

推荐答案

您可以使用 MiniMagick

manipulate! do |img|
  img.strip
  img.combine_options do |c|
    c.quality "90"
    c.depth "8"
    c.interlace "plane"
  end
  img
end

这篇关于如何使用CarrierWave生成视网膜(iPad)友好(渐进或隔行)的jpeg图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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