Access image pixels

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
stikhs

Access image pixels

Post by stikhs »

I want to have indexed access to each line of pixels of my Image.More specifically I want to be capable of accesing a pixel in aspecific row every time.How is that possible via the attributes of Image class?

Thank you in advance,

Antonis
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We assume you are using Magick++. If so use getConst() to return a particular pixel or pixels in your image.
stikhs

Post by stikhs »

Yes I use Magick++!What I want to do is to iteratively assign the image's pixel values to a TBitmap using ScanLine() .So is it possible to assign pixel values with getConst()?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Accessing pixels with getConst() is discussed here: http://www.imagemagick.org/Magick++/Pixels.html
Post Reply