
What I need to do is extracting the ten most used colors in a jpg.
I appreciate your help very much!
Code: Select all
id=ImageMagick version=1.0
class=DirectClass colors=0 matte=False
columns=256 rows=200 depth=8
colorspace=RGB
compression=JPEG quality=75
resolution=72x72
Comment={ 15044: ( 0, 0, 0) black
43: ( 1, 1, 1) #010101
325: ( 1, 0, 0) #010000
105: ( 0, 1, 0) #000100
14: ( 1, 1, 0) #010100
59: ( 1, 0, 2) #010002
127: ( 0, 0, 2) #000002
24: ( 0, 1, 2) #000102
6: ( 1, 1, 3) #010103
4: ( 0, 1, 3) #000103
25: ( 0, 2, 0) #000200
9: ( 0, 3, 0) #000300
7: ( 1, 2, 0) #010200
5: ( 0, 2, 1) #000201
1: ( 1, 3, 0) #010300
2: ( 0, 2, 2) #000202
... and many many more rows
Code: Select all
sort -k 1 -r hist.txt | head -n 10