如何用ASP测GIF图片文件的大小(不是文件字节大小,而是宽和高的长度)?
Hoper 2002-01-11 11:53:24 Function ReadGIF(filename)
Dim fso, ts, s
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath(filename), 1)
s = Right(ts.Read(10), 4)
response.write mid(s,2,1) & mid(s,1,1)&"<br>" '宽的十六进制
response.write mid(s,4,1) & mid(s,3,1) '高的十六进制
ts.Close
End Function
理论上应该没错,但我实用的时候发现读出来的数据根本不对.
百思不得其解,望高手指点.