title: Load Images from memory (libharu) from Magick++ images
body: <p>I am working on some pdf generation software in c++ based on <a href="http://libharu.org/" rel="nofollow">libharu</a> and I would like to be able to first manipulate images using <a href="http://www.imagemagick.org/Magick++/" rel="nofollow">Magick++</a> and then load them from memory using libharu function:</p>
  
  <pre><code>HPDF_LoadRawImageFromMem()
  </code></pre>
  
  <p>Which according to the <a href="http://libharu.sourceforge.net/document_handling.html" rel="nofollow">documentation</a> essentially load images from some <code>void *</code>buffer.</p>
  
  <p>My goal is to be able to get this <code>void*</code> data out of a <a href="http://www.imagemagick.org/Magick++/Image.html" rel="nofollow"><code>Magick::Image</code></a> instance and load this image into my haru pdf based on this data. </p>
  
  <p>I have tried writing to a <code>void*</code>or to a <a href="http://www.imagemagick.org/Magick++/Blob.html" rel="nofollow"><code>Magick::Blob</code></a> but the only achievement I have had so far was some black rectangle instead of the image I am expecting. </p>
  
  <p>Does anyone have any experience in converting <em>Raw</em> image data from one library into another one ?</p>
  
  <p>The reason I am trying to do this from memory is because so far I am writing Magick::Image instances into a file and then reading from this file to load then in haru, which is a huge performance hit in the context of my Application. </p>