Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
There's a bug somewhere in the VignetteImage code. If the x and y arguments to MagickVignetteImage are both greater than half the width (x) and height (y) of the image, the program crashes. So far my tests seem to show that if only one of them is greater, it won't crash. I've appended a test function with values which crash.
#include <windows.h>
#include <wand/magick_wand.h>
void test_wand(LPTSTR lpCmdLine)
{
MagickWand *m_wand = NULL;
PixelWand *p_wand = NULL;
int w,h;
MagickWandGenesis();
m_wand = NewMagickWand();
MagickReadImage(m_wand,"logo:");
w = MagickGetImageWidth(m_wand);
h = MagickGetImageHeight(m_wand);
p_wand = NewPixelWand();
PixelSetColor(p_wand,"black");
MagickSetImageBackgroundColor(m_wand,p_wand);
MagickVignetteImage(m_wand,0,175,(long)(w*.51),(long)(h*.51));
// Set the compression quality to 95 (high quality = low compression)
MagickSetImageCompressionQuality(m_wand,95);
/* Write the image */
MagickWriteImage(m_wand,"logo_vig.jpg");
/* Clean up */
if(m_wand)m_wand = DestroyMagickWand(m_wand);
MagickWandTerminus();
}
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.