The packages I reference below are from Nuget.
In version 7.0.0.21 - which must still be using im6 I was able to mask an image with a circle shape like this:
Thanks
In version 7.0.0.21 - which must still be using im6 I was able to mask an image with a circle shape like this:
using (var overlay = new MagickImage(localimagePath))
using (var mask = new MagickImage(MagickColor.Transparent, 694, 694)){
var circle = new DrawableCircle(346,346, 692, 346);
mask.FillColor = Color.White;
mask.Draw(circle);
mask.Alpha(AlphaOption.Off);
overlay.Mask = mask;
overlay.Composite(mask, CompositeOperator.CopyAlpha);
}
The latest nuget moves to im7 which has a bunch of changes including removal of FillColor for BackgroundColor and changes to Alpha. I have tried the ReadMask function and others, but I cannot get it to render anymore. Most of the documentation for im still seems to be v7, with the update, do you know if I need to switch to readMask or where to look for the correct documentation?Thanks