Passing separate r,g,b buffers to Magick::Image constructor?
Posted: 2011-05-31T04:12:50-07:00
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
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