Click here to Skip to main content
15,905,558 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All, I'm just wondering if there is a simple and fast way to get color scheme from an image?? I didn't find any result on the internet after searching for 1:30 hour... I'm not expert at Graphics codes and these stuff, but for my project the method should be very fast because it will have to get 30 color schemes of 30 different images(256x160 pixels) just in under 2 sec... so any advise where to start or how to calculate colors and extract them from an image??
Kornfeld Eliyahu Peter 24-Dec-14 15:04pm    
What are you consider a color scheme? Do you mean the color palette of the image?
Boudi AlSayed 24-Dec-14 16:03pm    
Yes that what i meant, sorry my bad english...
Sergey Alexandrovich Kryukov 24-Dec-14 17:43pm    
I think you could not find anything because your idea is quite original. Maybe it even makes some sense, for developing and fast applying color schemes to some limited/fixed set of designs. The picture could serve as a model "preview" of the color design and the source of color values at the same time.

So, instead of searching the Web, you could develop your idea by yourself. What is unclear about its implementation?

Boudi AlSayed 24-Dec-14 17:55pm    
ok, but I think i saw a lot of softawre using something like this, like some web galleries... for example image of nature that contains mostly green, so the border of this image will be colored green automaticly... , this site do exactly what i want... but i want to do the same in or c#...

1 solution

In WPF, BitmapSource has a Palette[^] property, however consider that not all image formats has palette. Only indexed (like tiff, gif and some kind of bitmap) formats has palette, for other formats you have to scan the image pixels and gather the color information from there...
Share this answer
Boudi AlSayed 24-Dec-14 17:56pm    
hmmm thats not my situation... I'm working with images that has no palette... How could I generate a Palette then?

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