Page 1 of 1

Re: Convert annotations w/shadows to labels

Posted: 2009-04-07T14:28:53-07:00
by fmw42
here is the guts of a recent script I wrote to find the closest color in an image to a reference color, then create two labeled swatches appended side-by-side. See nearest color at http://www.fmwconcepts.com/imagemagick/index.html

This is the part that creates the labeled and appended swatches.


convert \
\( -background "$rcolor" \
-fill $labelcolor -font $fontname -pointsize $point \
-gravity northwest label:"Reference Color:\n\n\n$rcolor" \) \
\( -background "$mcolor" \
-fill $labelcolor -font $fontname -pointsize $point \
-gravity northwest label:"Nearest Color:\n\n\n$mcolor" \) \
+append $outfile


This should get you started in the right direction.

see Anthony's excellent pages (esp text to image) at http://www.imagemagick.org/Usage/