[magick++] copying & pasting portions of an image.

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
User avatar
magick
Site Admin
Posts: 11042
Joined: 2003-05-31T11:32:55-07:00

Post by magick » 2006-07-22T12:47:53-07:00

Use getPixels(). To access MagickCore methods preceed them with MagickLib::, for example, MagickLib::GetImagePixels().

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

Post by magick » 2006-07-22T14:20:04-07:00

Your code only assigns the first pixel, you need to iterate to assign all pixels. Don't forget to call syncPixels() to push the updates to the pixel cache.

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

Post by magick » 2006-07-22T15:20:57-07:00

syncPixels() just returns but its necessary to ensure the pixel updates are pushed to the pixel cache.

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

Post by magick » 2006-07-22T16:48:14-07:00

Try
  • *q=(*p);

Post Reply