SDWebImageWebPCoder icon indicating copy to clipboard operation
SDWebImageWebPCoder copied to clipboard

Converting a UIImage to the WebP format is extremely slow

Open pogong opened this issue 7 months ago • 4 comments

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 }

pogong avatar Mar 03 '25 03:03 pogong