We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey! Found a bug for the following function:
extension UIImage { func getDominantColors(with minCount: Int = 0) -> [UIColor]? { var resultColors: [UIColor]? // Try With PNG Data if let pngData = pngData(), let pngImage = UIImage(data: pngData), let colors = try? pngImage.dominantColors(with: .best, algorithm: .iterative) { if colors.count >= minCount { return colors } else { resultColors = colors } } // Try With JPEG Data if let jpegData = jpegData(compressionQuality: 1), let jpegImage = UIImage(data: jpegData), let colors = try? jpegImage.dominantColors(with: .best, algorithm: .iterative) { if colors.count >= minCount { return colors } else { resultColors = colors } } // Try With Original Image if let colors = try? dominantColors(with: .best, algorithm: .iterative) { if colors.count >= minCount { return colors } else { resultColors = colors } } if let colors = try? dominantColors() { if colors.count >= minCount { return colors } else { resultColors = colors } } return resultColors } }
When the following image is added as input parameter, crash inside ColorKit happened:
Image -
The text was updated successfully, but these errors were encountered:
I was hitting this crash for all images captured on my iOS 17 device. Patching this pull request fixed it for me: https://github.com/Boris-Em/ColorKit/pull/28/files
Sorry, something went wrong.
No branches or pull requests
Hey!
Found a bug for the following function:
When the following image is added as input parameter, crash inside ColorKit happened:
Please find the image here
Image -
The text was updated successfully, but these errors were encountered: