Page 1 of 1

How to translate this code into imagemagick

Posted: 2020-01-27T14:04:43-07:00
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);