For Each File As String In FileSys.GetFiles("C:\图片\") Dim s As String = FileSys.GetName(File) Dim img As Image = getimage(file) Dim g As Graphics = Graphics.FromImage(img) Dim fnt As New Font("宋体",20) Dim sz As Object = g.MeasureString(s, fnt) g.DrawString(s,fnt,Brushes.Green, img.Width - sz.Width - 10, Img.Height - sz.Height - 10) img.Save(file) g.Dispose() Next