Python how to get a list of color that used in one image
I use PIL, and I want to have a dictionary of colors that are used in this image, including color(key) and number of pixel points it used.
How to do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have used something like the following a few times to analyze graphs:
Ie, there are 8 pixels with rbg value (11, 24, 41), and so on.