Can someone help me? I have a scanned document in my system. It's a tiff file.
You will see below the code i have written. The problem is that i get an error message.
The message is like this "A Graphics object cannot be created from an image that has an indexed pixel format."
My code is this:
Private Sub drawnOnPic(ByVal xpos As Integer, ByVal ypos As Integer)
imgDocument.Image = Image.FromFile(pathName & "\" & veranderImageNaam)
Dim g As Graphics = Graphics.FromImage(imgDocument.Image)
Dim Penstyle As New Pen(Color.Red, 5)
g.DrawRectangle(Penstyle, xpos, ypos, 600, 175)