Replies: 1 comment
-
This is probably not the only option but you could do something like this: using var image = new MagickImage("plasma:purple", 300, 300);
using var mask = new MagickImage(MagickColors.Black, 300, 300);
mask.Draw(
new DrawableFillColor(MagickColors.White),
new DrawableCircle(100, 100, 100, 1)
);
mask.Alpha(AlphaOption.Copy);
image.Composite(mask, CompositeOperator.CopyAlpha);
image.Write("circle.jpg"); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello~
How to crop a square picture to a circle, how to achieve in the code
The effect is as follows:
Beta Was this translation helpful? Give feedback.
All reactions