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?".
Magick::Blob blob;
image.write(&blob, "RGB", 8);
blob.data() --> this is what I need
How can I achive this via the image pixel cache? I need exactly what blob.data() would give me but by using the pixel cache because the blob conversion takes about ~700ms for a 1400x1000 pixel jpg image. And the pixels are copied later to opengl so it's an unneseccary conversion.
The fastest pixel accessor is getConst(), however it returns a PixelPacket type which is probably not what you want. Instead use write(x,y,columns,rows,map,type,pixels). Here you supply the pixel buffer and ideally you would access a scanline at a time, for example, image.write(0,0,width,1,"RGB",CharPixel,pixels).