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

New Post: How to generate images with formatted text

$
0
0
If you want to do multiple draw operations you should use the overload of Draw that accepts an IEnumerable<DrawableBase>. Below is an example in C#.
using (MagickImage img = new MagickImage(path))
{
    List<DrawableBase> drawables = new List<DrawableBase>();
    drawables.Add(new DrawableFont("Comic Sans Is Evil", FontStyleType.Italic, FontWeight.Weight400, FontStretch.Normal));
    drawables.Add(new DrawableFillColor(new MagickColor(10, 10, 10)));
    drawables.Add(new DrawableText(50, 15, "Shafi"));
    img.Draw(drawables);
}

Viewing all articles
Browse latest Browse all 3693

Trending Articles