Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I am looking for a way to find number of colours are there in an image ? and they are which colours ?
Posted
Comments
dev C plus 4-May-13 6:02am    
so what???
get color by another software or by API
it's so vague question

You have a vague question but i'll give it a go.

Tip:
You need to know the structure of the file format used by the image.
From here, you will know where the colour data is saved.
You can then just parse through the file and count the unique colour data saved.

Does this answer your question?
 
Share this answer
 
Comments
hor_313 4-May-13 5:08am    
yes , but may you explain more about jpg images?
and if the colours goes more than 100 , how can I decrease them to less than 100 colours?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900