Passing separate r,g,b buffers to Magick::Image constructor?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
petke
Posts: 3
Joined: 2011-05-20T07:17:11-07:00
Authentication code: 8675308

Passing separate r,g,b buffers to Magick::Image constructor?

Post by petke »

The Magick::Image has the following constructor:

Magick::Image image(width, height, "RGB", Magick::CharPixel, (const void*)rgbbuffer);

My application has separete buffers for r g b and I would ideally like to use them directly.. instead of having to create an interleaved rgb buffer just to be able to pass the data to Magick. My application creates an image every frame so I'd like to avoid unneccessary work like this if possible. So ideally I would like for there to be a construtor like:

Magick::Image image(width, height, "RGB", Magick::CharPixel, (const void*)rbuffer, (const void*)gbuffer, (const void*)bbuffer);

On a similar note another part of my application uses a planar RGB buffer (as opposed to a interleaved RGB buffer) but I cant use that to create an image directly either. So ideally again I would like for there to be a construtor like:

Magick::Image image(width, height, "RGB", Magick::CharPixel, Magick::PlaneInterlace, (const void*)rgbplanarbuffer);

Any hope of such constructors being added or is there another way to get the job done?

Thanks
Post Reply