Getting the Color of a specific pixel

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting the Color of a specific pixel

Post by fmw42 »

see my magicwand script at http://www.fmwconcepts.com/imagemagick/index.html

The basic command is:

# make interior transparent and outside black
convert $infile -fuzz $threshold% -fill none -draw "matte $coords floodfill" \
-fill black -colorize 100% $outfile

$threshold% is typically 10%
$coords are your coordinates in pixels, e.g. coords="0,0"
Post Reply