Expected behavior? (MagickColorizeImage)
Posted: 2007-10-29T13:35:00-07:00
Code: Select all
#include <stdio.h>
#include <string.h>
#include <wand/magick-wand.h>
int main()
{
MagickWandGenesis();
PixelWand *color_wand = NewPixelWand();
PixelWand *opacity_wand = NewPixelWand();
MagickWand *magick_wand = NewMagickWand();
MagickReadImage( magick_wand, "magick:logo" );
/* no effect */
// PixelSetColor( color_wand, "red" );
// PixelSetOpacity( opacity_wand, 0.5 );
// MagickColorizeImage( magick_wand, color_wand, opacity_wand );
/* this works */
PixelSetColor( color_wand, "red" );
PixelSetOpacity( color_wand, 0.5 );
MagickColorizeImage( magick_wand, color_wand, color_wand );
MagickSetImageFormat( magick_wand, "png" );
MagickWriteImage( magick_wand, "/home/mikko/public_html/image.png" );
MagickWandTerminus();
return 0;
}
I found no note of this behavior in docs.