[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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Use getPixels(). To access MagickCore methods preceed them with MagickLib::, for example, MagickLib::GetImagePixels().
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

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: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

syncPixels() just returns but its necessary to ensure the pixel updates are pushed to the pixel cache.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Try
  • *q=(*p);
Post Reply