Code: Select all
#include <stdio.h>
#include <string.h>
#include <wand/magick-wand.h>
#include <locale.h>
int main ()
{
setlocale (LC_ALL, "de_DE");
MagickWandGenesis();
char *description;
ExceptionType severity;
DrawingWand *draw_wand;
MagickWand *magick_wand;
PixelWand *color;
draw_wand = NewDrawingWand();
color = NewPixelWand();
magick_wand = NewMagickWand();
if( !MagickNewImage( magick_wand, 100, 100, color ) )
{
return 1;
}
DrawRectangle( draw_wand, 0, 0, 1, 1 );
/* This call fails if locale is set to de_DE */
if ( !MagickDrawImage( magick_wand, draw_wand ) )
{
description = MagickGetException(magick_wand,&severity);
(void) fprintf(stderr,"%s %s %lu %s\n",GetMagickModule(),description);
description = (char *)MagickRelinquishMemory(description);
}
magick_wand = DestroyMagickWand( magick_wand );
draw_wand = DestroyDrawingWand( draw_wand );
color = DestroyPixelWand( color );
MagickWandTerminus();
return 0;
}
No output when executed.
Actual result:
wand.c unknown 34 Non-conforming drawing primitive definition `rectangle'