We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

DrawString with Outline

How can I use DrawString to annotate an image with text that has an outline/border?

@bpm-1, please see example:

            using(var ms = new MemoryStream())
            using (var image = Image.Create(new BmpOptions(){Source = new StreamSource(ms)}, 200, 100))
                var g = new Graphics(image);
                var p = new GraphicsPath();
                var f = new Figure();
                var shape = new TextShape("Hello world", new RectangleF(20, 0, 200, 100), new Font("Arial", 32), StringFormat.GenericDefault);
                g.FillPath(new SolidBrush(Color.White), p);
                g.DrawPath(new Pen(Color.Red), p);