Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 1, 2023. It is now read-only.

Conversation

@jathu
Copy link
Owner

@jathu jathu commented Dec 11, 2017

I achieved a ~2x performance improvement by removing the UIColor overhead. We now encode a color within a single double. For example, a color with RGB (255,17,112) would be represented as 25517112. We then parse out the individual components with modular arithmetic and compute our color functions on these components.

Other changes:

  • Introduce UIImageColorsQuality enum instead of asking user to provide scale down size
  • Change the Playground example project to an iOS app example (check it out on your iPhone, it's beautiful)
  • Change album art example to paintings
  • Other minor Swift 4 changes

As this is a big change to the library, I am incrementing the version to 2.0.0. I have tested this version on my own projects and it works well. However, due to how experimental this is, I won't be merging this PR until enough people test it.

You can test this on the branch performance-improvement. If you test this and it works well, please give a thumbs up else provide feedback.

Thanks ✌️

preview

@jathu jathu merged commit a712c08 into master Jan 6, 2018
@jathu jathu deleted the performance-improvement branch May 10, 2018 21:43
@sabiland
Copy link

sabiland commented Oct 6, 2022

May I ask how your algorithm (in few words) works to get those 4 colors?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants