Created
June 7, 2013 06:49
-
-
Save yaf/5727475 to your computer and use it in GitHub Desktop.
rmagick color histo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rmagick' | |
img = Magick::ImageList.new('sudo_graph_20110807.jpg') | |
puts Magick::QuantumDepth | |
histo_color = img.quantize(10).color_histogram | |
#http://xona.com/colorlist/ | |
#8 255 | |
#16 65535 | |
#65535 -> 0 | |
puts histo_color.keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment