How to translate this code into imagemagick

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
allan
Posts: 1
Joined: 2020-01-27T14:00:20-07:00
Authentication code: 1152

How to translate this code into imagemagick

Post by allan »

I implement this code witht system.drawing but i didnt find the class of the gradient to implement that with imagemagick :

Code: Select all

                    using (LinearGradientBrush gradientBrush = new LinearGradientBrush(rectangle, Color.Black, Color.Black, LinearGradientMode.Vertical))
                    using (Graphics g = Graphics.FromImage(bmp))
                    {
                        ColorBlend cb = new ColorBlend();
                        cb.Positions = colorBlendPosition;
                        cb.Colors = colors;

                        gradientBrush.InterpolationColors = cb;
                        g.FillRectangle(gradientBrush, rectangle);
                    }

Post Reply