I want to set the transparecy of an image to a specific value (for example: 1.0 is opaqu and 0.0 is transparent). The documentation tells me that there is an "MagickSetImageAlpha" function, but it doesn't exist (anymore?).
I want to make a pattern transparent.
Heres my function im using right now to create a pattern and drawing it on a wand.
(this is just a little helper function the d_wand and the rest of the operation is in other parts of the file and works fine)
Greetings,
Flocke
Code: Select all
void set_tile_pattern(DrawingWand *d_wand,char *pattern_name,char *pattern_file)
{
MagickWand *t_wand;
long w,h;
t_wand=NewMagickWand();
MagickReadImage(t_wand,pattern_file);
MagickSetImageAlphaChannel(t_wand,ActivateAlphaChannel); //SetAlphaChannel ???
//MagickSetImageAlpha does not exist anymore
w = MagickGetImageWidth(t_wand);
h = MagickGetImageHeight(t_wand);
DrawPushPattern(d_wand, pattern_name+1, 0, 0, w, h);
DrawComposite(d_wand, SrcOverCompositeOp, 0, 0, 0, 0, t_wand);
DrawPopPattern(d_wand);
DrawSetFillPatternURL(d_wand, pattern_name);
}