Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for quality control on WebP image #44

Merged
merged 3 commits into from
Dec 21, 2020

Conversation

isandeepj
Copy link
Contributor

#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 }

Copy link
Owner

@yeatse yeatse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your nice work! I just added some comments. We could merge this PR once they get resolved.

KingfisherWebP/Classes/CGImage+WebP.m Outdated Show resolved Hide resolved
@isandeepj
Copy link
Contributor Author

isandeepj commented Nov 27, 2020

@yeatse I have resolved given feedback. Kindly check.

@isandeepj
Copy link
Contributor Author

@yeatse @dinsen @ShaharHD @guilhermearaujo We are waiting for these changes in the latest version.

@yeatse
Copy link
Owner

yeatse commented Dec 21, 2020

@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

@yeatse yeatse merged commit ffc8636 into yeatse:master Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants