I have a background/canvas with a solid color. I want to overlay a pattern on top of that background. I want to set the opacity of the tiled pattern too.
This is what I have
This is what I have
MagickImage pattern = new MagickImage("connect.png");
pattern.Alpha(AlphaOption.Set);
pattern.QuantumOperator(Channels.Alpha, EvaluateOperator.Set, Quantum.Max / 2);
using (MagickImage wallpaper = new MagickImage(new MagickColor("#2980b9"),1440,900)) {
wallpaper.Composite(pattern,0);
wallpaper.Write("result.png");
}
pattern.Dispose();
I am getting a solid background and the pattern is on the upper left of the image. The opacity is not set. What else do I have to do?