Jay, thank you for prompt reply!
I have already tried it and it seems that this approach is slowing down the
system... I have tested it with a directory containing about 60 image files.
Any alternatives?
James
"Jay Taplin" <jt*****@integraware.com> wrote in message
news:KTPyf.7590$Zo.1520@trnddc07...
You could try this:
Private Function GetJPEGSize(ByVal Filename As String, ByRef Width As
Integer, ByRef Height As Integer) As Boolean
Dim img As Image
Try
img = Image.FromFile(Filename)
Width = img.Width
Height = img.Height
Return True
Catch
Return False
End Try
End Function
You call this function by:
If GetJPEGSize("C:\scan0001.jpg", intWidth, intHeight) Then
System.Console.WriteLine("WIDTH: " & intWidth.ToString & " -
HEIGHT: " & intHeight.ToString)
End If
I hope this helps.
Jay Taplin, MCP