Histogramm from clipping path
Posted: 2011-01-20T04:07:22-07:00
Hi guys,
currently I am trying to find dominant colors in a picture. I've already seen a lot of solutions and commands here in different threads.
But before I want to generate the histogramm I choose the first clipping path in the picture (tiff image) and only want a histogramm of this area.
Unfortunatelly it wont work.
Here is the command line:
The color reduction works as it should. A generated gif with:
only has the 4 colors.
But the histogram shows >100000 lines instead of only 4.
Without clip-path '#1' I'll get a histogram with 4 line.
Workaround is to save a tmp. gif picture and then genereate the histogram.
But maybe there is a way to do that in one command. (Maybe this is a bug?)
Any suggestions?
currently I am trying to find dominant colors in a picture. I've already seen a lot of solutions and commands here in different threads.
But before I want to generate the histogramm I choose the first clipping path in the picture (tiff image) and only want a histogramm of this area.
Unfortunatelly it wont work.
Here is the command line:
Code: Select all
convert -colors 4 -depth 8 [b]+clip-path '#1'[/b] picture.tif -format "%c" histogram:info: | sort -n -r -k 1 > "histo.txt"
Code: Select all
convert -colors 4 -depth 8 +clip-path '#1' picture.tif picture.gif
But the histogram shows >100000 lines instead of only 4.
Without clip-path '#1' I'll get a histogram with 4 line.
Workaround is to save a tmp. gif picture and then genereate the histogram.
But maybe there is a way to do that in one command. (Maybe this is a bug?)
Any suggestions?