views:

38

answers:

1

hi .

Can anybody show me an example how i get the pixel values of an Image ? I want to read an Image and iterate over it .. and print out the actual "red" value.

Can anyone help ? i'm a beginner :(

+1  A: 

there is direct function in magic++ call read in image class

image::read

i.e image.read( 640, 480, "RGB", CharPixel, pixels );

in which pixels will give you arrays of pixel values... which you can use later..

Or you can access direct low level pixels.. here is how... http://www.imagemagick.org/Magick++/Image.html#Raw%20Image%20Pixel%20Access

mihirpmehta