Getting colour from a Pixel

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Archeleus

Getting colour from a Pixel

Post by Archeleus »

Hello, I tried googling this, but I ended up with results for Perlmagick and so on.

I'm not asking for the code but, I which method do I use to get colour from a pixel?
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Re: Getting colour from a Pixel

Post by el_supremo »

With MagickWand in C you would use this function:
http://www.imagemagick.org/api/magick-i ... PixelColor

With Magick++ you would use the pixleColor method.

Pete
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Getting colour from a Pixel

Post by anthony »

For command line, look at
Extracting Image Colors
http://www.imagemagick.org/Usage/quantize/#extract
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Archeleus

Re: Getting colour from a Pixel

Post by Archeleus »

Thanks guys.
Post Reply