eramgarden
Well-known member
- Joined
- Mar 8, 2004
- Messages
- 579
Im converting a TIF image to JPG and I get this error on the bold line:
Public Sub IP()
Dim strFileToConvert As String
strFileToConvert = "C:\source1.Tif"
Dim b As New Bitmap(strFileToConvert)
Dim g As Graphics()
Dim bold As Font = New Font("Times New Roman", 10, FontStyle.Bold)
g.DrawString("This is a test", bold, Brushes.Black, 10.0F, 10.0F)
b.Save(strFileToConvert + ".jpeg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
how can I add the font? I tried : Dim g As New Graphics() but that didnt work either...
Thx
Public Sub IP()
Dim strFileToConvert As String
strFileToConvert = "C:\source1.Tif"
Dim b As New Bitmap(strFileToConvert)
Dim g As Graphics()
Dim bold As Font = New Font("Times New Roman", 10, FontStyle.Bold)
g.DrawString("This is a test", bold, Brushes.Black, 10.0F, 10.0F)
b.Save(strFileToConvert + ".jpeg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Sub
how can I add the font? I tried : Dim g As New Graphics() but that didnt work either...
Thx