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

Pass compression quality for jpeg images #83

Open
dannydaddy3 opened this issue Oct 23, 2019 · 1 comment
Open

Pass compression quality for jpeg images #83

dannydaddy3 opened this issue Oct 23, 2019 · 1 comment

Comments

@dannydaddy3
Copy link

dannydaddy3 commented Oct 23, 2019

It would be good to have an ability to pass quality parameter when saving jpeg images.

Or probably global variable like:
Disk.jpegCompressionQuality = 0.95

This would save half of disk space

@dannydaddy3
Copy link
Author

dannydaddy3 commented Oct 29, 2019

func save(_ value: UIImage, to directory: Directory, as path: String, jpegQuality: CGFloat = 1.0)

This option would be better actually, because you may save two images at the same time and need different jpeg quality for each of them. I have such use case in my project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants