Public Function GetHeader(ByVal sPath As String) As String
Dim GifHead As GIF_HEADER
Dim FileHandle As Long
FileHandle = FreeFile
Open sPath For Binary Access Read As #FileHandle
Get #FileHandle, , GifHead
Close #FileHandle
GetHeader = StrConv(GifHead.HeaderInfo, vbUnicode)
End Function
Public Function GetImageSize(ByVal sPath As String) As String
Dim sImageWidth As String
Dim sImageHeight As String
Dim LSD As LOGICAL_SCREEN_DISCRIPTOR
ReadScreenDiscriptor sPath, LSD
sImageWidth = LSD.iLogicalScreenWidth
sImageHeight = LSD.iLogicalScreenHeight
GetImageSize = sImageWidth & " X " & sImageHeight
End Function
Private Sub ReadScreenDiscriptor(ByVal sPath As String, ByRef LSD As
LOGICAL_SCREEN_DISCRIPTOR)
Dim FileHandle As Long
FileHandle = FreeFile
Open sPath For Binary Access Read As #FileHandle
Seek #FileHandle, 7
Get #FileHandle, , LSD
Close #FileHandle
End Sub