Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do it like this with ImageMagick on the command line. This will quantize the image to 8 colors and list them in descending order of occurance:

  convert image.jpg -resize 400x400 -format %c -dither None -quantize LAB -colors 8 -depth 8 histogram:info:- | sort -r


Sorting should be done with sort -r -n -t :




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: