[magick-users] Reading a single pixel from the command line

Nathan Wilson nathan at collectivesource.com
Sat Oct 27 06:54:15 PDT 2007


Given an x,y location is there an efficient way to get the RGB values  
from a JPEG using the standard ImageMagick command line tools?

I'm looking for something equivalent to:

% color_picker foo.jpg 46 47
206 159 129

In case you're curious this is for a color picker within a web page.   
The site already uses ImageMagick command line tools to resize  
images, so I'm hoping there's an easy way to do this without creating  
a new dependency.  For the moment I have a hand written C program  
that is working, but that complicates the portability of the website.

Thanks,
-Nathan



More information about the Magick-users mailing list