MagickWriteImages problem
Posted: 2007-07-25T10:57:34-07:00
When I run the TclMagick test script it crashes when it gets to the test of MagickMorphImages. The script reads a miff file consisting of 5 frames, morphs 5 frames between each one and then writes the result to a gif file using MagickWriteImages. This causes an extraordinary amount of disk activity and really slows my system down and then it crashes. If I try it with morphs of more than 3 intermediate images it also crashes.
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:
Pete
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();
}