[magick-users] histogram and PerlMagick
Anthony Thyssen
anthony at griffith.edu.au
Wed Nov 1 18:42:11 CST 2006
Brian Jackson on wrote...
| "Anthony Thyssen" wrote:
| > For example...
| > convert rose: histogram:t.gif
| >
| > I verified that the file produced "t.gif" is actually a GIF format
| > image of the histogram graph. The histogram output itself is also
| > saved into that image as history comment too.
|
| I don't see this. I tried on all 3 of my boxes here and all produce a
| MIFF and not a GIF. Same as I noticed from PerlMagick
|
| convert|head -1;convert rose: histogram:t.gif;file t.gif
| Version: ImageMagick 5.5.4 02/01/03 Q16 http://www.imagemagick.org
| t.gif: MIFF image data
|
Arrgggkkk! (You here the sound of a choking cough over the wires)...
You are using IM v5! 3 years old! You are really asking for trouble.
There has been so many bug fixes and probelms resolved since IM v6
was started that it is really not a laughing matter.
See IM Examples, Known and Fixed Bugs, to get an idea of just the
major bugs that have been fixed.
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/bugs/
And that is outside the bugs involving the command line argument
handling that was fix with the move to v6.
Why did the command line style change! or...
The problem with previous versions of IM
http://www.cit.gu.edu.au/~anthony/graphics/imagick6/basics/#why
I suggest you upgrade ASAP!!!!
| Really stupid question, but what do I do with the output? I want to SEE-
| the histogram for red, green, blue, and value.
|-
To get a histogram for the seperate channels. you will need to separate
those channels into separate images.
For IM v5 you will need to follow the techniques I outlined in the very
old (and aborted) IM v5 Examples. Your lucky it is actually still
online, I was considering junking it!
http://www.cit.gu.edu.au/~anthony/graphics/imagick5/masks/
EG for the red channel you will need to use something like...
convert image.jpg -channel red drawn.png +matte red.png
convert red.png histogram:red_histogram.miff
identify -format %c red_histogram.miff
convert -comment '' red_histogram.miff red_histogram.gif
Note the use of separate commands and temporary files for each and every
step in the image processing. That is the IM v5 way.
Also I can't make any gurantee that the above will even work, as I don't
have IM v5 available! The above is a guess on my part.
Anthony Thyssen ( System Programmer ) <A.Thyssen at griffith.edu.au>
-----------------------------------------------------------------------------
Clarke's Law: Study what the most respected authorities agree can NOT
be done - then do it. -- Arthur C. Clark
-----------------------------------------------------------------------------
Anthony's Home is his Castle http://www.cit.gu.edu.au/~anthony/
More information about the Magick-users
mailing list