[magick-users] Average color
Fred Weinhaus
fmw at alink.net
Wed Apr 9 10:43:34 PDT 2008
If you want just the color values, use:
convert image.jpg -scale 1x1! -format "%[pixel:p{0,0}]" info:
If you want to create a 100x100 patch with that color use:
convert lena2.jpg -scale 1x1! -scale 100x100! tmp.png
>Hello,
>
>
>
>Using Image::Magick 6.3.2 (which is what is on the server), is there a way
>
>to calculate the 'average' color of a jpg? Say, for instance, an image is
>
>overall pink in color, that you can get an pink average color for it?
>
>
>
>I've seen a mosaic program use something similar (without the code, of
>
>course), and I wonder whether this could be accomplished in Image::Magick
>
>too.
>
>
>
>Thanks,
>
More information about the Magick-users
mailing list