Andy Warhol would be proud.
I have spent the last few days writing a program that will take an image as input, and produce an identical picture with a reduced color depth. It is meant to be used for applications that require a minimal color palette.
The program is configurable to let me choose any number of final palette sizes. I can tell it to stop once there are 100 distinct colors in the image, or 1000, or 274... or I can make it go all the way to 2 colors. Interesting!
Each color on the final image is an average of a group of colors from the original. The algorithm searches for the two most similar colors, and combines them, until it reaches the user-defined threshold.
The top row is what I was expecting to see, and where the program name came from. Smooth color gradients should be leveled out into a very definitive set of terraces.
What I *wasn't* expecting was the second row. Pictures and other images with lots of detail not only lose their detail, but some of their less noticeable parts get brought out.
I'll probably post the source code sooner or later, once I iron it out. Removing debugging print lines, adding some comments (you're going to need them).
Something like this probably already exists, but it was a nice challenge, and introduced me to some nifty software, like Imagemagick.
Is this cool or what?
Hint: the answer is not 'what'
I have spent the last few days writing a program that will take an image as input, and produce an identical picture with a reduced color depth. It is meant to be used for applications that require a minimal color palette.
The program is configurable to let me choose any number of final palette sizes. I can tell it to stop once there are 100 distinct colors in the image, or 1000, or 274... or I can make it go all the way to 2 colors. Interesting!
Each color on the final image is an average of a group of colors from the original. The algorithm searches for the two most similar colors, and combines them, until it reaches the user-defined threshold.
The top row is what I was expecting to see, and where the program name came from. Smooth color gradients should be leveled out into a very definitive set of terraces.
What I *wasn't* expecting was the second row. Pictures and other images with lots of detail not only lose their detail, but some of their less noticeable parts get brought out.
I'll probably post the source code sooner or later, once I iron it out. Removing debugging print lines, adding some comments (you're going to need them).
Something like this probably already exists, but it was a nice challenge, and introduced me to some nifty software, like Imagemagick.
Is this cool or what?
Hint: the answer is not 'what'
Category Other / Miscellaneous
Species Western Dragon
Size 640 x 580px
File Size 381.3 kB
thats pretty neat tauren you you should go check out this software --> www.filterforge.com
FA+

Comments