I wrote a C program to do the same thing and found that MagickMorphImages isn't causing the problem - it's MagickWriteImages. For morphs of up to 4 intermediate images it seems to be Ok, but with 5 it starts thrashing the disk again although it does eventually complete without crashing.
The images in sequence.miff are only 77x80 pixels, so even with the extra 25 morphed frames I wouldn't have expected writing them to load the system down.
Another side effect is that once I've done the test with 5 morphed images, my system thrashes when loading new programs and doing other tasks which are normally essentially instantaneous.
I'm using version 6.3.4 on Win XP Pro and there's 25GB of free disk space on C: - I recompiled TclMagick to use 6.3.4.
Should MagickWriteImages thrash when writing about 30 images in a sequence?
The input file is here: http://members.shaw.ca/el_supremo/sequence.miff
and my C test function is:
Code: Select all
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <wand/magick_wand.h>
void test_wand(void)
{
MagickWand *m_wand = NULL;
MagickWand *morph = NULL;
MagickWandGenesis();
m_wand = NewMagickWand();
morph = NewMagickWand();
MagickReadImage(m_wand,"sequence.miff");
morph = MagickMorphImages(m_wand,5);
if(morph == NULL) {
MessageBox(NULL,"Morph returned NULL!","",MB_OK);
m_wand = DestroyMagickWand(m_wand);
morph = DestroyMagickWand(morph);
MagickWandTerminus();
return;
}
MagickWriteImages(morph,"sequence.gif",MagickTrue);
m_wand = DestroyMagickWand(m_wand);
morph = DestroyMagickWand(morph);
MagickWandTerminus();
}