logoalt Hacker News

jcynixtoday at 2:08 PM0 repliesview on HN

ImageMagick is a wonderful command line tool, IMO. You could use it to extract various information, e.g. the 5 most used colors of an image, as in

    convert $IMG -colors 5 -depth 8 -format "%c" histogram:info: | sort -nr
If needed you can easily remove colored borders first (trim subcommand with fuzz option) or sample only xy% from the image's center, or where the main subject might be.