我尝试从位图中获取 Image 对象,然后使用它来创建图形对象。然后我使用 DrawString 函数写一些东西,然后保存它。图像已成功保存,但字符串不存在。下面是代码。
Dim gr As Graphics = Graphics.FromImage(NewImage)
gr.DrawString("testSting " & temp_click.Text, font, Brushes.Black, New PointF(10, 10))
gr.Dispose()
NewImage.Save("C:\step" & stepNo & ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg)