Note that there are some explanatory texts on larger screens.

plurals
  1. POSave Montage to Blob with Magick++
    text
    copied!<p>I have a montage, and I can save it to disk when specified the destination path.However when I try to save it to a Blob it fails.</p> <p><strong>Am I missing some settings?</strong></p> <p>Version: ImageMagick 6.8.2-5 2013-02-05 Q8</p> <p>Machine: Windows 7 x64</p> <p><strong>EDIT</strong>: The exception:</p> <pre><code>Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception. at Magick.throwException(_ExceptionInfo* ) at Magick.writeImages&lt;class std::_List_iterator&lt;class std::_List_val&lt;class Magick::Image,class std::allocator&lt;class Magick::Image&gt; &gt; &gt; &gt; (_List_iterator&lt;std::_List_val&lt;Magick::Image\,std::allocator&lt;Magick::Image&gt; &gt; &gt; first_, _List_iterator&lt;std::_List_val&lt;Magick::Image\,std::allocator&lt;Magick::Image &gt; &gt; &gt; last_, Blob* blob_, Boolean adjoin_) in d:\dev\projects\ecs\layers\tools\imagemagicknet\include8\magick++\stl.h:line 2562 </code></pre> <p><a href="http://torgyik.co.uk/montage/montage.rar" rel="nofollow">The source images</a></p> <p>The Code:</p> <pre><code> void test() { list&lt;Magick::Image&gt; sourceImageList; Magick::Image image; image.read("d:\\imtest\\Montage\\1.jpg"); sourceImageList.push_back(image); image.read("d:\\imtest\\Montage\\2.jpg"); sourceImageList.push_back(image); image.read("d:\\imtest\\Montage\\3.jpg"); sourceImageList.push_back(image); Magick::Color color("rgba(0,0,0,0)"); Montage montageSettings; montageSettings.geometry("100x100-0-0"); montageSettings.shadow(true); montageSettings.backgroundColor(color); montageSettings.tile( "3x1" ); list&lt;Magick::Image&gt; montagelist; Magick::montageImages( &amp;montagelist, sourceImageList.begin(), sourceImageList.end(), montageSettings); // This will give the expected result Magick::writeImages(montagelist.begin(), montagelist.end(), "d:\\imtest\\Montage\\out.png"); Magick::Blob *b = new Magick::Blob(); // This will throw an exception mentioned above Magick::writeImages(montagelist.begin(), montagelist.end(), b); Magick::Image imageFromBlob(*b); imageFromBlob.write("d:\\imtest\\Montage\\outBlob.png"); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload