-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
What does the integer in Kmeans in Image.quantize mean? #7890
Comments
So the C quantize function passes the Lines 1685 to 1700 in ca97370
which passes it to the Lines 1761 to 1782 in ca97370
which each do the same thing - check if it's 0, and if not, subtract 1 as they pass it to the Lines 1474 to 1476 in ca97370
In the Lines 1158 to 1165 in ca97370
and it determines the number of pixel changes that are allowed during each loop of the k-means quantization algorithm, ending when the number of changes is less than or equal to the threshold. |
It should probably be mentioned that |
#5836 is actually an open issue that expects this not to be the case.
That's not quite true at the moment. Even if a palette is provided, an RGBA image with a method of |
It looks like |
To answer your original question @AeroDEmi, the |
Awesome, Thank you! |
I've created #7891 to fix the infinite loop. Otherwise, your question has been answered? |
I'm having trouble understanding the Integer argument of Kmeans in Image.quantize
The text was updated successfully, but these errors were encountered: