开发者

How to render html to image format

开发者 https://www.devze.com 2023-03-12 05:56 出处:网络
I want to render \"Hello dalvir\" toimage format so that hello dalvir shows in开发者_Python百科 red color in image. How i can do it in C#.here is code...

I want to render "Hello dalvir" to image format so that hello dalvir shows in开发者_Python百科 red color in image. How i can do it in C#.


here is code...

Font MyFont = new Font(FontFamily, Font,FontStyle.Bold, GraphicsUnit.Point);
MyGraphics = Graphics.FromImage(bmpImage);
MyGraphics.Clear(Color.FromName("Red"));
MyGraphics.TextRenderingHint = TextRenderingHint.AntiAlias;
MyGraphics.DrawString("Hello dalvir", MyFont,
                    new SolidBrush(Color.FromName("Red")), 0, 0);
MyGraphics.Flush();
0

精彩评论

暂无评论...
验证码 换一张
取 消