yeatse / KingfisherWebP

Elegantly handle WebP format with Kingfisher.
MIT License
304 stars 73 forks source link

Added support for quality control on WebP image #44

Closed isandeepj closed 3 years ago

isandeepj commented 3 years ago

43

Create a PNG or JPEG image to WebP

We can generate WebP Data following way with quality. Compares the quality with 60% of WebP image

let image = UIImage(named: "test.png")
guard let data = image.kf.normalized.kf.webpRepresentation(isLossy: true, quality: 60.0) else { return }

Compares the quality with 85% of WebP image

let image = UIImage(named: "test.jpg")
guard let data = image.kf.normalized.kf.webpRepresentation(isLossy: true, quality: 85.0) else { return }
isandeepj commented 3 years ago

@Yeatse I have resolved given feedback. Kindly check.

isandeepj commented 3 years ago

@Yeatse @Dinsen @ShaharHD @guilhermearaujo We are waiting for these changes in the latest version.

yeatse commented 3 years ago

@Yeatse @Dinsen @ShaharHD @guilhermearaujo We are waiting for these changes in the latest version.

Sorry for my delay 😂 I'm going to merge them now