You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converting a UIImage to the WebP format is extremely slow. For a 2.5-megabyte photo with a compression ratio of 0.85, it takes approximately 13.5 seconds
let webpCoder = SDImageWebPCoder.shared
var options: [SDImageCoderOption: Any] = [:]
options[SDImageCoderOption.encodeCompressionQuality] = 0.85
if let webpData = webpCoder.encodedData(with: image, format: .webP, options: options) {
compressionImageData = webpData
}