-
Notifications
You must be signed in to change notification settings - Fork 83
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
iOS 17 issues getting dominantColors #27
Comments
I am on the same boat with iOS 17 Beta 4. It works on iOS 16 but all dominant colors on iOS 17 are quite different and unexpected |
Apparently i cant reproduce the issue if i use |
I also discovered the bug and have a fix for it. The RGB value of the dominantColor appears to be swapped.
|
I'm not an expert in image and color processing (hence using this package), however, given I'm using CoreData, I have a case in my app where I'm saving UIImage in my CoreData DataBase as Data, and when retrieving it, I'm casting it back to UIImage using ValueTransformer. By coincidence, what I have observed that on iOS 17 when I get the dominant colors of a UIImage selected by the user (Before saving it to CoreData), I get inverted colors as @nryrk observed. But when I close the app and open it again (Getting the image from CoreData) and try to get the dominant colors from the same image, I get the right NOT inverted colors!! Upon checking my ValueTransformer, I have noticed that the data I'm saving to my core data is So what I have tried is actually before getting the dominant colors of any image (Just to test), I have used derived temp image like this I didn't dig deeper yet, but I thought I might share this update help identifying the root cause of the issue faster, maybe someone can correlate it and find solid solution. Update:For now, as a temporary solution, I have wrote this helper function which seems to work on iOS 15, 16 and 17 (Didn't test on iOS 14 and lower) until I can find the root cause and its solution:
|
I'm also having this issue. Is there any chance this gets patched in the main repo? Does anyone here have a forked version that we can use? |
I'm testing my app with the iOS 17 public beta and I get totally unexpected dominant colors, whereas on my device with iOS 16 I still see them fine.
It could be a bug of the beta but it could also be that there's something fundamentally different in UIImage now. Can you guys check that?
The text was updated successfully, but these errors were encountered: