Quantcast
Channel: magick Discussions Rss Feed
Viewing all articles
Browse latest Browse all 3693

New Post: how to set image opacity by percentage?

$
0
0
Will this work or is there a cleaner way to do this?
MagickImage pattern = new MagickImage("image.png");
pattern.Alpha(AlphaOption.Set);
var Divisor = Quantum.Max / (Quantum.Max * PercentageF)
pattern.QuantumOperator(Channels.Alpha, EvaluateOperator.Set, Quantum.Max / Divisor);

Viewing all articles
Browse latest Browse all 3693

Trending Articles