This is the code:
Code: Select all
#define MSG(s) MessageBox(NULL,s,"",MB_OK)
#include <windows.h>
#include <stdio.h>
#include <string.h>
#include <wand/magick_wand.h>
void test_wand(LPTSTR lpCmdLine)
{
MagickWand *mw = NULL;
MagickWand *ew = NULL;
MagickWandGenesis();
mw = NewMagickWand();
MagickReadImage(mw,"http://www.imagemagick.org/Usage/compose/tile_water.jpg");
MagickReadImage(mw,"http://www.imagemagick.org/Usage/compose/tile_aqua.jpg");
//MSG("Files read");
//>>> THIS IS ESSENTIAL !!! It will crash when this is commented
// MagickResetIterator(mw);
ew = MagickEvaluateImages(mw,MeanEvaluateOperator);
//MSG("Done evaluate");
if(ew == NULL) {
MSG("MagickEvaluateImages returned NULL");
if(mw)mw = DestroyMagickWand(mw);
return;
}
MagickWriteImage(ew,"evaluateimages_tiles.jpg");
/* Clean up */
if(mw)mw = DestroyMagickWand(mw);
if(ew)ew = DestroyMagickWand(ew);
MagickWandTerminus();
}
It is possible that MagickSmushImages and MagickCombineImages have the same problem.
I haven't installed V7 yet but a brief look at the code suggests that it has the same problem.
Are you still updating/patching V6?
Pete