84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
最近做app用php写的json数据接口,里边涉及很多图片的输出因为数据来自pc网站,很多图片尺寸较大,体积较大,客户端显示速度较慢 请教有什么好的办法在输出时缩小图片质量和尺寸呢
How to compress images using the json interface written in php? -PHP Chinese website Q&A-How does the json interface written in PHP compress images? -PHP Chinese website Q&A
Let’s take a look and learn.
{ "prefix" : "host", "image_quality" : { "low" : "type_1" "middle" : "type_2" "high" : "type_3" } "image" :[ ] }
1.如果有七牛,七牛可以设置各种质量,以拼接后缀的方式,得到的图片大小也不同
2.如果没有接第三方图片服务,那么只能图片上传的时候,做队列,预先在图片服务器做各种质量
3.无论1,2 APP可以根据网络,或者用户的设置喜好,甚至是服务端的控制,按需拼接后缀,解决了图片质量加载的问题
How to compress images using the json interface written in php? -PHP Chinese website Q&A-How does the json interface written in PHP compress images? -PHP Chinese website Q&A
Let’s take a look and learn.
1.如果有七牛,七牛可以设置各种质量,以拼接后缀的方式,得到的图片大小也不同
2.如果没有接第三方图片服务,那么只能图片上传的时候,做队列,预先在图片服务器做各种质量
3.无论1,2 APP可以根据网络,或者用户的设置喜好,甚至是服务端的控制,按需拼接后缀,解决了图片质量加载的问题