- Framework: SDWebImage 4.0.0 libwebp: 0.5.1
- 测试机: ipone 6p 16G 9.3.5 图片 1280x1280
- 转换:https://github.com/mattt/WebPImageSerialization/
代码:
NSLog(@"end1___%@",[NSDate new]);
NSData *imageData = UIImageWebPRepresentation([UIImage sd_imageWithData:tempImageData]);
NSLog(@"end2___%@",[NSDate new]);
NSLog(@"jpeg__%lu\n webP__%lu",UIImageJPEGRepresentation(aParam.uploadImage, 0.75).length,imageData.length);
2017-07-07 10:34:55.351test[7754:2490842] end1___2017-07-07 02:34:55 +0000
2017-07-07 10:35:06.026test[7754:2490842] end2___2017-07-07 02:35:06 +0000
2017-07-07 10:35:06.093test[7754:2490842] jpeg__710685
webP__31258 //字节
是因为本身图片压缩慢,还是因为所用的 libwebP 库过低(现在是 0.6.0,但是因为是 pod SDWebImage 所以是 0.5.1),还是因为转换方法的问题? 因为不懂安卓,请问安卓下和 iOS 区别大吗? SOS.