七牛用图片处理接口处理后质量控制

我们是提供质量控制的,只是对其进行了隐藏:

http://developer.qiniu.com/docs/v6/api/reference/fop/image/imageview2.html 质量用q参数
http://developer.qiniu.com/docs/v6/api/reference/fop/image/imagemogr2.html 质量用quality参数
使用实例:
imageView2/1/w/100/h/100/q/70
imageMogr2/quality/5!
默认为70,可以设置为100.

使用举例:

将一个1M多的文件压缩为几百k

https://dn-liuhanlin-work.qbox.me/bigpicture.jpg?imageView2/1/70

看下请求结果:

Remote Address:115.231.75.52:443
Request URL:https://dn-liuhanlin-work.qbox.me/bigpicture.jpg?imageView2/1/70
Request Method:GET
Status Code:200 OK
Response Headers
view source
Accept-Ranges:bytes
Access-Control-Allow-Origin:*
Access-Control-Max-Age:2592000
Cache-Control:public, max-age=31536000
Connection:keep-alive
Content-Length:368444
Content-Transfer-Encoding:binary
Content-Type:image/jpeg
Date:Tue, 29 Sep 2015 06:30:12 GMT
ETag:"AM55ZZSRsma5Cb-zd8GypxE2gqyj"
Last-Modified:Tue, 29 Sep 2015 06:28:41 GMT
Server:nginx/1.4.4
X-Log:mc.g;FOPDC;FOPDC;FOPG:2;FOPDC;IO:5
X-Qiniu-Zone:0
X-Reqid:PWAAAG901zUSXwgU
X-Via:1.1 nn119:88 (Cdn Cache Server V2.0), 1.1 jiax13:5 (Cdn Cache Server V2.0)

变为了300k。

级联控制,参照这里:
http://developer.qiniu.com/docs/v6/api/overview/fop/pipeline.html

你可能感兴趣的:(七牛用图片处理接口处理后质量控制)