Get Array of Pixels in Magic++ for QPixmap

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 writePixels() to transfers one or more pixel components from the image pixel cache to a buffer.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You must allocate the buffer you pass to writePixels(). It cannot be NULL.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

You can use whatever you want to allocate memory, new, malloc, mmap(), whatever. Its size should be 4 * width * height * 2.
Post Reply