SDWebImage是否支持不使用SDWebImageWebPCoder的WebP图像?

huangapple go评论54阅读模式
英文:

Does SDWebImage support webp images without SDWebImageWebPCoder?

问题

我能够在不使用SDWebImageWebPCoder的情况下下载并显示Webp图像,使用的是SDWebImage 5.13.4。那么,SDWebImageWebPCoder的目的是什么呢?
SDWebImage已经支持Webp吗,还是我在这里有什么误解?
我如何确定Webp图像是否已经被下载到我的应用程序中?

英文:

I was able to download and display Webp images without SDWebImageWebPCoder using SDWebImage 5.13.4. So what is the purpose of SDWebImageWebPCoder?
Does SDWebImage already support Webp or am I wrong about something here?
How can I identify if Webp images are being downloaded to my app or not?

答案1

得分: 1

根据ReadMe

> 从iOS 14/macOS 11.0起,通过SDWebImageAWebPCoder支持WebP格式。对于较低的固件版本,请使用编码器插件SDWebImageWebPCoder。

Google引入了WebP格式,后来苹果决定在UIKit.framework中本地支持它。因此,在iOS14+上,本地支持UIImage(data: webpData)

根据您想要为您的应用程序支持的iOS版本不同,您可能需要或不需要SDWebImageWebPCoder插件库,该插件将手动解码WebP图像原始数据。

英文:

According to the ReadMe:

>WebP format from iOS 14/macOS 11.0 via SDWebImageAWebPCoder. For lower firmware, use coder plugin SDWebImageWebPCoder

Google introduce the WebP format, and Apple decided later to support it, natively in UIKit.framework. So, natively, UIImage(data: webpData) works on iOS14 +.

Depending on which version of iOS you want to support for your App, you might need or not the SDWebImageWebPCoder plug-in lib, which will decode manually the WebP image raw data.

huangapple
  • 本文由 发表于 2023年2月6日 19:28:59
  • 转载请务必保留本文链接:https://go.coder-hub.com/75360726.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定